@verisoft/ui-govcz 18.6.1 → 18.6.3
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 +48 -0
- package/assets/i18n/cs.json +9 -0
- package/assets/i18n/en.json +9 -0
- package/assets/icons/components/24-7.svg +12 -0
- package/assets/icons/components/NO-ICON.svg +2 -0
- package/assets/icons/components/add.svg +6 -0
- package/assets/icons/components/all.svg +3 -0
- package/assets/icons/components/arrival.svg +12 -0
- package/assets/icons/components/arrow-left.svg +3 -0
- package/assets/icons/components/arrow-right.svg +3 -0
- package/assets/icons/components/bars.svg +3 -0
- package/assets/icons/components/bell.svg +4 -0
- package/assets/icons/components/big-help.svg +12 -0
- package/assets/icons/components/book.svg +10 -0
- package/assets/icons/components/bookmarks.svg +11 -0
- package/assets/icons/components/box-arrow-up-right.svg +11 -0
- package/assets/icons/components/business-file.svg +14 -0
- package/assets/icons/components/businessman.svg +3 -0
- package/assets/icons/components/cactus.svg +14 -0
- package/assets/icons/components/calendar.svg +3 -0
- package/assets/icons/components/camera.svg +5 -0
- package/assets/icons/components/car.svg +5 -0
- package/assets/icons/components/card-400.svg +11 -0
- package/assets/icons/components/card-401.svg +11 -0
- package/assets/icons/components/card-403.svg +11 -0
- package/assets/icons/components/card-404.svg +11 -0
- package/assets/icons/components/card-500.svg +11 -0
- package/assets/icons/components/card-502.svg +11 -0
- package/assets/icons/components/card-503.svg +12 -0
- package/assets/icons/components/card-504.svg +15 -0
- package/assets/icons/components/caret-right-fill.svg +3 -0
- package/assets/icons/components/certification.svg +14 -0
- package/assets/icons/components/chamber-deputies-cr.svg +11 -0
- package/assets/icons/components/chamber-deputies.svg +13 -0
- package/assets/icons/components/chat.svg +11 -0
- package/assets/icons/components/check-circle.svg +4 -0
- package/assets/icons/components/check-lg.svg +3 -0
- package/assets/icons/components/chevron-double-left.svg +4 -0
- package/assets/icons/components/chevron-double-right.svg +4 -0
- package/assets/icons/components/chevron-down.svg +3 -0
- package/assets/icons/components/chevron-left.svg +3 -0
- package/assets/icons/components/chevron-right.svg +3 -0
- package/assets/icons/components/chevron-up.svg +3 -0
- package/assets/icons/components/cities.svg +17 -0
- package/assets/icons/components/city-office.svg +17 -0
- package/assets/icons/components/coins.svg +14 -0
- package/assets/icons/components/communication.svg +4 -0
- package/assets/icons/components/confusion.svg +8 -0
- package/assets/icons/components/contact.svg +6 -0
- package/assets/icons/components/copy.svg +10 -0
- package/assets/icons/components/court.svg +5 -0
- package/assets/icons/components/covid.svg +5 -0
- package/assets/icons/components/czech-lion.svg +134 -0
- package/assets/icons/components/dash-lg.svg +3 -0
- package/assets/icons/components/diagram.svg +3 -0
- package/assets/icons/components/digital.svg +10 -0
- package/assets/icons/components/disability.svg +5 -0
- package/assets/icons/components/doc-agreement.svg +7 -0
- package/assets/icons/components/doc-basic-info.svg +18 -0
- package/assets/icons/components/doc-business.svg +8 -0
- package/assets/icons/components/doc-car-point-list.svg +16 -0
- package/assets/icons/components/doc-diploma.svg +17 -0
- package/assets/icons/components/doc-driver-info.svg +8 -0
- package/assets/icons/components/doc-election.svg +13 -0
- package/assets/icons/components/doc-filled.svg +16 -0
- package/assets/icons/components/doc-health.svg +3 -0
- package/assets/icons/components/doc-judgment.svg +8 -0
- package/assets/icons/components/doc-patient.svg +8 -0
- package/assets/icons/components/doc-personal-info.svg +11 -0
- package/assets/icons/components/doc-petition.svg +8 -0
- package/assets/icons/components/doc-registers.svg +7 -0
- package/assets/icons/components/doc-review.svg +20 -0
- package/assets/icons/components/doc-search.svg +8 -0
- package/assets/icons/components/doc-stamp.svg +15 -0
- package/assets/icons/components/doc-state.svg +13 -0
- package/assets/icons/components/doc-taxes.svg +16 -0
- package/assets/icons/components/doc-universal.svg +13 -0
- package/assets/icons/components/doc-visa.svg +14 -0
- package/assets/icons/components/documents.svg +11 -0
- package/assets/icons/components/download.svg +4 -0
- package/assets/icons/components/driver-file.svg +14 -0
- package/assets/icons/components/driver.svg +7 -0
- package/assets/icons/components/driving-licence.svg +7 -0
- package/assets/icons/components/email-notification.svg +12 -0
- package/assets/icons/components/empty-file.svg +13 -0
- package/assets/icons/components/energy.svg +11 -0
- package/assets/icons/components/envelope-fill.svg +3 -0
- package/assets/icons/components/envelope.svg +3 -0
- package/assets/icons/components/error.svg +12 -0
- package/assets/icons/components/european-parliament.svg +11 -0
- package/assets/icons/components/exclamation-lg.svg +3 -0
- package/assets/icons/components/exclamation-triangle-fill.svg +10 -0
- package/assets/icons/components/export.svg +13 -0
- package/assets/icons/components/eye.svg +4 -0
- package/assets/icons/components/family.svg +12 -0
- package/assets/icons/components/fast-forward.svg +1 -0
- package/assets/icons/components/filter.svg +3 -0
- package/assets/icons/components/gear.svg +11 -0
- package/assets/icons/components/geo-alt-fill.svg +10 -0
- package/assets/icons/components/globe.svg +12 -0
- package/assets/icons/components/graduate.svg +4 -0
- package/assets/icons/components/group.svg +3 -0
- package/assets/icons/components/hand-503.svg +10 -0
- package/assets/icons/components/hand-504.svg +7 -0
- package/assets/icons/components/hand.svg +14 -0
- package/assets/icons/components/health.svg +5 -0
- package/assets/icons/components/help.svg +4 -0
- package/assets/icons/components/history.svg +4 -0
- package/assets/icons/components/holiday.svg +13 -0
- package/assets/icons/components/hourglass.svg +4 -0
- package/assets/icons/components/house-door-fill.svg +3 -0
- package/assets/icons/components/house.svg +13 -0
- package/assets/icons/components/id-card.svg +6 -0
- package/assets/icons/components/id-info.svg +9 -0
- package/assets/icons/components/id.svg +6 -0
- package/assets/icons/components/illness.svg +9 -0
- package/assets/icons/components/info-circle-fill.svg +10 -0
- package/assets/icons/components/info-circle.svg +11 -0
- package/assets/icons/components/info-list.svg +14 -0
- package/assets/icons/components/info.svg +3 -0
- package/assets/icons/components/institute-file.svg +23 -0
- package/assets/icons/components/institution.svg +10 -0
- package/assets/icons/components/job-loss.svg +4 -0
- package/assets/icons/components/job.svg +3 -0
- package/assets/icons/components/lightbulb-fill.svg +10 -0
- package/assets/icons/components/list.svg +3 -0
- package/assets/icons/components/loader.svg +3 -0
- package/assets/icons/components/login.svg +11 -0
- package/assets/icons/components/logout.svg +13 -0
- package/assets/icons/components/map.svg +11 -0
- package/assets/icons/components/mobile-phone.svg +13 -0
- package/assets/icons/components/moon.svg +10 -0
- package/assets/icons/components/mouse.svg +3 -0
- package/assets/icons/components/my-filing.svg +15 -0
- package/assets/icons/components/my-state-data.svg +19 -0
- package/assets/icons/components/new-comments.svg +6 -0
- package/assets/icons/components/newborn.svg +16 -0
- package/assets/icons/components/news.svg +20 -0
- package/assets/icons/components/packet.svg +11 -0
- package/assets/icons/components/passport.svg +7 -0
- package/assets/icons/components/pencil.svg +3 -0
- package/assets/icons/components/personal-file.svg +14 -0
- package/assets/icons/components/pet.svg +10 -0
- package/assets/icons/components/petrol-station.svg +14 -0
- package/assets/icons/components/pills.svg +4 -0
- package/assets/icons/components/plus-lg.svg +3 -0
- package/assets/icons/components/population-register.svg +12 -0
- package/assets/icons/components/port-card.svg +8 -0
- package/assets/icons/components/portal.svg +8 -0
- package/assets/icons/components/pregnant.svg +11 -0
- package/assets/icons/components/president.svg +13 -0
- package/assets/icons/components/presidential-election.svg +12 -0
- package/assets/icons/components/print-fill.svg +4 -0
- package/assets/icons/components/profile-settings.svg +13 -0
- package/assets/icons/components/property.svg +4 -0
- package/assets/icons/components/question-circle.svg +4 -0
- package/assets/icons/components/queue.svg +13 -0
- package/assets/icons/components/quotes.svg +6 -0
- package/assets/icons/components/region.svg +11 -0
- package/assets/icons/components/regional-elections-clear.svg +11 -0
- package/assets/icons/components/regional-elections.svg +12 -0
- package/assets/icons/components/register-of-persons.svg +7 -0
- package/assets/icons/components/retiree.svg +8 -0
- package/assets/icons/components/rings.svg +5 -0
- package/assets/icons/components/search.svg +10 -0
- package/assets/icons/components/senate.svg +11 -0
- package/assets/icons/components/senior.svg +4 -0
- package/assets/icons/components/settings.svg +13 -0
- package/assets/icons/components/simple-envelope.svg +3 -0
- package/assets/icons/components/sms-notification.svg +7 -0
- package/assets/icons/components/sos.svg +6 -0
- package/assets/icons/components/star-fill.svg +10 -0
- package/assets/icons/components/state-file.svg +8 -0
- package/assets/icons/components/sun.svg +10 -0
- package/assets/icons/components/telephone.svg +10 -0
- package/assets/icons/components/three-dots-vertical.svg +3 -0
- package/assets/icons/components/time.svg +4 -0
- package/assets/icons/components/tombstone.svg +7 -0
- package/assets/icons/components/trash.svg +6 -0
- package/assets/icons/components/twitter-x.svg +10 -0
- package/assets/icons/components/upload.svg +4 -0
- package/assets/icons/components/user-login.svg +13 -0
- package/assets/icons/components/user.svg +3 -0
- package/assets/icons/components/vaccine.svg +11 -0
- package/assets/icons/components/x-circle.svg +4 -0
- package/assets/icons/components/x-lg.svg +3 -0
- package/assets/icons/components/x.svg +3 -0
- package/assets/logos/v-logo.svg +4 -0
- package/jest.config.ts +21 -0
- package/ng-package.json +15 -0
- package/package.json +23 -38
- package/project.json +49 -0
- package/src/assets/main.css +18 -0
- package/src/config.d.ts +10 -0
- package/src/index.ts +1 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.html +23 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +21 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +30 -0
- package/{lib/components/breadcrumb/index.d.ts → src/lib/components/breadcrumb/index.ts} +1 -1
- package/src/lib/components/button/button.component.html +26 -0
- package/src/lib/components/button/button.component.scss +0 -0
- package/src/lib/components/button/button.component.ts +72 -0
- package/src/lib/components/button/index.ts +1 -0
- package/src/lib/components/calendar/calendar.component.html +28 -0
- package/src/lib/components/calendar/calendar.component.scss +0 -0
- package/src/lib/components/calendar/calendar.component.ts +79 -0
- package/src/lib/components/calendar/index.ts +1 -0
- package/src/lib/components/checkbox/checkbox.component.html +23 -0
- package/src/lib/components/checkbox/checkbox.component.scss +0 -0
- package/src/lib/components/checkbox/checkbox.component.ts +62 -0
- package/src/lib/components/checkbox/index.ts +1 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.html +50 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +4 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +80 -0
- package/{lib/components/confirm-dialog/index.d.ts → src/lib/components/confirm-dialog/index.ts} +1 -1
- package/src/lib/components/dropdown/dropdown-item.component.html +8 -0
- package/src/lib/components/dropdown/dropdown-item.component.ts +18 -0
- package/src/lib/components/dropdown/dropdown.component.html +90 -0
- package/src/lib/components/dropdown/dropdown.component.scss +108 -0
- package/src/lib/components/dropdown/dropdown.component.spec.ts +21 -0
- package/src/lib/components/dropdown/dropdown.component.ts +297 -0
- package/{lib/components/dropdown/dropdown.model.d.ts → src/lib/components/dropdown/dropdown.model.ts} +6 -6
- package/{lib/components/dropdown/index.d.ts → src/lib/components/dropdown/index.ts} +1 -1
- package/src/lib/components/errors/error.component.html +11 -0
- package/src/lib/components/errors/error.component.scss +0 -0
- package/src/lib/components/errors/error.component.spec.ts +19 -0
- package/src/lib/components/errors/error.component.ts +30 -0
- package/src/lib/components/errors/index.ts +1 -0
- package/src/lib/components/form-field/form-field.component.html +14 -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.ts +78 -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 +122 -0
- package/src/lib/components/header/header.component.scss +0 -0
- package/src/lib/components/header/header.component.ts +91 -0
- package/src/lib/components/header/index.ts +1 -0
- package/{lib/components/index.d.ts → src/lib/components/index.ts} +33 -33
- package/src/lib/components/input-group/index.ts +1 -0
- package/src/lib/components/input-group/input-group.component.html +41 -0
- package/src/lib/components/input-group/input-group.component.scss +0 -0
- package/src/lib/components/input-group/input-group.component.ts +77 -0
- package/src/lib/components/loader/index.ts +1 -0
- package/src/lib/components/loader/loader.component.html +7 -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 +33 -0
- package/src/lib/components/multiselect/index.ts +1 -0
- package/src/lib/components/multiselect/multiselect.component.html +21 -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 +119 -0
- package/src/lib/components/number-input/index.ts +1 -0
- package/src/lib/components/number-input/number-input.component.html +48 -0
- package/src/lib/components/number-input/number-input.component.scss +0 -0
- package/src/lib/components/number-input/number-input.component.ts +82 -0
- package/src/lib/components/page-header/index.ts +1 -0
- package/src/lib/components/page-header/page-header.component.html +3 -0
- package/src/lib/components/page-header/page-header.component.scss +11 -0
- package/src/lib/components/page-header/page-header.component.spec.ts +21 -0
- package/src/lib/components/page-header/page-header.component.ts +29 -0
- package/{lib/components/password/index.d.ts → src/lib/components/password/index.ts} +1 -1
- package/src/lib/components/password/password.component.html +31 -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 +85 -0
- package/src/lib/components/radiobutton/index.ts +1 -0
- package/src/lib/components/radiobutton/radiobutton.component.html +23 -0
- package/src/lib/components/radiobutton/radiobutton.component.scss +0 -0
- package/src/lib/components/radiobutton/radiobutton.component.ts +58 -0
- package/src/lib/components/search/index.ts +1 -0
- package/src/lib/components/search/search.component.html +23 -0
- package/src/lib/components/search/search.component.scss +0 -0
- package/src/lib/components/search/search.component.ts +47 -0
- package/src/lib/components/section/index.ts +1 -0
- package/src/lib/components/section/section.component.html +26 -0
- package/src/lib/components/section/section.component.scss +0 -0
- package/src/lib/components/section/section.component.ts +57 -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 +25 -0
- package/src/lib/components/side-menu/side-menu.component.scss +23 -0
- package/src/lib/components/side-menu/side-menu.component.ts +42 -0
- package/src/lib/components/side-menu/side-menu.module.ts +64 -0
- package/src/lib/components/sidemenu/index.ts +2 -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 +73 -0
- package/src/lib/components/snackbar/snackbar.component.html +14 -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.ts +45 -0
- package/{lib/components/snackbar/snackbar.model.d.ts → src/lib/components/snackbar/snackbar.model.ts} +10 -10
- package/src/lib/components/stepper/index.ts +1 -0
- package/src/lib/components/stepper/stepper.component.html +35 -0
- package/src/lib/components/stepper/stepper.component.scss +9 -0
- package/src/lib/components/stepper/stepper.component.ts +61 -0
- package/src/lib/components/switch/index.ts +1 -0
- package/src/lib/components/switch/switch.component.html +16 -0
- package/src/lib/components/switch/switch.component.scss +0 -0
- package/src/lib/components/switch/switch.component.ts +37 -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-view-item.component.ts +23 -0
- package/src/lib/components/tab-view/tab-view.component.html +51 -0
- package/src/lib/components/tab-view/tab-view.component.scss +43 -0
- package/src/lib/components/tab-view/tab-view.component.ts +61 -0
- package/src/lib/components/tab-view/tab-view.module.ts +25 -0
- package/{lib/components/table/index.d.ts → src/lib/components/table/index.ts} +1 -1
- package/src/lib/components/table/table-pagination-info.component.html +9 -0
- package/src/lib/components/table/table-pagination-info.component.ts +22 -0
- package/src/lib/components/table/table.component.html +198 -0
- package/src/lib/components/table/table.component.scss +193 -0
- package/src/lib/components/table/table.component.ts +387 -0
- package/src/lib/components/table/table.model.ts +17 -0
- package/src/lib/components/table/table.models.ts +12 -0
- package/src/lib/components/textarea/index.ts +1 -0
- package/src/lib/components/textarea/textarea.component.html +50 -0
- package/src/lib/components/textarea/textarea.component.scss +0 -0
- package/src/lib/components/textarea/textarea.component.ts +78 -0
- package/src/lib/components/textfield/index.ts +1 -0
- package/src/lib/components/textfield/textfield.component.html +56 -0
- package/src/lib/components/textfield/textfield.component.scss +0 -0
- package/src/lib/components/textfield/textfield.component.ts +114 -0
- package/src/lib/components/tooltip/index.ts +1 -0
- package/src/lib/components/tooltip/tooltip.component.html +10 -0
- package/src/lib/components/tooltip/tooltip.component.scss +0 -0
- package/src/lib/components/tooltip/tooltip.component.ts +57 -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.ts +103 -0
- package/src/lib/icons.ts +36 -0
- package/{lib/index.d.ts → src/lib/index.ts} +5 -5
- package/src/lib/init.service.ts +11 -0
- package/src/lib/interceptors/http-error-message.interceptor.ts +45 -0
- package/src/lib/pages/bad-request-page/bad-request-page.component.html +5 -0
- package/src/lib/pages/bad-request-page/bad-request-page.component.scss +0 -0
- package/src/lib/pages/bad-request-page/bad-request-page.component.ts +15 -0
- package/src/lib/pages/error-page/error-page.component.html +5 -0
- package/src/lib/pages/error-page/error-page.component.scss +0 -0
- package/src/lib/pages/error-page/error-page.component.ts +32 -0
- package/src/lib/pages/error-page/error-page.constants.ts +19 -0
- package/{lib/pages/index.d.ts → src/lib/pages/index.ts} +3 -3
- package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.html +5 -0
- package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.scss +0 -0
- package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.ts +16 -0
- package/{lib/pages/not-authenticated/index.d.ts → src/lib/pages/not-authenticated/index.ts} +1 -1
- package/src/lib/pages/not-authenticated/not-authenticated.component.html +5 -0
- package/src/lib/pages/not-authenticated/not-authenticated.component.ts +14 -0
- package/{lib/pages/not-authorized/index.d.ts → src/lib/pages/not-authorized/index.ts} +1 -1
- package/src/lib/pages/not-authorized/not-authorized.component.html +5 -0
- package/src/lib/pages/not-authorized/not-authorized.component.ts +18 -0
- package/{lib/pages/not-found/index.d.ts → src/lib/pages/not-found/index.ts} +1 -1
- package/src/lib/pages/not-found/not-found.component.html +5 -0
- package/src/lib/pages/not-found/not-found.component.ts +18 -0
- package/src/lib/pages/not-found-page/not-found-page.component.html +6 -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.ts +16 -0
- package/src/lib/pipes/color/color.pipe.ts +24 -0
- package/{lib/pipes/index.d.ts → src/lib/pipes/index.ts} +3 -3
- package/src/lib/pipes/multiselect/multiselect-options.pipe.ts +61 -0
- package/src/lib/pipes/size/size.pipe.ts +20 -0
- package/src/sass/header.css +526 -0
- package/src/sass/header.scss +480 -0
- package/src/sass/main.scss +246 -0
- package/src/sass/scrollbar.scss +22 -0
- package/src/sass/sidemenu.css +205 -0
- package/src/sass/vendors/_bootstrap.scss +2 -0
- package/src/test-setup.ts +8 -0
- package/tsconfig.json +30 -0
- package/tsconfig.lib.json +17 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +16 -0
- package/esm2022/index.mjs +0 -2
- package/esm2022/lib/components/breadcrumb/breadcrumb.component.mjs +0 -34
- package/esm2022/lib/components/breadcrumb/index.mjs +0 -2
- package/esm2022/lib/components/button/button.component.mjs +0 -87
- package/esm2022/lib/components/button/index.mjs +0 -2
- package/esm2022/lib/components/calendar/calendar.component.mjs +0 -87
- package/esm2022/lib/components/calendar/index.mjs +0 -2
- package/esm2022/lib/components/checkbox/checkbox.component.mjs +0 -62
- package/esm2022/lib/components/checkbox/index.mjs +0 -2
- package/esm2022/lib/components/confirm-dialog/confirm-dialog.component.mjs +0 -72
- package/esm2022/lib/components/confirm-dialog/index.mjs +0 -2
- package/esm2022/lib/components/dropdown/dropdown-item.component.mjs +0 -14
- package/esm2022/lib/components/dropdown/dropdown.component.mjs +0 -280
- package/esm2022/lib/components/dropdown/dropdown.model.mjs +0 -2
- package/esm2022/lib/components/dropdown/index.mjs +0 -2
- package/esm2022/lib/components/errors/error.component.mjs +0 -34
- package/esm2022/lib/components/errors/index.mjs +0 -2
- package/esm2022/lib/components/form-field/form-field.component.mjs +0 -92
- package/esm2022/lib/components/form-field/index.mjs +0 -2
- package/esm2022/lib/components/header/header.component.mjs +0 -85
- package/esm2022/lib/components/header/index.mjs +0 -2
- package/esm2022/lib/components/index.mjs +0 -34
- package/esm2022/lib/components/input-group/index.mjs +0 -2
- package/esm2022/lib/components/input-group/input-group.component.mjs +0 -89
- package/esm2022/lib/components/loader/index.mjs +0 -2
- package/esm2022/lib/components/loader/loader.component.mjs +0 -34
- package/esm2022/lib/components/multiselect/index.mjs +0 -2
- package/esm2022/lib/components/multiselect/multiselect.component.mjs +0 -121
- package/esm2022/lib/components/number-input/index.mjs +0 -2
- package/esm2022/lib/components/number-input/number-input.component.mjs +0 -104
- 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 -94
- package/esm2022/lib/components/radiobutton/index.mjs +0 -2
- package/esm2022/lib/components/radiobutton/radiobutton.component.mjs +0 -50
- package/esm2022/lib/components/search/index.mjs +0 -2
- package/esm2022/lib/components/search/search.component.mjs +0 -40
- package/esm2022/lib/components/section/index.mjs +0 -2
- package/esm2022/lib/components/section/section.component.mjs +0 -70
- package/esm2022/lib/components/shared-components/action-button-group/action-button-group.component.mjs +0 -97
- package/esm2022/lib/components/shared-components/action-button-group/components/action-button/action-button.component.mjs +0 -64
- 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 -91
- package/esm2022/lib/components/shared-components/dynamic-component/dynamic-component.component.mjs +0 -42
- 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 -43
- 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 -43
- 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 -285
- 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 -53
- package/esm2022/lib/components/shared-components/filter/filter.component.mjs +0 -195
- 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 -98
- 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 -46
- 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 -48
- package/esm2022/lib/components/side-menu/side-menu.module.mjs +0 -73
- package/esm2022/lib/components/snackbar/index.mjs +0 -3
- package/esm2022/lib/components/snackbar/services/snackbar.service.mjs +0 -75
- package/esm2022/lib/components/snackbar/snackbar.component.mjs +0 -61
- package/esm2022/lib/components/snackbar/snackbar.model.mjs +0 -2
- package/esm2022/lib/components/stepper/index.mjs +0 -2
- package/esm2022/lib/components/stepper/stepper.component.mjs +0 -66
- package/esm2022/lib/components/switch/index.mjs +0 -2
- package/esm2022/lib/components/switch/switch.component.mjs +0 -45
- package/esm2022/lib/components/tab-view/index.mjs +0 -4
- package/esm2022/lib/components/tab-view/tab-view-item.component.mjs +0 -41
- package/esm2022/lib/components/tab-view/tab-view.component.mjs +0 -56
- package/esm2022/lib/components/tab-view/tab-view.module.mjs +0 -41
- package/esm2022/lib/components/table/index.mjs +0 -2
- package/esm2022/lib/components/table/table-pagination-info.component.mjs +0 -32
- package/esm2022/lib/components/table/table.component.mjs +0 -359
- package/esm2022/lib/components/table/table.model.mjs +0 -14
- package/esm2022/lib/components/textarea/index.mjs +0 -2
- package/esm2022/lib/components/textarea/textarea.component.mjs +0 -95
- package/esm2022/lib/components/textfield/index.mjs +0 -2
- package/esm2022/lib/components/textfield/textfield.component.mjs +0 -124
- package/esm2022/lib/components/tooltip/index.mjs +0 -2
- package/esm2022/lib/components/tooltip/tooltip.component.mjs +0 -66
- package/esm2022/lib/components/tristatecheckbox/index.mjs +0 -2
- package/esm2022/lib/components/tristatecheckbox/tristatecheckbox.component.mjs +0 -89
- package/esm2022/lib/icons.mjs +0 -35
- package/esm2022/lib/index.mjs +0 -6
- package/esm2022/lib/init.service.mjs +0 -17
- package/esm2022/lib/pages/index.mjs +0 -4
- package/esm2022/lib/pages/not-authenticated/index.mjs +0 -2
- package/esm2022/lib/pages/not-authenticated/not-authenticated.component.mjs +0 -17
- package/esm2022/lib/pages/not-authorized/index.mjs +0 -2
- package/esm2022/lib/pages/not-authorized/not-authorized.component.mjs +0 -20
- package/esm2022/lib/pages/not-found/index.mjs +0 -2
- package/esm2022/lib/pages/not-found/not-found.component.mjs +0 -20
- package/esm2022/lib/pipes/color/color.pipe.mjs +0 -27
- package/esm2022/lib/pipes/index.mjs +0 -4
- package/esm2022/lib/pipes/multiselect/multiselect-options.pipe.mjs +0 -52
- package/esm2022/lib/pipes/size/size.pipe.mjs +0 -23
- package/esm2022/verisoft-ui-govcz.mjs +0 -5
- package/fesm2022/verisoft-ui-govcz.mjs +0 -3742
- package/fesm2022/verisoft-ui-govcz.mjs.map +0 -1
- package/index.d.ts +0 -1
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +0 -7
- package/lib/components/button/button.component.d.ts +0 -26
- package/lib/components/button/index.d.ts +0 -1
- package/lib/components/calendar/calendar.component.d.ts +0 -23
- package/lib/components/calendar/index.d.ts +0 -1
- package/lib/components/checkbox/checkbox.component.d.ts +0 -15
- package/lib/components/checkbox/index.d.ts +0 -1
- package/lib/components/confirm-dialog/confirm-dialog.component.d.ts +0 -15
- package/lib/components/dropdown/dropdown-item.component.d.ts +0 -7
- package/lib/components/dropdown/dropdown.component.d.ts +0 -65
- package/lib/components/errors/error.component.d.ts +0 -14
- package/lib/components/errors/index.d.ts +0 -1
- package/lib/components/form-field/form-field.component.d.ts +0 -25
- package/lib/components/header/header.component.d.ts +0 -25
- package/lib/components/header/index.d.ts +0 -1
- package/lib/components/input-group/index.d.ts +0 -1
- package/lib/components/input-group/input-group.component.d.ts +0 -24
- package/lib/components/loader/index.d.ts +0 -1
- package/lib/components/loader/loader.component.d.ts +0 -8
- package/lib/components/multiselect/index.d.ts +0 -1
- package/lib/components/multiselect/multiselect.component.d.ts +0 -35
- package/lib/components/number-input/index.d.ts +0 -1
- package/lib/components/number-input/number-input.component.d.ts +0 -29
- package/lib/components/page-header/index.d.ts +0 -1
- package/lib/components/page-header/page-header.component.d.ts +0 -9
- package/lib/components/password/password.component.d.ts +0 -23
- package/lib/components/radiobutton/index.d.ts +0 -1
- package/lib/components/radiobutton/radiobutton.component.d.ts +0 -12
- package/lib/components/search/index.d.ts +0 -1
- package/lib/components/search/search.component.d.ts +0 -14
- package/lib/components/section/index.d.ts +0 -1
- package/lib/components/section/section.component.d.ts +0 -18
- 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 -15
- package/lib/components/side-menu/side-menu.module.d.ts +0 -12
- package/lib/components/snackbar/services/snackbar.service.d.ts +0 -18
- package/lib/components/snackbar/snackbar.component.d.ts +0 -18
- package/lib/components/stepper/index.d.ts +0 -1
- package/lib/components/stepper/stepper.component.d.ts +0 -20
- package/lib/components/switch/index.d.ts +0 -1
- package/lib/components/switch/switch.component.d.ts +0 -12
- package/lib/components/tab-view/tab-view-item.component.d.ts +0 -14
- package/lib/components/tab-view/tab-view.component.d.ts +0 -19
- package/lib/components/tab-view/tab-view.module.d.ts +0 -12
- package/lib/components/table/table-pagination-info.component.d.ts +0 -12
- package/lib/components/table/table.component.d.ts +0 -91
- package/lib/components/table/table.model.d.ts +0 -3
- package/lib/components/textarea/index.d.ts +0 -1
- package/lib/components/textarea/textarea.component.d.ts +0 -25
- package/lib/components/textfield/index.d.ts +0 -1
- package/lib/components/textfield/textfield.component.d.ts +0 -28
- package/lib/components/tooltip/index.d.ts +0 -1
- package/lib/components/tooltip/tooltip.component.d.ts +0 -18
- package/lib/components/tristatecheckbox/tristatecheckbox.component.d.ts +0 -27
- package/lib/icons.d.ts +0 -2
- package/lib/init.service.d.ts +0 -6
- package/lib/pages/not-authenticated/not-authenticated.component.d.ts +0 -5
- package/lib/pages/not-authorized/not-authorized.component.d.ts +0 -6
- package/lib/pages/not-found/not-found.component.d.ts +0 -6
- package/lib/pipes/color/color.pipe.d.ts +0 -8
- package/lib/pipes/multiselect/multiselect-options.pipe.d.ts +0 -9
- package/lib/pipes/size/size.pipe.d.ts +0 -8
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { CommonModule, NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
AfterViewInit,
|
|
4
|
+
ChangeDetectionStrategy,
|
|
5
|
+
ChangeDetectorRef,
|
|
6
|
+
Component,
|
|
7
|
+
ContentChild,
|
|
8
|
+
ContentChildren,
|
|
9
|
+
effect,
|
|
10
|
+
EventEmitter,
|
|
11
|
+
inject,
|
|
12
|
+
Input,
|
|
13
|
+
OnChanges,
|
|
14
|
+
Output,
|
|
15
|
+
QueryList,
|
|
16
|
+
SimpleChanges,
|
|
17
|
+
TemplateRef,
|
|
18
|
+
} from '@angular/core';
|
|
19
|
+
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
20
|
+
import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
|
|
21
|
+
import {
|
|
22
|
+
FormCheckboxEvent,
|
|
23
|
+
FormSelectEvent,
|
|
24
|
+
} from '@gov-design-system-ce/components';
|
|
25
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
26
|
+
import {
|
|
27
|
+
DEFAULT_SEARCH_LIMIT,
|
|
28
|
+
LazyLoadEvent,
|
|
29
|
+
multiSort,
|
|
30
|
+
Sort,
|
|
31
|
+
SortDirectionType,
|
|
32
|
+
} from '@verisoft/core';
|
|
33
|
+
import {
|
|
34
|
+
ColumnDefinition,
|
|
35
|
+
ColumnModel,
|
|
36
|
+
ColumnProvider,
|
|
37
|
+
DEFAULT_PAGINATION,
|
|
38
|
+
FieldSize,
|
|
39
|
+
FieldSizeType,
|
|
40
|
+
MAX_COLUMN_CHAR_COUNT,
|
|
41
|
+
RowModel,
|
|
42
|
+
TABLE_COLUMN_PROVIDER,
|
|
43
|
+
TABLE_COMPONENT_TOKEN,
|
|
44
|
+
TableCore,
|
|
45
|
+
TableSelectionMode,
|
|
46
|
+
TableService,
|
|
47
|
+
} from '@verisoft/ui-core';
|
|
48
|
+
import { Icons } from '../../icons';
|
|
49
|
+
import { GovSizePipe } from '../../pipes';
|
|
50
|
+
import { LoaderComponent } from '../loader';
|
|
51
|
+
import { TablePaginationInfoComponent } from './table-pagination-info.component';
|
|
52
|
+
import { getNextSortDirection } from './table.model';
|
|
53
|
+
|
|
54
|
+
@Component({
|
|
55
|
+
selector: 'v-table',
|
|
56
|
+
standalone: true,
|
|
57
|
+
imports: [
|
|
58
|
+
CommonModule,
|
|
59
|
+
RouterModule,
|
|
60
|
+
GovDesignSystemModule,
|
|
61
|
+
NgTemplateOutlet,
|
|
62
|
+
TranslateModule,
|
|
63
|
+
GovSizePipe,
|
|
64
|
+
LoaderComponent,
|
|
65
|
+
TablePaginationInfoComponent,
|
|
66
|
+
],
|
|
67
|
+
templateUrl: './table.component.html',
|
|
68
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
69
|
+
styleUrl: './table.component.scss',
|
|
70
|
+
providers: [
|
|
71
|
+
{
|
|
72
|
+
provide: TABLE_COMPONENT_TOKEN,
|
|
73
|
+
useExisting: TableComponent,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
})
|
|
77
|
+
export class TableComponent<T>
|
|
78
|
+
implements OnChanges, AfterViewInit, TableCore<T>
|
|
79
|
+
{
|
|
80
|
+
@ContentChildren(TABLE_COLUMN_PROVIDER)
|
|
81
|
+
viewColumns!: QueryList<ColumnProvider<T>>;
|
|
82
|
+
|
|
83
|
+
@ContentChild('rowDetail', { static: false })
|
|
84
|
+
rowDetailTemplate!: TemplateRef<{ $implicit: T }>;
|
|
85
|
+
|
|
86
|
+
@ContentChild('rowDetailButton', { static: false })
|
|
87
|
+
rowDetailButtonTemplate!: TemplateRef<{ $implicit: T }>;
|
|
88
|
+
|
|
89
|
+
@Input() sorters!: Sort[];
|
|
90
|
+
@Input() data!: T[];
|
|
91
|
+
@Input() total = 0;
|
|
92
|
+
@Input() filter: Partial<T> | undefined;
|
|
93
|
+
@Input() extraFilter: Partial<T> | undefined;
|
|
94
|
+
@Input() loading = false;
|
|
95
|
+
@Input() scrollable = true;
|
|
96
|
+
@Input() pageSize = DEFAULT_SEARCH_LIMIT;
|
|
97
|
+
@Input() currentPage = 1;
|
|
98
|
+
@Input() showPaginator = true;
|
|
99
|
+
@Input() userTableWrapper = true;
|
|
100
|
+
@Input() sortMultiple = false;
|
|
101
|
+
@Input() lazy = false;
|
|
102
|
+
@Input() selectionMode: 'single' | 'multiple' | undefined;
|
|
103
|
+
@Input() selection: T[] = [];
|
|
104
|
+
@Input() showPageSizePicker = true;
|
|
105
|
+
@Input() entityKey: string | undefined;
|
|
106
|
+
@Input() customRoute: string | undefined;
|
|
107
|
+
@Input() disableCustomClicks = false;
|
|
108
|
+
@Input() tableName?: string;
|
|
109
|
+
@Input() size: FieldSizeType = FieldSize.medium;
|
|
110
|
+
@Input() showActionButtons = false;
|
|
111
|
+
@Input() maximumColumnLength = MAX_COLUMN_CHAR_COUNT;
|
|
112
|
+
|
|
113
|
+
@Input()
|
|
114
|
+
set columns(value: ColumnDefinition<T>[]) {
|
|
115
|
+
this._columns = value;
|
|
116
|
+
this.updateColumnModels();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
get columns(): ColumnDefinition<T>[] {
|
|
120
|
+
return this._columns;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@Output() selectionChange = new EventEmitter<T[]>();
|
|
124
|
+
@Output() lazyLoad = new EventEmitter<LazyLoadEvent>();
|
|
125
|
+
@Output() download = new EventEmitter<RowModel<T>[]>();
|
|
126
|
+
@Output() delete = new EventEmitter<RowModel<T>[]>();
|
|
127
|
+
@Output() save = new EventEmitter<RowModel<T>[]>();
|
|
128
|
+
|
|
129
|
+
private readonly cdRef = inject(ChangeDetectorRef);
|
|
130
|
+
private readonly router = inject(Router);
|
|
131
|
+
private readonly route = inject(ActivatedRoute);
|
|
132
|
+
private readonly service = inject(TableService);
|
|
133
|
+
private _columns: ColumnDefinition<T, keyof T>[] = [];
|
|
134
|
+
|
|
135
|
+
tableColumns: ColumnModel<T>[] = [];
|
|
136
|
+
tableRows: RowModel<T>[] = [];
|
|
137
|
+
pageSizeOptions = DEFAULT_PAGINATION.map((x: number) => ({ value: x.toString() }));
|
|
138
|
+
allSelected = false;
|
|
139
|
+
icons = Icons;
|
|
140
|
+
|
|
141
|
+
get govPageSize() {
|
|
142
|
+
return this.pageSize.toString();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
get tableRowView(): RowModel<T>[] {
|
|
146
|
+
if (this.lazy) {
|
|
147
|
+
return this.tableRows;
|
|
148
|
+
} else {
|
|
149
|
+
const start = (this.currentPage - 1) * this.pageSize;
|
|
150
|
+
const end = start + this.pageSize;
|
|
151
|
+
return this.tableRows.slice(start, end);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
get selected(): RowModel<T>[] {
|
|
156
|
+
return this.tableRows.filter(r => r.selected);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
get selectedCount(): number {
|
|
160
|
+
return this.selected.length;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
constructor() {
|
|
164
|
+
effect(() => {
|
|
165
|
+
this.reactToSignals();
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
170
|
+
if (changes['data']) {
|
|
171
|
+
this.updateRowModels();
|
|
172
|
+
if (!this.lazy && this.data) {
|
|
173
|
+
this.total = this.data.length;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (changes['selection']) {
|
|
178
|
+
this.selectSelected();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (changes['filter']) {
|
|
182
|
+
this.updateFilter();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
ngAfterViewInit(): void {
|
|
187
|
+
if (this.viewColumns?.length) {
|
|
188
|
+
this.updateColumnModels();
|
|
189
|
+
this.cdRef.detectChanges();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
protected sortColumn(column: ColumnModel<T>) {
|
|
194
|
+
if (column.sortable) {
|
|
195
|
+
column.sortDirection = getNextSortDirection(
|
|
196
|
+
column.sortDirection,
|
|
197
|
+
this.sortMultiple
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
if (!this.sortMultiple) {
|
|
201
|
+
this.tableColumns
|
|
202
|
+
.filter((x) => x !== column)
|
|
203
|
+
.forEach((x) => {
|
|
204
|
+
x.sortDirection = undefined;
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const sorts: Sort[] = this.getSorts().map((x) => ({
|
|
209
|
+
field: 'row.' + x.field,
|
|
210
|
+
direction: x.direction,
|
|
211
|
+
}));
|
|
212
|
+
|
|
213
|
+
if (!this.lazy) {
|
|
214
|
+
this.tableRows = multiSort(this.tableRows, sorts);
|
|
215
|
+
} else {
|
|
216
|
+
this.fireLazyLoad();
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
protected changePage(event: { detail: { pagination: { currentPage: number } } }) {
|
|
222
|
+
this.currentPage = event.detail.pagination.currentPage;
|
|
223
|
+
this.fireLazyLoad();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
protected changePageSize(event: CustomEvent<FormSelectEvent>) {
|
|
227
|
+
this.pageSize = parseInt(event.detail.value);
|
|
228
|
+
this.currentPage = 1;
|
|
229
|
+
this.fireLazyLoad();
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
protected selectRow(row: RowModel<T>, event: MouseEvent) {
|
|
233
|
+
if (event.ctrlKey || event.metaKey) {
|
|
234
|
+
this.navigate(row, event);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (this.selectionMode === 'single') {
|
|
239
|
+
row.selected = !row.selected;
|
|
240
|
+
this.tableRows.forEach((x) => (x !== row ? (x.selected = false) : null));
|
|
241
|
+
this.fireSelectionChange();
|
|
242
|
+
} else if (this.selectionMode === 'multiple') {
|
|
243
|
+
row.selected = !row.selected;
|
|
244
|
+
this.fireSelectionChange();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
protected navigate(row: RowModel<T>, event: MouseEvent) {
|
|
249
|
+
if (this.disableCustomClicks) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
event.preventDefault();
|
|
254
|
+
const targetUrl = this.createUrl(row);
|
|
255
|
+
|
|
256
|
+
if (event.ctrlKey || event.metaKey) {
|
|
257
|
+
setTimeout(() => {
|
|
258
|
+
window.open(
|
|
259
|
+
this.router.serializeUrl(this.router.createUrlTree([targetUrl], { relativeTo: this.route })),
|
|
260
|
+
'_blank'
|
|
261
|
+
);
|
|
262
|
+
}, 0);
|
|
263
|
+
} else {
|
|
264
|
+
this.router.navigate([targetUrl], { relativeTo: this.route });
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
protected navigateNewWindow(row: RowModel<T>, event: MouseEvent) {
|
|
269
|
+
if (this.disableCustomClicks || event.button !== 1) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
event.preventDefault();
|
|
274
|
+
const targetUrl = this.createUrl(row);
|
|
275
|
+
|
|
276
|
+
window.open(this.router.serializeUrl(this.router.createUrlTree([targetUrl], { relativeTo: this.route })), '_blank');
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
protected toggleAll(event: CustomEvent<FormCheckboxEvent>) {
|
|
280
|
+
this.allSelected = event.detail.checked;
|
|
281
|
+
this.tableRows.forEach((x) => (x.selected = this.allSelected));
|
|
282
|
+
this.fireSelectionChange();
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
protected toggleDetail(row: RowModel<T>) {
|
|
286
|
+
row.expanded = !row.expanded;
|
|
287
|
+
this.cdRef.detectChanges();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
protected selectRowCheckbox(row: RowModel<T>, event: CustomEvent<FormCheckboxEvent>) {
|
|
291
|
+
row.selected = event.detail.checked;
|
|
292
|
+
this.allSelected = this.tableRows.every((x) => x.selected);
|
|
293
|
+
this.fireSelectionChange();
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
protected truncate(text: string): string {
|
|
297
|
+
return text.length > this.maximumColumnLength
|
|
298
|
+
? text.slice(0, this.maximumColumnLength) + '...'
|
|
299
|
+
: text;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
protected deselectAll() {
|
|
303
|
+
this.allSelected = false;
|
|
304
|
+
this.tableRows.forEach(x => (x.selected = this.allSelected));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
private createUrl(row: RowModel<T>): string {
|
|
308
|
+
if (row.customRoute) {
|
|
309
|
+
return row.customRoute;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return row.id.toString();
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
private reactToSignals(): void {
|
|
316
|
+
const reload = this.service.reload();
|
|
317
|
+
|
|
318
|
+
if (typeof reload === 'symbol') {
|
|
319
|
+
this.fireLazyLoad();
|
|
320
|
+
} else if (reload.name === this.tableName) {
|
|
321
|
+
this.fireLazyLoad()
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
this.deselectAll();
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
private updateColumnModels() {
|
|
328
|
+
const viewColumns = this.viewColumns
|
|
329
|
+
?.toArray()
|
|
330
|
+
.map((x) => x.getDefinition());
|
|
331
|
+
this.tableColumns = [...(this._columns ?? []), ...(viewColumns ?? [])].map(
|
|
332
|
+
(x) => new ColumnModel(x)
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
private updateRowModels(): void {
|
|
337
|
+
this.tableRows = (this.data ?? []).map(
|
|
338
|
+
(x) => new RowModel(x, false, false, undefined, undefined, undefined, this.customRoute, this.entityKey)
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
private fireSelectionChange() {
|
|
343
|
+
const selectedRows = this.tableRows
|
|
344
|
+
.filter((x) => x.selected)
|
|
345
|
+
.map((x) => x.row);
|
|
346
|
+
this.selectionChange.emit(selectedRows);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
private selectSelected() {
|
|
350
|
+
if (this.selection?.length && this.selectionMode) {
|
|
351
|
+
const selection =
|
|
352
|
+
this.selectionMode === TableSelectionMode.single
|
|
353
|
+
? [this.selection[0]]
|
|
354
|
+
: this.selection;
|
|
355
|
+
const selectionSet = new Set(selection);
|
|
356
|
+
this.tableRows.forEach((item) => {
|
|
357
|
+
item.selected = selectionSet.has(item.row);
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
this.allSelected = this.tableRows.every((x) => x.selected);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
private fireLazyLoad() {
|
|
365
|
+
const lazyLoadEvent: LazyLoadEvent = {
|
|
366
|
+
sort: this.getSorts(),
|
|
367
|
+
offset: (this.currentPage - 1) * this.pageSize,
|
|
368
|
+
limit: this.pageSize,
|
|
369
|
+
filter: this.filter,
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
this.lazyLoad.emit(lazyLoadEvent);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
private updateFilter() {
|
|
376
|
+
this.fireLazyLoad();
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
private getSorts(): Sort[] {
|
|
380
|
+
return this.tableColumns
|
|
381
|
+
.filter((x) => x.sortable && x.sortDirection)
|
|
382
|
+
.map((x) => ({
|
|
383
|
+
field: x.id,
|
|
384
|
+
direction: <SortDirectionType>x.sortDirection,
|
|
385
|
+
}));
|
|
386
|
+
}
|
|
387
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SortDirection, SortDirectionType } from '@verisoft/core';
|
|
2
|
+
|
|
3
|
+
export function getNextSortDirection(
|
|
4
|
+
sortDirection: SortDirectionType | undefined,
|
|
5
|
+
isNullable = false
|
|
6
|
+
): SortDirectionType | undefined {
|
|
7
|
+
return isNullable && sortDirection === SortDirection.desc
|
|
8
|
+
? undefined
|
|
9
|
+
: !sortDirection || sortDirection === SortDirection.desc
|
|
10
|
+
? SortDirection.asc
|
|
11
|
+
: SortDirection.desc;
|
|
12
|
+
}
|
|
13
|
+
export function createCustomRoute<T>(row: T, entityKey?: string, customRoute?: string) {
|
|
14
|
+
return customRoute && entityKey
|
|
15
|
+
? customRoute + (row as { [key: string]: string })[entityKey]
|
|
16
|
+
: undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SortDirection, SortDirectionType } from '@verisoft/core';
|
|
2
|
+
|
|
3
|
+
export function getNextSortDirection(
|
|
4
|
+
sortDirection: SortDirectionType | undefined,
|
|
5
|
+
isNullable = false
|
|
6
|
+
): SortDirectionType | undefined {
|
|
7
|
+
return isNullable && sortDirection === SortDirection.desc
|
|
8
|
+
? undefined
|
|
9
|
+
: !sortDirection || sortDirection === SortDirection.desc
|
|
10
|
+
? SortDirection.asc
|
|
11
|
+
: SortDirection.desc;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './textarea.component';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<gov-form-control class="mb-3">
|
|
2
|
+
@if (label) {
|
|
3
|
+
<gov-form-label
|
|
4
|
+
[slot]="labelSlot"
|
|
5
|
+
[size]="size | govSize"
|
|
6
|
+
>
|
|
7
|
+
{{ label | translate }}
|
|
8
|
+
</gov-form-label>
|
|
9
|
+
}
|
|
10
|
+
<gov-form-group>
|
|
11
|
+
<gov-form-input [type]="type"
|
|
12
|
+
[formControl]="formControl"
|
|
13
|
+
[minlength]="minlength"
|
|
14
|
+
[maxlength]="maxlength"
|
|
15
|
+
[size]='size | govSize'
|
|
16
|
+
[name]='name'
|
|
17
|
+
[role]='role'
|
|
18
|
+
[required]="required"
|
|
19
|
+
[readonly]="readonly"
|
|
20
|
+
[invalid]="ngControl?.errors ? true : false"
|
|
21
|
+
[multiline]="true"
|
|
22
|
+
[rows]="rows"
|
|
23
|
+
[cols]="cols"
|
|
24
|
+
>
|
|
25
|
+
@if (icon) {
|
|
26
|
+
<gov-icon
|
|
27
|
+
[name]="icon"
|
|
28
|
+
[slot]="iconPos === 'left' ? 'icon-start' : 'icon-end'"
|
|
29
|
+
/>
|
|
30
|
+
} @if (prefix) {
|
|
31
|
+
<p slot="prefix">
|
|
32
|
+
{{ prefix }}
|
|
33
|
+
</p>
|
|
34
|
+
} @if (sufix) {
|
|
35
|
+
<p slot="sufix">
|
|
36
|
+
{{ sufix }}
|
|
37
|
+
</p>
|
|
38
|
+
}
|
|
39
|
+
</gov-form-input>
|
|
40
|
+
</gov-form-group>
|
|
41
|
+
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
42
|
+
@if (message) {
|
|
43
|
+
<gov-form-message
|
|
44
|
+
[slot]="messageSlot"
|
|
45
|
+
color="neutral"
|
|
46
|
+
>
|
|
47
|
+
{{ message | translate }}
|
|
48
|
+
</gov-form-message>
|
|
49
|
+
}
|
|
50
|
+
</gov-form-control>
|
|
File without changes
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
Input,
|
|
6
|
+
Optional,
|
|
7
|
+
Self,
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import {
|
|
10
|
+
ControlValueAccessor,
|
|
11
|
+
NgControl,
|
|
12
|
+
ReactiveFormsModule,
|
|
13
|
+
} from '@angular/forms';
|
|
14
|
+
import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
|
|
15
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
16
|
+
import {
|
|
17
|
+
TextfieldCore,
|
|
18
|
+
FieldType,
|
|
19
|
+
BaseFormInputComponent,
|
|
20
|
+
FieldSizeType,
|
|
21
|
+
FieldSize,
|
|
22
|
+
IconPositionType,
|
|
23
|
+
IconPosition,
|
|
24
|
+
SlotPositionType,
|
|
25
|
+
SlotPosition,
|
|
26
|
+
TEXTAREA_COMPONENT_TOKEN,
|
|
27
|
+
} from '@verisoft/ui-core';
|
|
28
|
+
import { Icons } from '../../icons';
|
|
29
|
+
import { GovSizePipe } from '../../pipes';
|
|
30
|
+
import { ErrorComponent } from '../errors';
|
|
31
|
+
@Component({
|
|
32
|
+
selector: 'v-textarea',
|
|
33
|
+
standalone: true,
|
|
34
|
+
imports: [
|
|
35
|
+
CommonModule,
|
|
36
|
+
ReactiveFormsModule,
|
|
37
|
+
GovDesignSystemModule,
|
|
38
|
+
GovSizePipe,
|
|
39
|
+
ErrorComponent,
|
|
40
|
+
TranslateModule,
|
|
41
|
+
],
|
|
42
|
+
templateUrl: './textarea.component.html',
|
|
43
|
+
styleUrl: './textarea.component.scss',
|
|
44
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
45
|
+
providers: [
|
|
46
|
+
{
|
|
47
|
+
provide: TEXTAREA_COMPONENT_TOKEN,
|
|
48
|
+
useExisting: TextareaComponent,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
})
|
|
52
|
+
export class TextareaComponent
|
|
53
|
+
extends BaseFormInputComponent
|
|
54
|
+
implements ControlValueAccessor, TextfieldCore
|
|
55
|
+
{
|
|
56
|
+
@Input() floatLabel!: boolean;
|
|
57
|
+
@Input() type = FieldType.text;
|
|
58
|
+
@Input() minlength = 0;
|
|
59
|
+
@Input() maxlength = 524288;
|
|
60
|
+
@Input() prefix!: string;
|
|
61
|
+
@Input() sufix!: string;
|
|
62
|
+
@Input() message!: string;
|
|
63
|
+
@Input() name! : string;
|
|
64
|
+
@Input() role! : string;
|
|
65
|
+
@Input() size: FieldSizeType = FieldSize.medium;
|
|
66
|
+
@Input() icon!: string;
|
|
67
|
+
@Input() iconPos: IconPositionType = IconPosition.right;
|
|
68
|
+
@Input() labelSlot: SlotPositionType = SlotPosition.top;
|
|
69
|
+
@Input() messageSlot: SlotPositionType = SlotPosition.bottom;
|
|
70
|
+
@Input() rows = 0;
|
|
71
|
+
@Input() cols = 0;
|
|
72
|
+
|
|
73
|
+
icons = Icons;
|
|
74
|
+
|
|
75
|
+
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
76
|
+
super(ngControl);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './textfield.component';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<gov-form-control class="mb-3">
|
|
2
|
+
@if (label) {
|
|
3
|
+
<gov-form-label
|
|
4
|
+
[slot]="labelSlot"
|
|
5
|
+
[size]="size | govSize"
|
|
6
|
+
>
|
|
7
|
+
<div class="d-flex">
|
|
8
|
+
{{ label | translate }}
|
|
9
|
+
@if (tooltip) {
|
|
10
|
+
<v-tooltip [message]="tooltip | translate" />
|
|
11
|
+
}
|
|
12
|
+
</div>
|
|
13
|
+
</gov-form-label>
|
|
14
|
+
}
|
|
15
|
+
<gov-form-group>
|
|
16
|
+
<gov-form-input
|
|
17
|
+
[inputType]="type"
|
|
18
|
+
[formControl]="formControl"
|
|
19
|
+
[minlength]="minlength"
|
|
20
|
+
[maxlength]="maxlength"
|
|
21
|
+
[min]="min"
|
|
22
|
+
[max]="max"
|
|
23
|
+
[size]='size | govSize'
|
|
24
|
+
[name]='name'
|
|
25
|
+
[role]='role'
|
|
26
|
+
[required]="required"
|
|
27
|
+
[attr.disabled]="disabled ? 'true' : 'false'"
|
|
28
|
+
[invalid]="ngControl?.errors ? true : false"
|
|
29
|
+
[placeholder]="placeholder"
|
|
30
|
+
>
|
|
31
|
+
@if (icon) {
|
|
32
|
+
<gov-icon
|
|
33
|
+
[name]="icon"
|
|
34
|
+
[slot]="iconPos === 'left' ? 'icon-start' : 'icon-end'"
|
|
35
|
+
/>
|
|
36
|
+
} @if (prefix) {
|
|
37
|
+
<p slot="prefix">
|
|
38
|
+
{{ prefix }}
|
|
39
|
+
</p>
|
|
40
|
+
} @if (sufix) {
|
|
41
|
+
<p slot="sufix">
|
|
42
|
+
{{ sufix }}
|
|
43
|
+
</p>
|
|
44
|
+
}
|
|
45
|
+
</gov-form-input>
|
|
46
|
+
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
47
|
+
@if (message) {
|
|
48
|
+
<gov-form-message
|
|
49
|
+
[slot]="messageSlot"
|
|
50
|
+
color="neutral"
|
|
51
|
+
>
|
|
52
|
+
{{ message }}
|
|
53
|
+
</gov-form-message>
|
|
54
|
+
}
|
|
55
|
+
</gov-form-group>
|
|
56
|
+
</gov-form-control>
|
|
File without changes
|