@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,250 +1,87 @@
|
|
|
1
|
-
import { CommonModule } from "@angular/common";
|
|
2
1
|
import {
|
|
3
|
-
ChangeDetectorRef,
|
|
4
2
|
Component,
|
|
5
|
-
ElementRef,
|
|
6
|
-
EventEmitter,
|
|
7
|
-
HostListener,
|
|
8
3
|
Input,
|
|
9
|
-
OnChanges,
|
|
10
|
-
OnInit,
|
|
11
4
|
Output,
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
EventEmitter,
|
|
6
|
+
OnInit,
|
|
7
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
14
8
|
} from "@angular/core";
|
|
15
|
-
import {
|
|
16
|
-
import { FormsModule } from "@angular/forms";
|
|
17
|
-
import { trigger, transition, style, animate } from "@angular/animations";
|
|
18
|
-
import { DropiCheckboxComponent } from "../dropi-checkbox/dropi-checkbox.component";
|
|
9
|
+
import { CommonModule } from "@angular/common";
|
|
10
|
+
import { FormsModule, ReactiveFormsModule, FormControl } from "@angular/forms";
|
|
19
11
|
import { TranslateModule } from "@ngx-translate/core";
|
|
20
|
-
import { ButtonComponent } from "../dropi-button/dropi-button.component";
|
|
21
12
|
|
|
22
13
|
@Component({
|
|
23
|
-
selector: "dropi-
|
|
14
|
+
selector: "app-dropi-search",
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [CommonModule, FormsModule, ReactiveFormsModule, TranslateModule],
|
|
17
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
24
18
|
templateUrl: "./dropi-search.component.html",
|
|
25
19
|
styleUrls: ["./dropi-search.component.scss"],
|
|
26
|
-
standalone: true,
|
|
27
|
-
imports: [
|
|
28
|
-
CommonModule,
|
|
29
|
-
IconComponent,
|
|
30
|
-
FormsModule,
|
|
31
|
-
DropiCheckboxComponent,
|
|
32
|
-
TranslateModule,
|
|
33
|
-
ButtonComponent,
|
|
34
|
-
],
|
|
35
|
-
animations: [
|
|
36
|
-
trigger("fade", [
|
|
37
|
-
transition(":enter", [
|
|
38
|
-
style({ opacity: 0 }),
|
|
39
|
-
animate("150ms ease-out", style({ opacity: 1 })),
|
|
40
|
-
]),
|
|
41
|
-
transition(":leave", [animate("150ms ease-in", style({ opacity: 0 }))]),
|
|
42
|
-
]),
|
|
43
|
-
trigger("slideToggle", [
|
|
44
|
-
transition(":enter", [
|
|
45
|
-
style({ height: "0", opacity: 0 }),
|
|
46
|
-
animate("150ms ease-out", style({ height: "*", opacity: 1 })),
|
|
47
|
-
]),
|
|
48
|
-
transition(":leave", [
|
|
49
|
-
animate("150ms ease-in", style({ height: "0", opacity: 0 })),
|
|
50
|
-
]),
|
|
51
|
-
]),
|
|
52
|
-
trigger("slideToggleReverse", [
|
|
53
|
-
transition(":enter", [
|
|
54
|
-
style({ transform: "translateY(100%)", opacity: 0 }),
|
|
55
|
-
animate(
|
|
56
|
-
"150ms ease-out",
|
|
57
|
-
style({ transform: "translateY(0)", opacity: 1 }),
|
|
58
|
-
),
|
|
59
|
-
]),
|
|
60
|
-
transition(":leave", [
|
|
61
|
-
animate(
|
|
62
|
-
"150ms ease-in",
|
|
63
|
-
style({ transform: "translateY(100%)", opacity: 0 }),
|
|
64
|
-
),
|
|
65
|
-
]),
|
|
66
|
-
]),
|
|
67
|
-
],
|
|
68
20
|
})
|
|
69
|
-
export class DropiSearchComponent implements OnInit
|
|
70
|
-
@Input() type:
|
|
71
|
-
|
|
72
|
-
@Input() placeholder: string = "";
|
|
73
|
-
@Input()
|
|
74
|
-
@Input()
|
|
75
|
-
@Input()
|
|
76
|
-
@Input()
|
|
77
|
-
@Input()
|
|
78
|
-
@Input()
|
|
79
|
-
@Input()
|
|
80
|
-
@Input()
|
|
81
|
-
|
|
82
|
-
@
|
|
83
|
-
@Output()
|
|
84
|
-
@Output()
|
|
85
|
-
@Output() onInput = new EventEmitter();
|
|
86
|
-
@Output() onKeyEnter = new EventEmitter();
|
|
87
|
-
@Output()
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
textDropButton = "";
|
|
101
|
-
|
|
102
|
-
constructor(private cdr: ChangeDetectorRef) {}
|
|
103
|
-
|
|
104
|
-
ngOnInit() {
|
|
105
|
-
this.selectInitialDropButton();
|
|
106
|
-
this.backgroundInput =
|
|
107
|
-
this.type !== "default-light" ? "var(--Gray-Gray-50)" : "--Neutral-White";
|
|
108
|
-
this.checkListModel(this.model);
|
|
109
|
-
this.initialOverlaySize = this.heightOverlay;
|
|
110
|
-
this.dataToSearchCache = this.dataToSearch;
|
|
111
|
-
this.selectStyle();
|
|
112
|
-
this.cdr.detectChanges();
|
|
21
|
+
export class DropiSearchComponent implements OnInit {
|
|
22
|
+
@Input() public type: string = "default";
|
|
23
|
+
@Input() public typeInput: string = "text";
|
|
24
|
+
@Input() public placeholder: string = "Search";
|
|
25
|
+
@Input() public textDropButton: string = "Search";
|
|
26
|
+
@Input() public textInput: string = "";
|
|
27
|
+
@Input() public showIcon: boolean = true;
|
|
28
|
+
@Input() public label: string = "";
|
|
29
|
+
@Input() public colorSearch: string = "inherit";
|
|
30
|
+
@Input() public overlaySelected: string = "";
|
|
31
|
+
@Input() public backgroundInput: string = "transparent";
|
|
32
|
+
@Input() public maxLength: number = 200;
|
|
33
|
+
|
|
34
|
+
@Output() public textInputChange = new EventEmitter<string>();
|
|
35
|
+
@Output() public onClick = new EventEmitter<any>();
|
|
36
|
+
@Output() public onSearch = new EventEmitter<string>();
|
|
37
|
+
@Output() public onInput = new EventEmitter<any>();
|
|
38
|
+
@Output() public onKeyEnter = new EventEmitter<any>();
|
|
39
|
+
@Output() public onClear = new EventEmitter<any>();
|
|
40
|
+
|
|
41
|
+
public searchControl = new FormControl("");
|
|
42
|
+
public isVisibleContent: boolean = false;
|
|
43
|
+
public isClickedDropButton: boolean = false;
|
|
44
|
+
public isFocus: boolean = false;
|
|
45
|
+
public dataToSearchCache: any[] = [];
|
|
46
|
+
public dataName: string = "name";
|
|
47
|
+
|
|
48
|
+
ngOnInit(): void {}
|
|
49
|
+
|
|
50
|
+
public onFocus(): void {
|
|
51
|
+
this.isFocus = true;
|
|
113
52
|
}
|
|
114
53
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
this.dataToSearchCache = [...changes["dataToSearch"].currentValue];
|
|
118
|
-
this.selectStyle(); // <-- para que el overlay se actualice también
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (changes["model"] && changes["model"].currentValue) {
|
|
122
|
-
setTimeout(() => {
|
|
123
|
-
this.checkListModel(this.model);
|
|
124
|
-
});
|
|
125
|
-
}
|
|
54
|
+
public onBlur(): void {
|
|
55
|
+
this.isFocus = false;
|
|
126
56
|
}
|
|
127
57
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
!this.containerRef.nativeElement.contains(event.target)
|
|
134
|
-
) {
|
|
135
|
-
this.isVisibleContent = false;
|
|
136
|
-
this.isFocus = false;
|
|
137
|
-
this.isClickedDropButton = false;
|
|
138
|
-
|
|
139
|
-
this.onBlur.emit();
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
changeText(e) {
|
|
144
|
-
this.colorSearch =
|
|
145
|
-
e.target.value.length > 0
|
|
146
|
-
? "var(--Gray-Gray-600)"
|
|
147
|
-
: "var(--Gray-Gray-500)";
|
|
148
|
-
if (this.type !== "dropdown-button") {
|
|
149
|
-
this.searchText(e.target.value);
|
|
150
|
-
}
|
|
151
|
-
this.onInput.emit(e.target.value);
|
|
58
|
+
public changeText(event: any): void {
|
|
59
|
+
const val = event.target.value;
|
|
60
|
+
this.textInput = val;
|
|
61
|
+
this.textInputChange.emit(val);
|
|
62
|
+
this.onInput.emit(event);
|
|
152
63
|
}
|
|
153
64
|
|
|
154
|
-
|
|
155
|
-
console.log("jkdjfkjdfjdfk");
|
|
156
|
-
console.log("e.target.value", e.target.value);
|
|
157
|
-
|
|
158
|
-
this.onKeyEnter.emit(e.target.value);
|
|
159
|
-
}
|
|
65
|
+
public onChangHandler(event: any): void {}
|
|
160
66
|
|
|
161
|
-
|
|
162
|
-
this.
|
|
67
|
+
public onEnter(event: any): void {
|
|
68
|
+
this.onKeyEnter.emit(event);
|
|
163
69
|
}
|
|
164
70
|
|
|
165
|
-
clearText() {
|
|
71
|
+
public clearText(): void {
|
|
166
72
|
this.textInput = "";
|
|
167
|
-
this.
|
|
168
|
-
this.onClear.emit();
|
|
73
|
+
this.textInputChange.emit("");
|
|
74
|
+
this.onClear.emit(null);
|
|
169
75
|
}
|
|
170
76
|
|
|
171
|
-
|
|
172
|
-
this.
|
|
173
|
-
|
|
174
|
-
// Espera a que se haga la animación (300ms) y luego muestra contenido
|
|
175
|
-
setTimeout(() => {
|
|
176
|
-
this.isVisibleContent = true;
|
|
177
|
-
}, 300);
|
|
178
|
-
} else {
|
|
179
|
-
this.isVisibleContent = false;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
selectStyle() {
|
|
184
|
-
this.overlaySelected =
|
|
185
|
-
this.dataToSearch?.length > 0 ? "content-found" : "content-no-found";
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
getOverlayStyles() {
|
|
189
|
-
if (this.position == "top") {
|
|
190
|
-
return {
|
|
191
|
-
"max-height": this.heightOverlay + "px",
|
|
192
|
-
position: "absolute",
|
|
193
|
-
bottom: "calc(12px + 100%)" /* Se posiciona justo encima del input */,
|
|
194
|
-
left: 0,
|
|
195
|
-
width: "100%",
|
|
196
|
-
};
|
|
197
|
-
} else {
|
|
198
|
-
return {
|
|
199
|
-
"max-height": this.heightOverlay + "px",
|
|
200
|
-
position: "absolute",
|
|
201
|
-
top: "calc(12px + 100%)" /* Se posiciona justo encima del input */,
|
|
202
|
-
left: 0,
|
|
203
|
-
width: "100%",
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
checkListModel(data: any[]) {
|
|
208
|
-
this.dataToSearchCache = this.dataToSearchCache.map((cache) => {
|
|
209
|
-
const isSelected = this.model.some((mod: any) => mod.id === cache.id);
|
|
210
|
-
return { ...cache, isChecked: isSelected };
|
|
211
|
-
});
|
|
77
|
+
public handleClickDropButton(event: any): void {
|
|
78
|
+
this.isClickedDropButton = !this.isClickedDropButton;
|
|
79
|
+
this.onClick.emit(event);
|
|
212
80
|
}
|
|
213
81
|
|
|
214
|
-
checkingList(
|
|
215
|
-
data.isChecked = e;
|
|
216
|
-
|
|
217
|
-
const existsData = this.model.some(
|
|
218
|
-
(datModel: any) => datModel.id === data.id,
|
|
219
|
-
);
|
|
220
|
-
|
|
221
|
-
if (e === true && !existsData) {
|
|
222
|
-
this.model = [...this.model, data]; // crea una nueva referencia
|
|
223
|
-
} else if (e === false && existsData) {
|
|
224
|
-
this.model = this.model.filter(
|
|
225
|
-
(datModel: any) => datModel.id !== data.id,
|
|
226
|
-
); //también crea nueva referencia
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
this.modelChange.emit(this.model);
|
|
230
|
-
|
|
231
|
-
this.checkListModel(this.model); // <--- esto asegura el reflejo visual
|
|
232
|
-
}
|
|
233
|
-
searchText(text) {
|
|
234
|
-
this.dataToSearchCache = this.dataToSearch.filter((data: any) => {
|
|
235
|
-
return data[this.dataName].toLowerCase().includes(text.toLowerCase());
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
this.checkListModel(this.model);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
handleClickDropButton(event) {
|
|
242
|
-
this.isClickedDropButton = true;
|
|
243
|
-
}
|
|
82
|
+
public checkingList(event: any, data: any): void {}
|
|
244
83
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.textDropButton = this.dataToSearchCache[0][this.dataName];
|
|
248
|
-
}
|
|
84
|
+
public getOverlayStyles(): any {
|
|
85
|
+
return {};
|
|
249
86
|
}
|
|
250
87
|
}
|
|
@@ -1,158 +1,109 @@
|
|
|
1
|
-
<div class="
|
|
2
|
-
<label
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<div class="dropi-select-container">
|
|
2
|
+
<label *ngIf="label" class="select-label">{{ label | translate }}</label>
|
|
3
|
+
|
|
4
|
+
<div
|
|
5
|
+
class="select-trigger"
|
|
6
|
+
[ngClass]="{ 'is-open': isOpen, 'has-error': selectProperties?.hasError }"
|
|
7
|
+
(click)="toggleDropdown()"
|
|
7
8
|
>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'select-completed': !!selectedOption,
|
|
21
|
-
'select-button-error':
|
|
22
|
-
selectProperties?.hasError ||
|
|
23
|
-
(selectProperties?.formControl?.invalid &&
|
|
24
|
-
(selectProperties?.formControl?.touched || selectProperties?.formControl?.dirty)),
|
|
25
|
-
'no-border': selectProperties?.dropdownType,
|
|
26
|
-
'Label-L': selectProperties?.dropdownType,
|
|
27
|
-
'with-flag': showCountryFlags && getSelectedCountryCode()
|
|
28
|
-
}"
|
|
29
|
-
(click)="showOptions()"
|
|
30
|
-
>
|
|
31
|
-
<div class="button-content">
|
|
32
|
-
<app-country-flags
|
|
33
|
-
*ngIf="showCountryFlags && getSelectedCountryCode()"
|
|
34
|
-
[country]="getSelectedCountryCode()"
|
|
35
|
-
[style]="'rectangle'"
|
|
36
|
-
></app-country-flags>
|
|
37
|
-
<div class="elipsis">
|
|
9
|
+
<div class="selected-value">
|
|
10
|
+
<ng-container *ngIf="selectedOption; else placeholderTpl">
|
|
11
|
+
<app-icon
|
|
12
|
+
*ngIf="showCountryFlags && selectedOption.countryCode"
|
|
13
|
+
[name]="selectedOption.countryCode"
|
|
14
|
+
></app-icon>
|
|
15
|
+
<span>{{
|
|
16
|
+
selectedOption.label || selectedOption.name | translate
|
|
17
|
+
}}</span>
|
|
18
|
+
</ng-container>
|
|
19
|
+
<ng-template #placeholderTpl>
|
|
20
|
+
<span class="placeholder">
|
|
38
21
|
{{
|
|
39
|
-
(
|
|
40
|
-
? showCountryFlags && selectedOption.shortLabel
|
|
41
|
-
? selectedOption.shortLabel
|
|
42
|
-
: selectedOption.label
|
|
43
|
-
: selectProperties.placeholder
|
|
44
|
-
) | translate
|
|
22
|
+
(labelDrop ? labelDrop : selectProperties?.placeholder) | translate
|
|
45
23
|
}}
|
|
46
|
-
</
|
|
47
|
-
</
|
|
48
|
-
|
|
49
|
-
[name]="isExpanded ? 'Dropdown-up' : 'Dropdown-down'"
|
|
50
|
-
width="20px"
|
|
51
|
-
height="20px"
|
|
52
|
-
color="Gray-Gray-400"
|
|
53
|
-
></app-icon>
|
|
54
|
-
</button>
|
|
24
|
+
</span>
|
|
25
|
+
</ng-template>
|
|
26
|
+
</div>
|
|
55
27
|
|
|
56
|
-
<
|
|
57
|
-
*ngIf="multiSelect"
|
|
58
|
-
#buttonSelect
|
|
59
|
-
type="button"
|
|
60
|
-
class="select-button"
|
|
61
|
-
[disabled]="disabled"
|
|
62
|
-
[ngClass]="{
|
|
63
|
-
'select-completed': !!selectedOption
|
|
64
|
-
}"
|
|
65
|
-
(click)="showOptions()"
|
|
66
|
-
>
|
|
67
|
-
<div class="elipsis">
|
|
68
|
-
{{ (labelDrop ? labelDrop : selectProperties.placeholder) | translate }}
|
|
69
|
-
</div>
|
|
28
|
+
<div class="icons">
|
|
70
29
|
<app-icon
|
|
71
30
|
[name]="isExpanded ? 'Dropdown-up' : 'Dropdown-down'"
|
|
72
31
|
[width]="selectProperties?.dropdownType ? '24px' : '20px'"
|
|
73
32
|
[height]="selectProperties?.dropdownType ? '24px' : '20px'"
|
|
74
|
-
[color]="
|
|
75
|
-
disabled
|
|
76
|
-
? 'Gray-Gray-300'
|
|
77
|
-
: selectProperties?.dropdownType
|
|
78
|
-
? 'Gray-Gray-600'
|
|
79
|
-
: 'Gray-Gray-500'
|
|
80
|
-
"
|
|
81
33
|
></app-icon>
|
|
82
|
-
</
|
|
34
|
+
</div>
|
|
83
35
|
</div>
|
|
84
36
|
|
|
85
|
-
<div *ngIf="selectProperties
|
|
37
|
+
<div *ngIf="selectProperties?.textHelper" class="select-helper">
|
|
86
38
|
<span>{{ selectProperties.textHelper | translate }}</span>
|
|
87
39
|
</div>
|
|
88
40
|
|
|
89
|
-
<div *ngIf="selectProperties
|
|
90
|
-
<app-icon name="Warning-circle" width="12px" height="12px" color="Error-Error-500"></app-icon>
|
|
41
|
+
<div *ngIf="selectProperties?.hasError" class="select-helper-error">
|
|
91
42
|
<span>{{ selectProperties.errorText | translate }}</span>
|
|
92
43
|
</div>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
<!-- Template para el dropdown que se renderizará en el overlay -->
|
|
96
|
-
<ng-template #dropdownTemplate>
|
|
97
|
-
<ul @selectAnimation class="select-dropdown-overlay" (scroll)="onScroll($event)">
|
|
98
|
-
<ng-container *ngIf="searchEnabled">
|
|
99
|
-
<li class="sticky-search">
|
|
100
|
-
<app-dropi-search
|
|
101
|
-
[placeholder]="selectProperties.placeHolderSearch || 'Buscar'"
|
|
102
|
-
[(textInput)]="searchTerm"
|
|
103
|
-
(onInput)="filterOptions($event)"
|
|
104
|
-
(onKeyEnter)="onKeyPress($event)"
|
|
105
|
-
(onClear)="onClearHanddle()"
|
|
106
|
-
></app-dropi-search>
|
|
107
|
-
</li>
|
|
108
|
-
</ng-container>
|
|
109
44
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<li class="option-group-title Body-M-Medium">{{ group.category | translate }}</li>
|
|
45
|
+
<div
|
|
46
|
+
class="select-dropdown-overlay"
|
|
47
|
+
*ngIf="isOpen"
|
|
48
|
+
(scroll)="onScroll($event)"
|
|
49
|
+
>
|
|
50
|
+
<div class="search-container" *ngIf="searchEnabled">
|
|
51
|
+
<app-dropi-search
|
|
52
|
+
[placeholder]="selectProperties?.placeHolderSearch || 'Buscar'"
|
|
53
|
+
[(ngModel)]="searchTerm"
|
|
54
|
+
(onInput)="filterOptions($event)"
|
|
55
|
+
(onKeyEnter)="onKeyPress($event)"
|
|
56
|
+
(onClear)="onClearHanddle()"
|
|
57
|
+
></app-dropi-search>
|
|
58
|
+
</div>
|
|
125
59
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
60
|
+
<ul class="options-list">
|
|
61
|
+
<ng-container *ngIf="isGrouped">
|
|
62
|
+
<li *ngFor="let group of filteredOptions" class="option-group">
|
|
63
|
+
<span class="group-label">{{ group.label | translate }}</span>
|
|
64
|
+
<ul>
|
|
65
|
+
<li
|
|
66
|
+
*ngFor="let option of group.items"
|
|
67
|
+
(click)="selectOption(option)"
|
|
68
|
+
class="option-item"
|
|
69
|
+
>
|
|
70
|
+
{{ option.label | translate }}
|
|
71
|
+
</li>
|
|
72
|
+
</ul>
|
|
134
73
|
</li>
|
|
135
74
|
</ng-container>
|
|
136
|
-
</ng-container>
|
|
137
75
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
class="option"
|
|
142
|
-
[ngClass]="{
|
|
76
|
+
<ng-container *ngIf="!isGrouped && !multiSelect">
|
|
77
|
+
<li
|
|
78
|
+
*ngFor="let option of filteredOptions"
|
|
79
|
+
class="option-item"
|
|
80
|
+
[ngClass]="{
|
|
81
|
+
'option-with-flag': showCountryFlags && option.countryCode,
|
|
82
|
+
}"
|
|
143
83
|
(click)="selectOption(option)"
|
|
144
|
-
[disabled]="option.disabled"
|
|
145
84
|
>
|
|
146
85
|
<app-country-flags
|
|
147
86
|
*ngIf="showCountryFlags && option.countryCode"
|
|
148
87
|
[country]="option.countryCode"
|
|
149
|
-
[style]="'rectangle'"
|
|
150
88
|
></app-country-flags>
|
|
151
|
-
<span>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
</
|
|
89
|
+
<span>
|
|
90
|
+
{{
|
|
91
|
+
(showCountryFlags && option.shortLabel
|
|
92
|
+
? option.shortLabel
|
|
93
|
+
: option.label || option.name
|
|
94
|
+
) | translate
|
|
95
|
+
}}
|
|
96
|
+
</span>
|
|
97
|
+
</li>
|
|
98
|
+
</ng-container>
|
|
99
|
+
|
|
100
|
+
<ng-container *ngIf="multiSelect">
|
|
101
|
+
<app-dropi-dropdown
|
|
102
|
+
[options]="multiSelecOptions"
|
|
103
|
+
[parameters]="parametersDrop"
|
|
104
|
+
(modelChange)="getValueDrop($event)"
|
|
105
|
+
></app-dropi-dropdown>
|
|
106
|
+
</ng-container>
|
|
107
|
+
</ul>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|