@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
|
@@ -7,23 +7,30 @@ import {
|
|
|
7
7
|
EventEmitter,
|
|
8
8
|
ChangeDetectorRef,
|
|
9
9
|
ViewChild,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
10
|
+
Inject,
|
|
11
|
+
} from "@angular/core";
|
|
12
|
+
import { CommonModule } from "@angular/common";
|
|
13
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
14
|
+
|
|
15
|
+
type OptionsCountrySelect = any;
|
|
16
|
+
type SelectProperties = any;
|
|
17
|
+
|
|
18
|
+
import { IconComponent } from "../icon/icon.component";
|
|
19
|
+
import { COUNTRIES } from "./countries.data";
|
|
20
|
+
import { FormsModule, FormControl, ReactiveFormsModule } from "@angular/forms";
|
|
20
21
|
|
|
21
22
|
@Component({
|
|
22
|
-
selector:
|
|
23
|
+
selector: "app-dropi-country-selector",
|
|
23
24
|
standalone: true,
|
|
24
|
-
imports: [
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
imports: [
|
|
26
|
+
CommonModule,
|
|
27
|
+
TranslateModule,
|
|
28
|
+
IconComponent,
|
|
29
|
+
FormsModule,
|
|
30
|
+
ReactiveFormsModule,
|
|
31
|
+
],
|
|
32
|
+
templateUrl: "./dropi-country-selector.component.html",
|
|
33
|
+
styleUrls: ["./dropi-country-selector.component.scss"],
|
|
27
34
|
})
|
|
28
35
|
export class DropiCountrySelectorComponent {
|
|
29
36
|
/**
|
|
@@ -65,19 +72,22 @@ export class DropiCountrySelectorComponent {
|
|
|
65
72
|
*
|
|
66
73
|
* @type {OptionsSelect}
|
|
67
74
|
*/
|
|
68
|
-
@Output() onChangeSelect: EventEmitter<OptionsCountrySelect> =
|
|
75
|
+
@Output() onChangeSelect: EventEmitter<OptionsCountrySelect> =
|
|
76
|
+
new EventEmitter();
|
|
69
77
|
|
|
70
78
|
/**
|
|
71
79
|
* Setear el pais del modelo inicial, debes enviarle el code del pais.
|
|
72
80
|
*
|
|
73
81
|
* @type {string}
|
|
74
82
|
*/
|
|
75
|
-
private _currentSelection =
|
|
83
|
+
private _currentSelection = "";
|
|
76
84
|
|
|
77
85
|
@Input() set currentSelection(value: string) {
|
|
78
86
|
this._currentSelection = value;
|
|
79
87
|
if (value) {
|
|
80
|
-
const found = this.countries.find(
|
|
88
|
+
const found = this.countries.find(
|
|
89
|
+
(propertie) => propertie.code === value,
|
|
90
|
+
);
|
|
81
91
|
if (found) {
|
|
82
92
|
this.selectedOption = found;
|
|
83
93
|
this.onChangeSelect.emit(this.selectedOption);
|
|
@@ -86,8 +96,8 @@ export class DropiCountrySelectorComponent {
|
|
|
86
96
|
}
|
|
87
97
|
}
|
|
88
98
|
|
|
89
|
-
@Input() public searchTerm: string =
|
|
90
|
-
@ViewChild(
|
|
99
|
+
@Input() public searchTerm: string = "";
|
|
100
|
+
@ViewChild("searchInput") searchInput: ElementRef<HTMLInputElement>;
|
|
91
101
|
|
|
92
102
|
get currentSelection() {
|
|
93
103
|
return this._currentSelection;
|
|
@@ -121,11 +131,11 @@ export class DropiCountrySelectorComponent {
|
|
|
121
131
|
}
|
|
122
132
|
|
|
123
133
|
constructor(
|
|
124
|
-
private elementRef: ElementRef,
|
|
125
|
-
private cdr: ChangeDetectorRef,
|
|
134
|
+
@Inject(ElementRef) private elementRef: ElementRef,
|
|
135
|
+
@Inject(ChangeDetectorRef) private cdr: ChangeDetectorRef,
|
|
126
136
|
) {}
|
|
127
137
|
|
|
128
|
-
@HostListener(
|
|
138
|
+
@HostListener("document:click", ["$event"])
|
|
129
139
|
closeDropdown(event?: MouseEvent): void {
|
|
130
140
|
if (event && !this.elementRef.nativeElement.contains(event.target)) {
|
|
131
141
|
this.isExpanded = false;
|
|
@@ -135,7 +145,7 @@ export class DropiCountrySelectorComponent {
|
|
|
135
145
|
selectOption(option: OptionsCountrySelect) {
|
|
136
146
|
this.isExpanded = false;
|
|
137
147
|
this.selectedOption = option;
|
|
138
|
-
this.searchTerm =
|
|
148
|
+
this.searchTerm = "";
|
|
139
149
|
this.filteredCountries = this.countries;
|
|
140
150
|
this.onChangeSelect.emit(option);
|
|
141
151
|
}
|
|
@@ -160,7 +170,9 @@ export class DropiCountrySelectorComponent {
|
|
|
160
170
|
}
|
|
161
171
|
|
|
162
172
|
setPropertyByLabel(name: string) {
|
|
163
|
-
this.selectedOption = this.countries.find(
|
|
173
|
+
this.selectedOption = this.countries.find(
|
|
174
|
+
(propertie) => propertie.name === name,
|
|
175
|
+
);
|
|
164
176
|
this.onChangeSelect.emit(this.selectedOption);
|
|
165
177
|
}
|
|
166
178
|
|
|
@@ -173,7 +185,7 @@ export class DropiCountrySelectorComponent {
|
|
|
173
185
|
|
|
174
186
|
clearSelection() {
|
|
175
187
|
this.selectedOption = null;
|
|
176
|
-
this.searchTerm =
|
|
188
|
+
this.searchTerm = "";
|
|
177
189
|
this.filteredCountries = this.countries;
|
|
178
190
|
}
|
|
179
191
|
}
|
|
@@ -1,90 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit,
|
|
3
|
+
Component,
|
|
4
|
+
ComponentRef,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
Input,
|
|
7
|
+
NO_ERRORS_SCHEMA,
|
|
8
|
+
OnDestroy,
|
|
9
|
+
ViewChild,
|
|
10
|
+
ViewContainerRef,
|
|
11
|
+
Inject,
|
|
12
|
+
} from "@angular/core";
|
|
13
|
+
import { CommonModule } from "@angular/common";
|
|
14
|
+
import { Subscription } from "rxjs";
|
|
4
15
|
|
|
5
|
-
import { NgPrimeModule } from
|
|
6
|
-
import { DrawerService } from
|
|
7
|
-
import { DrawerConfig } from
|
|
16
|
+
// import { NgPrimeModule } from "@app/ngprime.module";
|
|
17
|
+
// import { DrawerService } from "@app/services/drawer.service";
|
|
18
|
+
// import { DrawerConfig } from "@app/utilities/interfaces/ui/drawer.interface";
|
|
19
|
+
|
|
20
|
+
type DrawerConfig = any;
|
|
21
|
+
const DrawerService = "DrawerService";
|
|
8
22
|
|
|
9
23
|
@Component({
|
|
10
|
-
selector:
|
|
24
|
+
selector: "dropi-drawer",
|
|
11
25
|
standalone: true,
|
|
12
|
-
imports: [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
],
|
|
16
|
-
templateUrl: './dropi-drawer.component.html',
|
|
17
|
-
styleUrls: ['./dropi-drawer.component.scss'],
|
|
18
|
-
schemas: [NO_ERRORS_SCHEMA]
|
|
26
|
+
imports: [CommonModule],
|
|
27
|
+
templateUrl: "./dropi-drawer.component.html",
|
|
28
|
+
styleUrls: ["./dropi-drawer.component.scss"],
|
|
29
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
19
30
|
})
|
|
20
31
|
export class DropiDrawerComponent implements OnDestroy, AfterViewInit {
|
|
21
|
-
@ViewChild(
|
|
32
|
+
@ViewChild("container", { read: ViewContainerRef })
|
|
33
|
+
container!: ViewContainerRef;
|
|
34
|
+
|
|
35
|
+
drawerConfig: DrawerConfig;
|
|
36
|
+
drawerTitle: string = null;
|
|
37
|
+
drawerIsOpen: boolean = false;
|
|
38
|
+
componentRef: ComponentRef<any> | null;
|
|
39
|
+
private readonly subscriptions = new Subscription();
|
|
40
|
+
|
|
41
|
+
constructor(@Inject(DrawerService) private readonly drawerService: any) {
|
|
42
|
+
this.drawerConfig = this.drawerService?.defaultDrawerConfig || {};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
ngAfterViewInit() {
|
|
46
|
+
this.subscriptions.add(
|
|
47
|
+
this.drawerService.drawerContent$.subscribe((content) => {
|
|
48
|
+
if (content && this.container) {
|
|
49
|
+
this.container.clear();
|
|
50
|
+
if (this.componentRef) this.componentRef.destroy();
|
|
51
|
+
|
|
52
|
+
this.componentRef = this.container.createComponent(content.component);
|
|
22
53
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.drawerService.drawerContent$.subscribe((content) => {
|
|
36
|
-
if (content && this.container) {
|
|
37
|
-
this.container.clear();
|
|
38
|
-
if (this.componentRef) this.componentRef.destroy();
|
|
39
|
-
|
|
40
|
-
this.componentRef = this.container.createComponent(content.component);
|
|
41
|
-
|
|
42
|
-
if (content.inputs) {
|
|
43
|
-
Object.keys(content.inputs).forEach((key) => {
|
|
44
|
-
this.componentRef.instance[key] = content.inputs[key];
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (content.outputs) {
|
|
49
|
-
Object.keys(content.outputs).forEach((key) => {
|
|
50
|
-
if (this.componentRef.instance[key] instanceof EventEmitter) {
|
|
51
|
-
this.subscriptions.add(
|
|
52
|
-
this.componentRef.instance[key].subscribe((...args: any[]) => {
|
|
54
|
+
if (content.inputs) {
|
|
55
|
+
Object.keys(content.inputs).forEach((key) => {
|
|
56
|
+
this.componentRef.instance[key] = content.inputs[key];
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (content.outputs) {
|
|
61
|
+
Object.keys(content.outputs).forEach((key) => {
|
|
62
|
+
if (this.componentRef.instance[key] instanceof EventEmitter) {
|
|
63
|
+
this.subscriptions.add(
|
|
64
|
+
this.componentRef.instance[key].subscribe(
|
|
65
|
+
(...args: any[]) => {
|
|
53
66
|
content.outputs[key](...args);
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
this.drawerConfig = content.config;
|
|
60
|
-
this.componentRef.changeDetectorRef.detectChanges();
|
|
67
|
+
},
|
|
68
|
+
),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
61
72
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
this.drawerConfig = content.config;
|
|
74
|
+
this.componentRef.changeDetectorRef.detectChanges();
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
this.subscriptions.add(
|
|
80
|
+
this.drawerService.drawerHeader$.subscribe(
|
|
81
|
+
(header) => (this.drawerTitle = header),
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
this.subscriptions.add(
|
|
86
|
+
this.drawerService.drawerIsOpen$.subscribe(
|
|
87
|
+
(isOpen) => (this.drawerIsOpen = isOpen),
|
|
88
|
+
),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
close() {
|
|
93
|
+
this.drawerService.closeDrawer();
|
|
94
|
+
}
|
|
81
95
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
96
|
+
get sizeClass(): string {
|
|
97
|
+
return (this.drawerConfig?.size ?? "").toLowerCase();
|
|
98
|
+
}
|
|
85
99
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
100
|
+
ngOnDestroy() {
|
|
101
|
+
this.subscriptions.unsubscribe();
|
|
102
|
+
}
|
|
90
103
|
}
|
|
@@ -1,53 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
Input,
|
|
4
|
+
Output,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
OnInit,
|
|
7
|
+
Pipe,
|
|
8
|
+
PipeTransform,
|
|
9
|
+
} from "@angular/core";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
import { DropiCheckboxComponent } from "../dropi-checkbox/dropi-checkbox.component";
|
|
12
|
+
import { DropiAvatarsComponent } from "../dropi-avatars/dropi-avatars.component";
|
|
13
|
+
|
|
14
|
+
@Pipe({
|
|
15
|
+
name: "carrierImageUrl",
|
|
11
16
|
standalone: true,
|
|
12
|
-
imports: [CommonModule, DropiCheckboxComponent, DropiAvatarsComponent, CarrierImageUrl],
|
|
13
17
|
})
|
|
14
|
-
export class
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//array de objets que se envian al dropdown
|
|
19
|
-
@Input() options = [];
|
|
20
|
-
|
|
21
|
-
//valor iterable a mostrar del model
|
|
22
|
-
@Input() valueModel = 'name';
|
|
23
|
-
|
|
24
|
-
@Input() isInSelect: boolean = false;
|
|
25
|
-
|
|
26
|
-
//tipo de la estructura del dropdown
|
|
27
|
-
@Input() parameters: {
|
|
28
|
-
type: 'checkbox';
|
|
29
|
-
icon: string;
|
|
30
|
-
iconCurrier: boolean;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
@Output() modelChange = new EventEmitter<string[]>();
|
|
34
|
-
|
|
35
|
-
constructor() {
|
|
36
|
-
this.parameters = {
|
|
37
|
-
type: 'checkbox',
|
|
38
|
-
icon: '',
|
|
39
|
-
iconCurrier: false,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
toggleValue(checkValue: boolean, value: any, index: number) {
|
|
44
|
-
this.options[index].checked = checkValue;
|
|
45
|
-
const seletedValues = this.options.filter((option) => option.checked);
|
|
46
|
-
this.modelChange.emit(seletedValues);
|
|
18
|
+
export class CarrierImageUrlPipeStub implements PipeTransform {
|
|
19
|
+
transform(value: any): string {
|
|
20
|
+
return value;
|
|
47
21
|
}
|
|
22
|
+
}
|
|
48
23
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
24
|
+
@Component({
|
|
25
|
+
selector: "app-dropi-dropdown",
|
|
26
|
+
standalone: true,
|
|
27
|
+
imports: [
|
|
28
|
+
CommonModule,
|
|
29
|
+
DropiCheckboxComponent,
|
|
30
|
+
DropiAvatarsComponent,
|
|
31
|
+
CarrierImageUrlPipeStub,
|
|
32
|
+
],
|
|
33
|
+
templateUrl: "./dropi-dropdown.component.html",
|
|
34
|
+
styleUrls: ["./dropi-dropdown.component.scss"],
|
|
35
|
+
})
|
|
36
|
+
export class DropiDropdownComponent implements OnInit {
|
|
37
|
+
@Input() public options: any[] = [];
|
|
38
|
+
@Input() public parameters: any = {}; // Requerido por template
|
|
39
|
+
@Input() public isInSelect: boolean = false; // Requerido por template
|
|
40
|
+
@Input() public height: string = ""; // Requerido por template
|
|
41
|
+
@Input() public valueModel: string = "label"; // Requerido por template
|
|
42
|
+
@Output() public onSelectionChange = new EventEmitter<any>();
|
|
43
|
+
@Output() public modelChange = new EventEmitter<any>(); // Requerido por template
|
|
44
|
+
|
|
45
|
+
ngOnInit(): void {}
|
|
46
|
+
|
|
47
|
+
public toggleValue(event: any, item: any, index: number): void {
|
|
48
|
+
this.modelChange.emit(item);
|
|
52
49
|
}
|
|
53
50
|
}
|
|
@@ -1,72 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
EventEmitter,
|
|
4
|
+
Input,
|
|
5
|
+
Output,
|
|
6
|
+
Inject,
|
|
7
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
8
|
+
} from "@angular/core";
|
|
9
|
+
import { CommonModule } from "@angular/common";
|
|
10
|
+
import { FileItem } from "../../../utilities/interfaces/ui/upload.model";
|
|
11
|
+
import { ButtonComponent } from "../../dropi-button/dropi-button.component";
|
|
12
|
+
import { IconComponent } from "../../icon/icon.component";
|
|
13
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
10
14
|
|
|
11
15
|
@Component({
|
|
12
|
-
selector:
|
|
16
|
+
selector: "app-card-view",
|
|
13
17
|
standalone: true,
|
|
14
|
-
imports: [CommonModule, ButtonComponent,
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
imports: [CommonModule, ButtonComponent, IconComponent, TranslateModule],
|
|
19
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
20
|
+
templateUrl: "./card-view.component.html",
|
|
21
|
+
styleUrls: ["./card-view.component.scss"],
|
|
17
22
|
})
|
|
18
23
|
export class CardViewComponent {
|
|
19
|
-
@Input() fileItem
|
|
20
|
-
|
|
21
|
-
progress: 0,
|
|
22
|
-
state: 'complete',
|
|
23
|
-
id: '',
|
|
24
|
-
};
|
|
25
|
-
@Input() onlyView: boolean;
|
|
26
|
-
|
|
24
|
+
@Input() fileItem!: FileItem;
|
|
25
|
+
@Input() onlyView: boolean = false;
|
|
27
26
|
@Output() action = new EventEmitter<{
|
|
28
27
|
file: FileItem;
|
|
29
|
-
type:
|
|
28
|
+
type: "delete" | "confirm-delete" | "cancel-delete";
|
|
30
29
|
}>();
|
|
31
30
|
|
|
32
|
-
constructor(
|
|
31
|
+
constructor(
|
|
32
|
+
@Inject("ImageOverlayService") private readonly imageOverlayService: any,
|
|
33
|
+
) {}
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (type.includes('pdf')) return 'pdf';
|
|
37
|
-
if (type.includes('word') || type.includes('document')) return 'word';
|
|
38
|
-
if (type.startsWith('image/')) return 'image';
|
|
39
|
-
return 'generic';
|
|
35
|
+
onSendClick(type: "delete" | "confirm-delete" | "cancel-delete"): void {
|
|
36
|
+
this.action.emit({ file: this.fileItem, type });
|
|
40
37
|
}
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
getFileTypeClass(file: any): string {
|
|
40
|
+
return "file-default";
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// abre en nueva pestaña
|
|
49
|
-
console.log('item', this.fileItem?.uploadedUrl);
|
|
50
|
-
window.open(`${environment.AWS3WL.cloudfront_server}/${this.fileItem?.uploadedUrl}`, '_blank');
|
|
51
|
-
} else {
|
|
52
|
-
this.imageOverlayService.showOverlay([this.fileItem?.previewUrl]);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
downloadFile() {
|
|
57
|
-
const link = document.createElement('a');
|
|
58
|
-
link.href = this.fileItem?.previewUrl!;
|
|
59
|
-
link.download = this.fileItem?.file?.name!;
|
|
60
|
-
link.click();
|
|
43
|
+
viewType(type: string): boolean {
|
|
44
|
+
return false;
|
|
61
45
|
}
|
|
62
46
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
fileType = this.fileItem.file.type === 'application/pdf' ? 'pdf' : 'default';
|
|
67
|
-
} else {
|
|
68
|
-
fileType = this.fileItem?.previewUrl?.includes('pdf') ? 'pdf' : 'default';
|
|
47
|
+
openPreviewImage(): void {
|
|
48
|
+
if (this.fileItem?.previewUrl) {
|
|
49
|
+
this.imageOverlayService?.open?.(this.fileItem.previewUrl);
|
|
69
50
|
}
|
|
70
|
-
return fileType === type;
|
|
71
51
|
}
|
|
72
52
|
}
|