@dropi/ui-components 1.0.12 → 1.0.13
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/README.md +55 -36
- package/dist/README.md +58 -38
- package/dist/components-source/accordion/accordion-item/accordion-item.component.d.ts +31 -0
- package/dist/components-source/accordion/accordion.component.d.ts +26 -0
- package/dist/components-source/alert/alert.component.d.ts +32 -0
- package/dist/components-source/alert-modal/alert-modal.component.d.ts +78 -0
- package/dist/components-source/alert-validation/alert-validation.component.d.ts +21 -0
- package/dist/components-source/badge/badge.component.d.ts +12 -0
- package/dist/components-source/beta-tag/beta-tag.component.d.ts +5 -0
- package/dist/components-source/breadcrumb/breadcrumb.component.d.ts +11 -0
- package/dist/components-source/card-product/card-product.component.d.ts +204 -0
- package/dist/components-source/card-section/card-section.component.d.ts +31 -0
- package/dist/components-source/checkbox-selection-list/checkbox-selection-list.component.d.ts +26 -0
- package/dist/components-source/city-selector/city-selector.component.d.ts +17 -0
- package/dist/components-source/color-picker/color-picker.component.d.ts +73 -0
- package/dist/components-source/confirm-dialog/confirm-dialog.component.d.ts +10 -0
- package/dist/components-source/country-flags/country-flags.component.d.ts +12 -0
- package/dist/components-source/date-picker/date-picker.component.d.ts +27 -0
- package/dist/components-source/date-picker-range/date-picker-range.component.d.ts +26 -0
- package/dist/components-source/dropi-avatars/dropi-avatars.component.d.ts +11 -0
- package/dist/components-source/dropi-badge/dropi-badge.component.d.ts +29 -0
- package/dist/components-source/dropi-banner-external/dropi-banner-external.component.d.ts +19 -0
- package/dist/components-source/dropi-breadcrumb/dropi-breadcrumb.component.d.ts +22 -0
- package/dist/components-source/dropi-card-checkbox/dropi-card-checkbox.component.d.ts +20 -0
- package/dist/components-source/dropi-carousel/dropi-carousel.component.d.ts +52 -0
- package/dist/components-source/dropi-checkbox/dropi-checkbox.component.d.ts +11 -0
- package/dist/components-source/dropi-chips/dropi-chips.component.d.ts +17 -0
- package/dist/components-source/dropi-country-selector/countries.data.d.ts +6 -0
- package/dist/components-source/dropi-country-selector/dropi-country-selector.component.d.ts +90 -0
- package/dist/components-source/dropi-drawer/dropi-drawer.component.d.ts +20 -0
- package/dist/components-source/dropi-dropdown/dropi-dropdown.component.d.ts +20 -0
- package/dist/components-source/dropi-favorite-button/dropi-favorite-button.component.d.ts +12 -0
- package/dist/components-source/dropi-file-upload/card-view/card-view.component.d.ts +19 -0
- package/dist/components-source/dropi-file-upload/drop-zone/drop-zone.component.d.ts +38 -0
- package/dist/components-source/dropi-file-upload/dropi-file-upload.component.d.ts +18 -0
- package/dist/components-source/dropi-file-upload/file-list/file-list.component.d.ts +39 -0
- package/dist/components-source/dropi-file-upload/grid-view/grid-view.component.d.ts +15 -0
- package/dist/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.d.ts +20 -0
- package/dist/components-source/dropi-image-overlay/dropi-image-overlay.component.d.ts +8 -0
- package/dist/components-source/dropi-languages-selector/dropi-languages-selector.component.d.ts +18 -0
- package/dist/components-source/dropi-logo/dropi-logo.component.d.ts +12 -0
- package/dist/components-source/dropi-modal/dropi-modal.component.d.ts +34 -0
- package/dist/components-source/dropi-modal/p-template.directive.d.ts +9 -0
- package/dist/components-source/dropi-navbar/dropi-navbar.component.d.ts +20 -0
- package/dist/components-source/dropi-paginator/dropi-paginator.component.d.ts +21 -0
- package/dist/components-source/dropi-phone-input/dropi-phone-input.component.d.ts +55 -0
- package/dist/components-source/dropi-radio-button/dropi-radio-button.component.d.ts +17 -0
- package/dist/components-source/dropi-search/dropi-search.component.d.ts +40 -0
- package/dist/components-source/dropi-select/dropi-select.component.d.ts +34 -0
- package/dist/components-source/dropi-skeleton/dropi-skeleton.component.d.ts +14 -0
- package/dist/components-source/dropi-steps/dropi-steps.component.d.ts +64 -0
- package/dist/components-source/dropi-switch/dropi-switch.component.d.ts +11 -0
- package/dist/components-source/dropi-table/dropi-table.component.d.ts +82 -0
- package/dist/components-source/dropi-tag/dropi-tag.component.d.ts +15 -0
- package/dist/components-source/dropi-text-area/dropi-text-area.component.d.ts +14 -0
- package/dist/components-source/dropi-tooltip/dropi-tooltip.component.d.ts +28 -0
- package/dist/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.d.ts +16 -0
- package/dist/components-source/empty/empty.component.d.ts +9 -0
- package/dist/components-source/empty-state/empty-state.component.d.ts +17 -0
- package/dist/components-source/file-upload-progress-bar/file-upload-progress-bar.component.d.ts +30 -0
- package/dist/components-source/index.d.ts +85 -0
- package/dist/components-source/input/input.component.d.ts +33 -0
- package/dist/components-source/lottie-loader/lottie-loader.component.d.ts +9 -0
- package/dist/components-source/otp-send-code/otp-send-code.component.d.ts +83 -0
- package/dist/components-source/radio-selection-list/radio-selection-list.component.d.ts +30 -0
- package/dist/components-source/read-more/read-more.component.d.ts +60 -0
- package/dist/components-source/sidebar/sidebar.component.d.ts +27 -0
- package/dist/components-source/simple-stepper/simple-stepper.component.d.ts +21 -0
- package/dist/components-source/spinner/spinner.component.d.ts +9 -0
- package/dist/components-source/tabs/tabs.component.d.ts +27 -0
- package/dist/components-source/tag-type-product/tag-type-product.component.d.ts +5 -0
- package/dist/components-source/toast/toast.component.d.ts +21 -0
- package/dist/components-source/toggle/input-toggle.component.d.ts +11 -0
- package/dist/components-source/tooltip/tooltip.component.d.ts +15 -0
- package/dist/components-source/vertical-steps/vertical-steps.component.d.ts +27 -0
- package/dist/esm2022/components-source/accordion/accordion-item/accordion-item.component.mjs +51 -0
- package/dist/esm2022/components-source/accordion/accordion.component.mjs +46 -0
- package/dist/esm2022/components-source/alert/alert.component.mjs +114 -0
- package/dist/esm2022/components-source/alert-modal/alert-modal.component.mjs +247 -0
- package/dist/esm2022/components-source/alert-validation/alert-validation.component.mjs +53 -0
- package/dist/esm2022/components-source/badge/badge.component.mjs +23 -0
- package/dist/esm2022/components-source/beta-tag/beta-tag.component.mjs +11 -0
- package/dist/esm2022/components-source/breadcrumb/breadcrumb.component.mjs +26 -0
- package/dist/esm2022/components-source/card-product/card-product.component.mjs +534 -0
- package/dist/esm2022/components-source/card-section/card-section.component.mjs +91 -0
- package/dist/esm2022/components-source/checkbox-selection-list/checkbox-selection-list.component.mjs +79 -0
- package/dist/esm2022/components-source/city-selector/city-selector.component.mjs +53 -0
- package/dist/esm2022/components-source/color-picker/color-picker.component.mjs +320 -0
- package/dist/esm2022/components-source/confirm-dialog/confirm-dialog.component.mjs +27 -0
- package/dist/esm2022/components-source/country-flags/country-flags.component.mjs +27 -0
- package/dist/esm2022/components-source/date-picker/date-picker.component.mjs +73 -0
- package/dist/esm2022/components-source/date-picker-range/date-picker-range.component.mjs +67 -0
- package/dist/esm2022/components-source/dropi-avatars/dropi-avatars.component.mjs +31 -0
- package/dist/esm2022/components-source/dropi-badge/dropi-badge.component.mjs +45 -0
- package/dist/esm2022/components-source/dropi-banner-external/dropi-banner-external.component.mjs +39 -0
- package/dist/esm2022/components-source/dropi-breadcrumb/dropi-breadcrumb.component.mjs +45 -0
- package/dist/esm2022/components-source/dropi-card-checkbox/dropi-card-checkbox.component.mjs +53 -0
- package/dist/esm2022/components-source/dropi-carousel/dropi-carousel.component.mjs +243 -0
- package/dist/esm2022/components-source/dropi-checkbox/dropi-checkbox.component.mjs +31 -0
- package/dist/esm2022/components-source/dropi-chips/dropi-chips.component.mjs +38 -0
- package/dist/esm2022/components-source/dropi-country-selector/countries.data.mjs +254 -0
- package/dist/esm2022/components-source/dropi-country-selector/dropi-country-selector.component.mjs +183 -0
- package/dist/esm2022/components-source/dropi-drawer/dropi-drawer.component.mjs +69 -0
- package/dist/esm2022/components-source/dropi-dropdown/dropi-dropdown.component.mjs +59 -0
- package/dist/esm2022/components-source/dropi-favorite-button/dropi-favorite-button.component.mjs +33 -0
- package/dist/esm2022/components-source/dropi-file-upload/card-view/card-view.component.mjs +47 -0
- package/dist/esm2022/components-source/dropi-file-upload/drop-zone/drop-zone.component.mjs +115 -0
- package/dist/esm2022/components-source/dropi-file-upload/dropi-file-upload.component.mjs +66 -0
- package/dist/esm2022/components-source/dropi-file-upload/file-list/file-list.component.mjs +95 -0
- package/dist/esm2022/components-source/dropi-file-upload/grid-view/grid-view.component.mjs +37 -0
- package/dist/esm2022/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.mjs +59 -0
- package/dist/esm2022/components-source/dropi-image-overlay/dropi-image-overlay.component.mjs +31 -0
- package/dist/esm2022/components-source/dropi-languages-selector/dropi-languages-selector.component.mjs +38 -0
- package/dist/esm2022/components-source/dropi-logo/dropi-logo.component.mjs +27 -0
- package/dist/esm2022/components-source/dropi-modal/dropi-modal.component.mjs +92 -0
- package/dist/esm2022/components-source/dropi-modal/p-template.directive.mjs +22 -0
- package/dist/esm2022/components-source/dropi-navbar/dropi-navbar.component.mjs +51 -0
- package/dist/esm2022/components-source/dropi-paginator/dropi-paginator.component.mjs +89 -0
- package/dist/esm2022/components-source/dropi-phone-input/dropi-phone-input.component.mjs +155 -0
- package/dist/esm2022/components-source/dropi-radio-button/dropi-radio-button.component.mjs +48 -0
- package/dist/esm2022/components-source/dropi-search/dropi-search.component.mjs +104 -0
- package/dist/esm2022/components-source/dropi-select/dropi-select.component.mjs +96 -0
- package/dist/esm2022/components-source/dropi-skeleton/dropi-skeleton.component.mjs +39 -0
- package/dist/esm2022/components-source/dropi-steps/dropi-steps.component.mjs +97 -0
- package/dist/esm2022/components-source/dropi-switch/dropi-switch.component.mjs +22 -0
- package/dist/esm2022/components-source/dropi-table/dropi-table.component.mjs +333 -0
- package/dist/esm2022/components-source/dropi-tag/dropi-tag.component.mjs +36 -0
- package/dist/esm2022/components-source/dropi-text-area/dropi-text-area.component.mjs +53 -0
- package/dist/esm2022/components-source/dropi-tooltip/dropi-tooltip.component.mjs +78 -0
- package/dist/esm2022/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.mjs +46 -0
- package/dist/esm2022/components-source/empty/empty.component.mjs +18 -0
- package/dist/esm2022/components-source/empty-state/empty-state.component.mjs +62 -0
- package/dist/esm2022/components-source/file-upload-progress-bar/file-upload-progress-bar.component.mjs +91 -0
- package/dist/esm2022/components-source/index.mjs +107 -0
- package/dist/esm2022/components-source/input/input.component.mjs +104 -0
- package/dist/esm2022/components-source/lottie-loader/lottie-loader.component.mjs +25 -0
- package/dist/esm2022/components-source/otp-send-code/otp-send-code.component.mjs +201 -0
- package/dist/esm2022/components-source/radio-selection-list/radio-selection-list.component.mjs +89 -0
- package/dist/esm2022/components-source/read-more/read-more.component.mjs +91 -0
- package/dist/esm2022/components-source/sidebar/sidebar.component.mjs +88 -0
- package/dist/esm2022/components-source/simple-stepper/simple-stepper.component.mjs +60 -0
- package/dist/esm2022/components-source/spinner/spinner.component.mjs +19 -0
- package/dist/esm2022/components-source/tabs/tabs.component.mjs +83 -0
- package/dist/esm2022/components-source/tag-type-product/tag-type-product.component.mjs +11 -0
- package/dist/esm2022/components-source/toast/toast.component.mjs +47 -0
- package/dist/esm2022/components-source/toggle/input-toggle.component.mjs +36 -0
- package/dist/esm2022/components-source/tooltip/tooltip.component.mjs +34 -0
- package/dist/esm2022/components-source/vertical-steps/vertical-steps.component.mjs +75 -0
- package/dist/esm2022/lib/elements-registry.mjs +343 -2
- package/dist/esm2022/utilities/interfaces/ui/dropi-table.interface.mjs +2 -0
- package/dist/esm2022/utilities/interfaces/ui/input-interface.mjs +2 -0
- package/dist/esm2022/utilities/interfaces/ui/select-interface.mjs +2 -0
- package/dist/esm2022/utilities/interfaces/ui/selection-list-interface.mjs +2 -0
- package/dist/esm2022/utilities/interfaces/ui/upload.model.mjs +5 -0
- package/dist/fesm2022/dropi-ui-components.mjs +5913 -2
- package/dist/fesm2022/dropi-ui-components.mjs.map +1 -1
- package/dist/utilities/interfaces/ui/dropi-table.interface.d.ts +45 -0
- package/dist/utilities/interfaces/ui/input-interface.d.ts +33 -0
- package/dist/utilities/interfaces/ui/select-interface.d.ts +8 -0
- package/dist/utilities/interfaces/ui/selection-list-interface.d.ts +24 -0
- package/dist/utilities/interfaces/ui/upload.model.d.ts +30 -0
- package/package.json +18 -6
- package/src/components-source/alert/alert.component.ts +12 -129
- package/src/components-source/alert-modal/alert-modal.component.ts +84 -114
- package/src/components-source/alert-validation/alert-validation.component.html +8 -0
- package/src/components-source/alert-validation/alert-validation.component.scss +225 -0
- package/src/components-source/alert-validation/alert-validation.component.ts +43 -0
- package/src/components-source/beta-tag/beta-tag.component.html +1 -0
- package/src/components-source/beta-tag/beta-tag.component.scss +26 -0
- package/src/components-source/beta-tag/beta-tag.component.ts +11 -0
- package/src/components-source/breadcrumb/breadcrumb.component.html +13 -5
- package/src/components-source/breadcrumb/breadcrumb.component.scss +8 -1
- package/src/components-source/breadcrumb/breadcrumb.component.spec.ts +26 -26
- package/src/components-source/breadcrumb/breadcrumb.component.ts +10 -12
- package/src/components-source/card-product/card-product.component.spec.ts +9 -9
- package/src/components-source/card-product/card-product.component.stories.ts +2 -2
- package/src/components-source/card-product/card-product.component.ts +294 -818
- package/src/components-source/card-section/card-section.component.html +7 -7
- package/src/components-source/card-section/card-section.component.ts +41 -15
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.ts +42 -179
- package/src/components-source/city-selector/city-selector.component.ts +37 -137
- package/src/components-source/confirm-dialog/confirm-dialog.component.html +26 -0
- package/src/components-source/confirm-dialog/confirm-dialog.component.scss +55 -0
- package/src/components-source/confirm-dialog/confirm-dialog.component.ts +22 -0
- package/src/components-source/country-flags/country-flags.component.ts +20 -12
- package/src/components-source/date-picker/date-picker.component.ts +32 -292
- package/src/components-source/date-picker-range/date-picker-range.component.html +15 -7
- package/src/components-source/date-picker-range/date-picker-range.component.ts +42 -235
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.ts +24 -185
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.html +21 -21
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.spec.ts +9 -9
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.ts +41 -23
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.stories.ts +12 -12
- package/src/components-source/dropi-chips/dropi-chips.component.ts +22 -87
- package/src/components-source/dropi-country-selector/countries.data.ts +256 -236
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.ts +37 -25
- package/src/components-source/dropi-drawer/dropi-drawer.component.ts +91 -78
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.ts +44 -47
- package/src/components-source/dropi-file-upload/card-view/card-view.component.ts +33 -53
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.ts +52 -123
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.ts +38 -294
- package/src/components-source/dropi-file-upload/file-list/file-list.component.ts +62 -43
- package/src/components-source/dropi-file-upload/grid-view/grid-view.component.ts +23 -22
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.scss +6 -2
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.ts +16 -71
- package/src/components-source/dropi-modal/dropi-modal.component.ts +56 -372
- package/src/components-source/dropi-navbar/dropi-navbar.component.ts +17 -17
- package/src/components-source/dropi-paginator/dropi-paginator.component.html +18 -7
- package/src/components-source/dropi-paginator/dropi-paginator.component.ts +40 -32
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.html +78 -79
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.ts +29 -85
- package/src/components-source/dropi-search/dropi-search.component.ts +59 -222
- package/src/components-source/dropi-select/dropi-select.component.html +82 -131
- package/src/components-source/dropi-select/dropi-select.component.ts +60 -423
- package/src/components-source/dropi-table/dropi-table.component.html +40 -23
- package/src/components-source/dropi-table/dropi-table.component.ts +130 -374
- package/src/components-source/dropi-tag/dropi-tag.component.ts +20 -90
- package/src/components-source/dropi-text-area/dropi-text-area.component.ts +22 -48
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.ts +40 -129
- package/src/components-source/empty/empty.component.html +3 -0
- package/src/components-source/empty/empty.component.scss +0 -0
- package/src/components-source/empty/empty.component.ts +16 -0
- package/src/components-source/empty-state/empty-state.component.ts +47 -19
- package/src/components-source/index.ts +82 -37
- package/src/components-source/input/input.component.html +79 -63
- package/src/components-source/input/input.component.ts +51 -97
- package/src/components-source/lottie-loader/lottie-loader.component.ts +13 -16
- package/src/components-source/otp-send-code/otp-send-code.component.ts +60 -528
- package/src/components-source/radio-selection-list/radio-selection-list.component.ts +36 -97
- package/src/components-source/sidebar/sidebar.component.spec.ts +11 -11
- package/src/components-source/sidebar/sidebar.component.stories.ts +3 -3
- package/src/components-source/sidebar/sidebar.component.ts +51 -47
- package/src/components-source/simple-stepper/simple-stepper.component.ts +20 -35
- package/src/components-source/spinner/spinner.component.html +6 -0
- package/src/components-source/spinner/spinner.component.scss +15 -0
- package/src/components-source/spinner/spinner.component.ts +17 -0
- package/src/components-source/tabs/tabs.component.spec.ts +8 -8
- package/src/components-source/tabs/tabs.component.stories.ts +5 -5
- package/src/components-source/tabs/tabs.component.ts +41 -83
- package/src/components-source/toast/toast.component.ts +40 -46
- package/src/components-source/toggle/input-toggle.component.html +34 -0
- package/src/components-source/toggle/input-toggle.component.scss +0 -0
- package/src/components-source/toggle/input-toggle.component.ts +27 -0
- package/src/components-source/toggle/inputToggleConfig.ts +11 -0
- package/src/components-source/tooltip/tooltip.component.html +22 -11
- package/src/components-source/tooltip/tooltip.component.ts +28 -13
- package/src/components-source/vertical-steps/vertical-steps.component.ts +16 -78
- package/src/lib/elements-registry.ts +413 -1
- package/src/lib/router-stub.ts +7 -0
- package/src/libreria work space.code-workspace +11 -8
- package/src/utilities/interfaces/ui/dropi-table.interface.ts +60 -0
- package/src/utilities/interfaces/ui/input-interface.ts +34 -0
- package/src/utilities/interfaces/ui/select-interface.ts +8 -0
- package/src/utilities/interfaces/ui/selection-list-interface.ts +15 -0
- package/src/utilities/interfaces/ui/upload.model.ts +41 -0
|
@@ -1,465 +1,102 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Component,
|
|
3
|
-
HostListener,
|
|
4
3
|
Input,
|
|
5
|
-
ElementRef,
|
|
6
4
|
Output,
|
|
7
5
|
EventEmitter,
|
|
8
6
|
OnInit,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { TemplatePortal } from '@angular/cdk/portal';
|
|
20
|
-
import {
|
|
21
|
-
OptionsSelect,
|
|
22
|
-
SelectProperties,
|
|
23
|
-
GroupedOptions,
|
|
24
|
-
} from '@app/utilities/interfaces/ui/select.interface';
|
|
25
|
-
import { IconComponent } from '../icon/icon.component';
|
|
26
|
-
import { DropiSearchComponent } from '../dropi-search/dropi-search.component';
|
|
27
|
-
import { DropiDropdownComponent } from '../dropi-dropdown/dropi-dropdown.component';
|
|
28
|
-
import { CountryFlagsComponent } from '../country-flags/country-flags.component';
|
|
29
|
-
import { animate, style, transition, trigger } from '@angular/animations';
|
|
7
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
8
|
+
} from "@angular/core";
|
|
9
|
+
import { CommonModule } from "@angular/common";
|
|
10
|
+
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
|
|
11
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
12
|
+
import { IconComponent } from "../icon/icon.component";
|
|
13
|
+
import { DropiSearchComponent } from "../dropi-search/dropi-search.component";
|
|
14
|
+
import { DropiDropdownComponent } from "../dropi-dropdown/dropi-dropdown.component";
|
|
15
|
+
import { CountryFlagsComponent } from "../country-flags/country-flags.component";
|
|
16
|
+
import { SelectProperties } from "../../utilities/interfaces/ui/select-interface";
|
|
30
17
|
|
|
31
18
|
@Component({
|
|
32
|
-
selector:
|
|
19
|
+
selector: "app-dropi-select",
|
|
33
20
|
standalone: true,
|
|
34
21
|
imports: [
|
|
35
22
|
CommonModule,
|
|
23
|
+
FormsModule,
|
|
24
|
+
ReactiveFormsModule,
|
|
36
25
|
TranslateModule,
|
|
37
26
|
IconComponent,
|
|
38
27
|
DropiSearchComponent,
|
|
39
28
|
DropiDropdownComponent,
|
|
40
|
-
OverlayModule,
|
|
41
29
|
CountryFlagsComponent,
|
|
42
30
|
],
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
trigger('selectAnimation', [
|
|
47
|
-
transition(':enter', [
|
|
48
|
-
style({ opacity: 0, transform: 'scaleY(0.95)' }),
|
|
49
|
-
animate(
|
|
50
|
-
'120ms ease-out',
|
|
51
|
-
style({ opacity: 1, transform: 'scaleY(1)' })
|
|
52
|
-
),
|
|
53
|
-
]),
|
|
54
|
-
transition(':leave', [
|
|
55
|
-
animate(
|
|
56
|
-
'80ms ease-in',
|
|
57
|
-
style({ opacity: 0, transform: 'scaleY(0.95)' })
|
|
58
|
-
),
|
|
59
|
-
]),
|
|
60
|
-
]),
|
|
61
|
-
],
|
|
31
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
32
|
+
templateUrl: "./dropi-select.component.html",
|
|
33
|
+
styleUrls: ["./dropi-select.component.scss"],
|
|
62
34
|
})
|
|
63
|
-
export class DropiSelectComponent implements OnInit
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
* - `label`: Texto descriptivo que se mostrará como etiqueta.
|
|
69
|
-
* - `placeholder`: Texto de ejemplo dentro del campo.
|
|
70
|
-
* - `dropdownType`: tipo de selector con borde o sin borde
|
|
71
|
-
* - `options`: opciones que se mostraran en el menu desplegable que tienen los tipos:
|
|
72
|
-
* - `id`: Indicativo con el cual se identifica la opcion
|
|
73
|
-
* - `label`: Texto descriptivo de la opción
|
|
74
|
-
* - `disabled`: Indicador de opción deshabilitada
|
|
75
|
-
*
|
|
76
|
-
* Propiedades opcionales:
|
|
77
|
-
* - `textHelper`: Texto de ayuda que se mostrará debajo del campo.
|
|
78
|
-
* - `hasError`: Indicador de error en el campo.
|
|
79
|
-
* - `errorText`: Texto a mostrar cuando hay error en el campo.
|
|
80
|
-
* - `showObligatory`: Indicador para mostrar si el campo es obligatorio.
|
|
81
|
-
*
|
|
82
|
-
* @type {SelectProperties}
|
|
83
|
-
*/
|
|
84
|
-
@Input() public selectProperties: SelectProperties;
|
|
85
|
-
/**
|
|
86
|
-
* Indica si se debe mostrar deshabilitiado el select.
|
|
87
|
-
*
|
|
88
|
-
* Valor por defecto: `false`.
|
|
89
|
-
*
|
|
90
|
-
* @type {boolean}
|
|
91
|
-
*/
|
|
35
|
+
export class DropiSelectComponent implements OnInit {
|
|
36
|
+
@Input() public label: string = "";
|
|
37
|
+
@Input() public options: any[] = [];
|
|
38
|
+
@Input() public selectProperties: SelectProperties = {};
|
|
39
|
+
@Input() public labelDrop: string = "";
|
|
92
40
|
@Input() public disabled: boolean = false;
|
|
93
41
|
|
|
94
|
-
|
|
95
|
-
* Habilita la visualización de banderas de países en las opciones del select.
|
|
96
|
-
* Requiere que cada opción tenga la propiedad `countryCode` definida.
|
|
97
|
-
*
|
|
98
|
-
* Valor por defecto: `false`.
|
|
99
|
-
*
|
|
100
|
-
* @type {boolean}
|
|
101
|
-
*/
|
|
102
|
-
@Input() public showCountryFlags: boolean = false;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* ID de la opción que debe estar seleccionada por defecto al inicializar el componente.
|
|
106
|
-
*
|
|
107
|
-
* @type {string | number}
|
|
108
|
-
*/
|
|
109
|
-
@Input() public defaultSelectedId: string | number;
|
|
110
|
-
|
|
111
|
-
@Output() private onClear: EventEmitter<any> = new EventEmitter();
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Evento que emite el valor del select cuando se selecciona
|
|
115
|
-
*
|
|
116
|
-
* @type {OptionsSelect}
|
|
117
|
-
*/
|
|
118
|
-
@Output() private onChangeSelect: EventEmitter<OptionsSelect> = new EventEmitter();
|
|
119
|
-
/**
|
|
120
|
-
* Indica si el select esta desplegado
|
|
121
|
-
*
|
|
122
|
-
* Valor por defecto: `false`.
|
|
123
|
-
*
|
|
124
|
-
* @type {boolean}
|
|
125
|
-
*/
|
|
42
|
+
public isOpen: boolean = false;
|
|
126
43
|
public isExpanded: boolean = false;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
*
|
|
130
|
-
* @type {OptionsSelect}
|
|
131
|
-
*/
|
|
132
|
-
@Input() public selectedOption: OptionsSelect | null = null;
|
|
133
|
-
public multiSelecOptions: OptionsSelect[] = [];
|
|
134
|
-
|
|
135
|
-
// Evento que se dispara cuando se llega al final del scroll
|
|
136
|
-
@Output() scrolledToEnd = new EventEmitter<void>();
|
|
137
|
-
@Output() onKeyEnter = new EventEmitter<any>();
|
|
138
|
-
|
|
139
|
-
public parametersDrop: { type: string; icon: string } = {
|
|
140
|
-
type: 'checkbox',
|
|
141
|
-
icon: '',
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
public searchEnabled: boolean = false;
|
|
145
|
-
public multiSelect: boolean = false;
|
|
146
|
-
public labelDrop: string = '';
|
|
147
|
-
private scrollDebounceTimeout: any;
|
|
148
|
-
private hasEmittedScrolledToEnd: boolean = false;
|
|
44
|
+
public selectedOption: any = null;
|
|
45
|
+
public searchValue: string = "";
|
|
149
46
|
public isGrouped: boolean = false;
|
|
150
|
-
public
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
public filteredOptions:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
@ViewChild(DropiDropdownComponent) private dropdownComp: DropiDropdownComponent;
|
|
158
|
-
@ViewChild('buttonSelect') buttonSelect: ElementRef;
|
|
159
|
-
|
|
160
|
-
private overlayRef: OverlayRef | null = null;
|
|
161
|
-
private allMultiSelectOptions: OptionsSelect[] = [];
|
|
162
|
-
|
|
163
|
-
constructor(
|
|
164
|
-
private elementRef: ElementRef,
|
|
165
|
-
private overlay: Overlay,
|
|
166
|
-
private viewContainerRef: ViewContainerRef,
|
|
167
|
-
) {}
|
|
47
|
+
public multiSelect: boolean = false;
|
|
48
|
+
public showCountryFlags: boolean = false;
|
|
49
|
+
public searchEnabled: boolean = false;
|
|
50
|
+
public searchTerm: string = "";
|
|
51
|
+
public filteredOptions: any[] = [];
|
|
52
|
+
public multiSelecOptions: any[] = [];
|
|
53
|
+
public parametersDrop: any = {};
|
|
168
54
|
|
|
169
|
-
ngOnInit() {
|
|
170
|
-
this.
|
|
171
|
-
this.getAllOptions();
|
|
55
|
+
ngOnInit(): void {
|
|
56
|
+
this.filteredOptions = this.options;
|
|
172
57
|
}
|
|
173
58
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
this.initializeSelectedProperties();
|
|
177
|
-
this.getAllOptions();
|
|
178
|
-
}
|
|
59
|
+
public showOptions(): void {
|
|
60
|
+
this.toggleDropdown();
|
|
179
61
|
}
|
|
180
62
|
|
|
181
|
-
|
|
182
|
-
if (this.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
this.closeOverlay();
|
|
63
|
+
public toggleDropdown(): void {
|
|
64
|
+
if (this.disabled) return;
|
|
65
|
+
this.isOpen = !this.isOpen;
|
|
66
|
+
this.isExpanded = this.isOpen;
|
|
186
67
|
}
|
|
187
68
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
this.
|
|
191
|
-
|
|
192
|
-
this.
|
|
193
|
-
|
|
194
|
-
// Establecer opción seleccionada por defecto si se proporciona defaultSelectedId
|
|
195
|
-
if (this.defaultSelectedId !== undefined && !this.selectedOption) {
|
|
196
|
-
const defaultOption = (this.selectProperties.options as OptionsSelect[]).find(
|
|
197
|
-
(opt) => opt.id === this.defaultSelectedId || opt.id.toString() === this.defaultSelectedId.toString()
|
|
198
|
-
);
|
|
199
|
-
if (defaultOption) {
|
|
200
|
-
this.selectedOption = defaultOption;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
69
|
+
public selectOption(option: any): void {
|
|
70
|
+
if (option.disabled) return;
|
|
71
|
+
this.selectedOption = option;
|
|
72
|
+
this.isOpen = false;
|
|
73
|
+
this.isExpanded = false;
|
|
203
74
|
}
|
|
204
75
|
|
|
205
|
-
|
|
206
|
-
this.
|
|
207
|
-
input.length > 0 && 'category' in input[0] && 'options' in input[0] ? true : false;
|
|
208
|
-
this.dataOptions = input;
|
|
209
|
-
this.filteredOptions = input;
|
|
76
|
+
public getSelectedCountryCode(): string {
|
|
77
|
+
return this.selectedOption?.countryCode || "";
|
|
210
78
|
}
|
|
211
79
|
|
|
212
|
-
filterOptions(
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
if (!term) {
|
|
217
|
-
// Si el campo está vacío, restauramos todas
|
|
218
|
-
this.multiSelecOptions = [...this.allMultiSelectOptions];
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
this.multiSelecOptions = this.allMultiSelectOptions.filter((opt) =>
|
|
223
|
-
opt.label.toLowerCase().includes(term),
|
|
224
|
-
);
|
|
80
|
+
public filterOptions(term: any): void {
|
|
81
|
+
const val = typeof term === "string" ? term : term?.target?.value || "";
|
|
82
|
+
if (!val.trim()) {
|
|
83
|
+
this.filteredOptions = this.options;
|
|
225
84
|
return;
|
|
226
85
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
opt.label.toLowerCase().includes(term),
|
|
232
|
-
);
|
|
233
|
-
} else {
|
|
234
|
-
const result: GroupedOptions[] = [];
|
|
235
|
-
|
|
236
|
-
for (const group of this.dataOptions as GroupedOptions[]) {
|
|
237
|
-
const filteredItems = group.options.filter((item) =>
|
|
238
|
-
item.label.toLowerCase().includes(term),
|
|
239
|
-
);
|
|
240
|
-
|
|
241
|
-
if (filteredItems.length > 0) {
|
|
242
|
-
result.push({
|
|
243
|
-
category: group.category,
|
|
244
|
-
options: filteredItems,
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
this.filteredOptions = result;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
@HostListener('document:click', ['$event'])
|
|
254
|
-
closeDropdown(event?: MouseEvent): void {
|
|
255
|
-
if (event && !this.elementRef.nativeElement.contains(event.target)) {
|
|
256
|
-
// Solo cerramos si no es parte del overlay (clicks fuera del componente)
|
|
257
|
-
const overlayContainer = document.querySelector('.dropi-select-overlay-panel');
|
|
258
|
-
const clickedInsideOverlay =
|
|
259
|
-
overlayContainer && overlayContainer.contains(event.target as Node);
|
|
260
|
-
|
|
261
|
-
if (!clickedInsideOverlay) {
|
|
262
|
-
this.isExpanded = false;
|
|
263
|
-
this.closeOverlay();
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
selectOption(option: OptionsSelect) {
|
|
269
|
-
// En modo multiSelect, no cerramos el overlay para permitir múltiples selecciones
|
|
270
|
-
if (!this.multiSelect) {
|
|
271
|
-
this.isExpanded = false;
|
|
272
|
-
this.closeOverlay();
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
this.selectedOption = option;
|
|
276
|
-
this.onChangeSelect.emit(option);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
showOptions() {
|
|
280
|
-
if (this.disabled) return;
|
|
281
|
-
this.isExpanded = !this.isExpanded;
|
|
282
|
-
|
|
283
|
-
if (this.isExpanded) {
|
|
284
|
-
this.openOverlay();
|
|
285
|
-
} else {
|
|
286
|
-
this.closeOverlay();
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Establece la opción seleccionada por su identificador.
|
|
292
|
-
*
|
|
293
|
-
* Busca en las opciones del select la que coincida con el identificador proporcionado
|
|
294
|
-
* y la establece como la opción seleccionada.
|
|
295
|
-
* Preferiblemente usar con ViewChild desde el componente padre.
|
|
296
|
-
*
|
|
297
|
-
* @param {number | string} id - El identificador de la opción a seleccionar.
|
|
298
|
-
*/
|
|
299
|
-
setPropertyById(id: number | string) {
|
|
300
|
-
this.selectedOption = this.selectProperties.options.find((propertie) => propertie.id === id);
|
|
301
|
-
this.onChangeSelect.emit(this.selectedOption);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Establece la opción seleccionada por su etiqueta.
|
|
306
|
-
*
|
|
307
|
-
* Busca en las opciones del select la que coincida con la etiqueta proporcionada
|
|
308
|
-
* y la establece como la opción seleccionada.
|
|
309
|
-
* Preferiblemente usar con ViewChild desde el componente padre.
|
|
310
|
-
*
|
|
311
|
-
* @param {string} label - La etiqueta de la opción a seleccionar.
|
|
312
|
-
*/
|
|
313
|
-
setPropertyByLabel(label: string) {
|
|
314
|
-
this.selectedOption = this.selectProperties.options.find(
|
|
315
|
-
(propertie) => propertie.label === label,
|
|
86
|
+
this.filteredOptions = this.options.filter(
|
|
87
|
+
(o) =>
|
|
88
|
+
o.label?.toLowerCase().includes(val.toLowerCase()) ||
|
|
89
|
+
o.name?.toLowerCase().includes(val.toLowerCase()),
|
|
316
90
|
);
|
|
317
|
-
this.onChangeSelect.emit(this.selectedOption);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
//virtual scroll
|
|
321
|
-
|
|
322
|
-
onScroll(event: any) {
|
|
323
|
-
clearTimeout(this.scrollDebounceTimeout);
|
|
324
|
-
this.scrollDebounceTimeout = setTimeout(() => {
|
|
325
|
-
const target = event.target;
|
|
326
|
-
const distanceFromBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
|
|
327
|
-
|
|
328
|
-
// Ajusta el umbral dinámicamente basado en el tamaño de la lista
|
|
329
|
-
this.dynamicThreshold = Math.min(50, target.clientHeight / 2);
|
|
330
|
-
|
|
331
|
-
// Check if the user has scrolled up
|
|
332
|
-
if (target.scrollTop < this.lastScrollTop) {
|
|
333
|
-
this.hasEmittedScrolledToEnd = false;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
this.lastScrollTop = target.scrollTop;
|
|
337
|
-
|
|
338
|
-
if (distanceFromBottom <= this.dynamicThreshold && !this.hasEmittedScrolledToEnd) {
|
|
339
|
-
this.scrolledToEnd.emit();
|
|
340
|
-
this.hasEmittedScrolledToEnd = true;
|
|
341
|
-
|
|
342
|
-
// Reset hasEmittedScrolledToEnd after a delay
|
|
343
|
-
setTimeout(() => {
|
|
344
|
-
this.hasEmittedScrolledToEnd = false;
|
|
345
|
-
}, 1000); // Adjust the delay as needed
|
|
346
|
-
}
|
|
347
|
-
}, 100); // tiempo de debounce
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
onKeyPress(event: KeyboardEvent) {
|
|
351
|
-
this.onKeyEnter.emit(event);
|
|
352
91
|
}
|
|
353
92
|
|
|
354
|
-
|
|
93
|
+
public onKeyPress(event: any): void {}
|
|
94
|
+
public onClearHanddle(): void {
|
|
355
95
|
this.selectedOption = null;
|
|
96
|
+
this.searchTerm = "";
|
|
97
|
+
this.filteredOptions = this.options;
|
|
356
98
|
}
|
|
357
99
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
if (this.multiSelect) {
|
|
362
|
-
this.multiSelecOptions = [...this.allMultiSelectOptions];
|
|
363
|
-
} else {
|
|
364
|
-
this.filteredOptions = this.dataOptions;
|
|
365
|
-
}
|
|
366
|
-
this.onClear.emit();
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
getAllOptions() {
|
|
370
|
-
this.multiSelecOptions = this.selectProperties.options;
|
|
371
|
-
this.allMultiSelectOptions = [...this.multiSelecOptions];
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
getValueDrop(e) {
|
|
375
|
-
this.selectedOption = e;
|
|
376
|
-
this.getLabelDrop(e);
|
|
377
|
-
this.onChangeSelect.emit(this.selectedOption);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
getLabelDrop(e) {
|
|
381
|
-
let label = '';
|
|
382
|
-
e.map((option) => {
|
|
383
|
-
label = label.length == 0 ? option.label : label + ', ' + option.label;
|
|
384
|
-
});
|
|
385
|
-
|
|
386
|
-
this.labelDrop = label;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
resetMultiSelect(label: string) {
|
|
390
|
-
this.selectedOption = null;
|
|
391
|
-
this.labelDrop = label;
|
|
392
|
-
this.multiSelecOptions = this.multiSelecOptions.map((opt) => ({ ...opt, checked: false }));
|
|
393
|
-
|
|
394
|
-
// Si el dropdown aún no existe, salimos sin error
|
|
395
|
-
if (!this.dropdownComp) return;
|
|
396
|
-
|
|
397
|
-
this.dropdownComp.resetChecks();
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
private openOverlay() {
|
|
401
|
-
if (this.overlayRef) {
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
const positionStrategy = this.overlay
|
|
406
|
-
.position()
|
|
407
|
-
.flexibleConnectedTo(this.buttonSelect.nativeElement)
|
|
408
|
-
.withPositions(this.getPositions())
|
|
409
|
-
.withPush(false);
|
|
410
|
-
|
|
411
|
-
this.overlayRef = this.overlay.create({
|
|
412
|
-
positionStrategy,
|
|
413
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
414
|
-
hasBackdrop: false,
|
|
415
|
-
width: this.elementRef.nativeElement.offsetWidth,
|
|
416
|
-
panelClass: 'dropi-select-overlay-panel', // Clase personalizada para estilos específicos
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
const portal = new TemplatePortal(this.dropdownTemplate, this.viewContainerRef);
|
|
420
|
-
this.overlayRef.attach(portal);
|
|
421
|
-
|
|
422
|
-
this.overlayRef.backdropClick().subscribe(() => this.closeOverlay());
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
private closeOverlay() {
|
|
426
|
-
if (this.overlayRef) {
|
|
427
|
-
this.overlayRef.dispose();
|
|
428
|
-
this.overlayRef = null;
|
|
429
|
-
}
|
|
430
|
-
// 🔹 Restaurar el listado si no hay término de búsqueda
|
|
431
|
-
if (this.multiSelect && !this.searchTerm.trim()) {
|
|
432
|
-
this.multiSelecOptions = [...this.allMultiSelectOptions];
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
// 🔹 Si sí había término, lo borramos visualmente también
|
|
436
|
-
this.searchTerm = '';
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
private getPositions(): ConnectedPosition[] {
|
|
440
|
-
return [
|
|
441
|
-
{
|
|
442
|
-
originX: 'start',
|
|
443
|
-
originY: 'bottom',
|
|
444
|
-
overlayX: 'start',
|
|
445
|
-
overlayY: 'top',
|
|
446
|
-
offsetY: 4,
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
originX: 'start',
|
|
450
|
-
originY: 'top',
|
|
451
|
-
overlayX: 'start',
|
|
452
|
-
overlayY: 'bottom',
|
|
453
|
-
offsetY: -4,
|
|
454
|
-
},
|
|
455
|
-
];
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* Obtiene el código de país de la opción actualmente seleccionada
|
|
460
|
-
* @returns El código ISO de 2 letras del país o undefined si no hay selección
|
|
461
|
-
*/
|
|
462
|
-
getSelectedCountryCode(): string | undefined {
|
|
463
|
-
return this.selectedOption?.countryCode;
|
|
464
|
-
}
|
|
100
|
+
public getValueDrop(event: any): void {}
|
|
101
|
+
public onScroll(event: any): void {}
|
|
465
102
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<ng-container *ngIf="dropiTableConfiguration">
|
|
2
2
|
<div class="table-container" *ngIf="!loading">
|
|
3
3
|
<div class="search-container" *ngIf="dropiTableConfiguration?.showSearch">
|
|
4
|
-
<h3 class="table-title">
|
|
4
|
+
<h3 class="table-title">
|
|
5
|
+
{{ dropiTableConfiguration?.title | translate }}
|
|
6
|
+
</h3>
|
|
5
7
|
<app-input
|
|
6
8
|
[inputProperties]="{
|
|
7
9
|
label: 'Search',
|
|
@@ -11,7 +13,10 @@
|
|
|
11
13
|
></app-input>
|
|
12
14
|
</div>
|
|
13
15
|
|
|
14
|
-
<div
|
|
16
|
+
<div
|
|
17
|
+
class="table-wrapper"
|
|
18
|
+
[ngClass]="hasActions ? 'width-actions' : 'width-no-actions'"
|
|
19
|
+
>
|
|
15
20
|
<table
|
|
16
21
|
class="custom-table"
|
|
17
22
|
[ngClass]="{
|
|
@@ -20,8 +25,13 @@
|
|
|
20
25
|
>
|
|
21
26
|
<thead>
|
|
22
27
|
<tr>
|
|
23
|
-
<th
|
|
24
|
-
|
|
28
|
+
<th
|
|
29
|
+
class="checkbox-header"
|
|
30
|
+
*ngIf="dropiTableConfiguration?.showCheckbox"
|
|
31
|
+
>
|
|
32
|
+
<app-dropi-checkbox
|
|
33
|
+
(onChange)="onSelectAll($event)"
|
|
34
|
+
></app-dropi-checkbox>
|
|
25
35
|
</th>
|
|
26
36
|
<th
|
|
27
37
|
*ngFor="let header of headers"
|
|
@@ -60,7 +70,7 @@
|
|
|
60
70
|
</div>
|
|
61
71
|
</th>
|
|
62
72
|
<th class="actions-header actions" *ngIf="hasActions">
|
|
63
|
-
{{
|
|
73
|
+
{{ "Actions" | translate }}
|
|
64
74
|
</th>
|
|
65
75
|
</tr>
|
|
66
76
|
</thead>
|
|
@@ -82,7 +92,7 @@
|
|
|
82
92
|
<div class="message-container">
|
|
83
93
|
<img src="\assets\utils\icon-not-found.png" alt="empty" />
|
|
84
94
|
<div class="message">
|
|
85
|
-
{{ dropiTableConfiguration.emptyMessage ??
|
|
95
|
+
{{ dropiTableConfiguration.emptyMessage ?? "no data" | translate }}
|
|
86
96
|
</div>
|
|
87
97
|
</div>
|
|
88
98
|
</div>
|
|
@@ -90,11 +100,13 @@
|
|
|
90
100
|
|
|
91
101
|
<div
|
|
92
102
|
class="pagination"
|
|
93
|
-
*ngIf="
|
|
103
|
+
*ngIf="
|
|
104
|
+
dropiTableConfiguration?.showPaginator && !hidePaginator && !loading
|
|
105
|
+
"
|
|
94
106
|
>
|
|
95
107
|
<div class="page-size-selector">
|
|
96
|
-
<label>{{
|
|
97
|
-
<select (change)="onChangePageSize($event
|
|
108
|
+
<label>{{ "Show" | translate }}</label>
|
|
109
|
+
<select (change)="onChangePageSize($event)">
|
|
98
110
|
<option
|
|
99
111
|
*ngFor="let size of dropiTableConfiguration?.pageSizeConfiguration"
|
|
100
112
|
[selected]="pageSize === size"
|
|
@@ -126,6 +138,7 @@
|
|
|
126
138
|
<td *ngIf="dropiTableConfiguration?.showCheckbox">
|
|
127
139
|
<app-dropi-checkbox
|
|
128
140
|
[disabled]="rowData?.disableCheckbox"
|
|
141
|
+
[checked]="rowData?.selected"
|
|
129
142
|
(onChange)="onSelectRow($event, rowData)"
|
|
130
143
|
></app-dropi-checkbox>
|
|
131
144
|
</td>
|
|
@@ -150,7 +163,8 @@
|
|
|
150
163
|
[ngClass]="{
|
|
151
164
|
'short-actions': dropiTableConfiguration?.showActionsPerRow
|
|
152
165
|
? rowData.actionsPerRow && rowData.actionsPerRow.length <= 3
|
|
153
|
-
: dropiTableConfiguration?.rowActions &&
|
|
166
|
+
: dropiTableConfiguration?.rowActions &&
|
|
167
|
+
dropiTableConfiguration.rowActions.length <= 3,
|
|
154
168
|
}"
|
|
155
169
|
*ngIf="hasActions"
|
|
156
170
|
>
|
|
@@ -166,14 +180,7 @@
|
|
|
166
180
|
>
|
|
167
181
|
<app-icon
|
|
168
182
|
class="action-icon"
|
|
169
|
-
(click)="
|
|
170
|
-
toggleActions(
|
|
171
|
-
level === 0 ? parentIndex : parentIndex,
|
|
172
|
-
actionsMenu,
|
|
173
|
-
level > 0,
|
|
174
|
-
childIndex
|
|
175
|
-
)
|
|
176
|
-
"
|
|
183
|
+
(click)="toggleActions(level === 0 ? parentIndex : parentIndex)"
|
|
177
184
|
name="Menu-dots-vertical"
|
|
178
185
|
width="24px"
|
|
179
186
|
height="24px"
|
|
@@ -277,8 +284,8 @@
|
|
|
277
284
|
|
|
278
285
|
<ng-container *ngSwitchCase="'date'">
|
|
279
286
|
<div class="date-label">
|
|
280
|
-
<span>{{ item.value | date:
|
|
281
|
-
<span>{{ item.value | date:
|
|
287
|
+
<span>{{ item.value | date: "dd-MM-yyyy" }} </span>
|
|
288
|
+
<span>{{ item.value | date: "hh:mm a" }} </span>
|
|
282
289
|
</div>
|
|
283
290
|
</ng-container>
|
|
284
291
|
|
|
@@ -320,7 +327,10 @@
|
|
|
320
327
|
</ng-container>
|
|
321
328
|
|
|
322
329
|
<ng-container *ngSwitchCase="'textIcon'">
|
|
323
|
-
<div
|
|
330
|
+
<div
|
|
331
|
+
class="text-icon-label"
|
|
332
|
+
[ngClass]="{ 'justify-center': !item?.value }"
|
|
333
|
+
>
|
|
324
334
|
<app-icon
|
|
325
335
|
[name]="item.icon"
|
|
326
336
|
width="24px"
|
|
@@ -334,10 +344,17 @@
|
|
|
334
344
|
<ng-container *ngSwitchCase="'status'">
|
|
335
345
|
<div class="status-label">
|
|
336
346
|
<div class="status-dot">
|
|
337
|
-
<div
|
|
347
|
+
<div
|
|
348
|
+
[ngClass]="
|
|
349
|
+
'dot dot-' +
|
|
350
|
+
(item.status ? item.status.toLowerCase() : 'unknown')
|
|
351
|
+
"
|
|
352
|
+
></div>
|
|
338
353
|
<span class="status-text">{{ item.status | translate }}</span>
|
|
339
354
|
</div>
|
|
340
|
-
<span *ngIf="item?.value" class="status-description">{{
|
|
355
|
+
<span *ngIf="item?.value" class="status-description">{{
|
|
356
|
+
item.value
|
|
357
|
+
}}</span>
|
|
341
358
|
</div>
|
|
342
359
|
</ng-container>
|
|
343
360
|
|