@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
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
<div class="description-card-section Body-M-Regular">{{ description }}</div>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="element-end">
|
|
8
|
-
<app-switch
|
|
8
|
+
<app-switch-stub
|
|
9
9
|
[isChecked]="isChecked"
|
|
10
10
|
*ngIf="typeElement === 'switch'"
|
|
11
11
|
(onChange)="changeValue($event)"
|
|
12
|
-
></app-switch>
|
|
13
|
-
<app-icon
|
|
12
|
+
></app-switch-stub>
|
|
13
|
+
<app-icon-stub
|
|
14
14
|
(click)="clickIcon()"
|
|
15
15
|
*ngIf="typeElement === 'dropdown'"
|
|
16
16
|
name="Dropdown-Right"
|
|
17
|
-
width="32px"
|
|
18
|
-
height="32px"
|
|
19
|
-
color="Gray-Gray-500"
|
|
20
|
-
></app-icon>
|
|
17
|
+
[width]="'32px'"
|
|
18
|
+
[height]="'32px'"
|
|
19
|
+
[color]="'Gray-Gray-500'"
|
|
20
|
+
></app-icon-stub>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
@@ -1,31 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { DropiSwitchComponent } from '@app/ui/dropi-switch/dropi-switch.component';
|
|
4
|
-
import { IconComponent } from '@app/ui/icon/icon.component';
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
5
3
|
|
|
6
4
|
@Component({
|
|
7
|
-
selector:
|
|
8
|
-
templateUrl: './card-section.component.html',
|
|
9
|
-
styleUrls: ['./card-section.component.scss'],
|
|
5
|
+
selector: "app-switch-stub",
|
|
10
6
|
standalone: true,
|
|
11
|
-
|
|
7
|
+
template:
|
|
8
|
+
'<input type="checkbox" [checked]="isChecked" (change)="onToggle($event)">',
|
|
9
|
+
imports: [CommonModule],
|
|
10
|
+
})
|
|
11
|
+
export class SwitchStubComponent {
|
|
12
|
+
@Input() isChecked: boolean = false;
|
|
13
|
+
@Output() onChange = new EventEmitter<boolean>();
|
|
14
|
+
|
|
15
|
+
onToggle(event: any) {
|
|
16
|
+
this.onChange.emit(event.target.checked);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@Component({
|
|
21
|
+
selector: "app-icon-stub",
|
|
22
|
+
standalone: true,
|
|
23
|
+
template: "<i></i>",
|
|
24
|
+
})
|
|
25
|
+
export class IconStubComponent {
|
|
26
|
+
@Input() name: string = "";
|
|
27
|
+
@Input() width: string = "";
|
|
28
|
+
@Input() height: string = "";
|
|
29
|
+
@Input() color: string = "";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@Component({
|
|
33
|
+
selector: "app-card-section",
|
|
34
|
+
templateUrl: "./card-section.component.html",
|
|
35
|
+
styleUrls: ["./card-section.component.scss"],
|
|
36
|
+
standalone: true,
|
|
37
|
+
imports: [CommonModule, SwitchStubComponent, IconStubComponent],
|
|
12
38
|
})
|
|
13
39
|
export class CardSectionComponent implements OnInit {
|
|
14
|
-
@Input() title: string =
|
|
15
|
-
@Input() description: string =
|
|
16
|
-
@Input() typeElement:
|
|
40
|
+
@Input() title: string = "title";
|
|
41
|
+
@Input() description: string = "Description";
|
|
42
|
+
@Input() typeElement: "dropdown" | "switch" = "dropdown";
|
|
17
43
|
@Output() onChange = new EventEmitter<boolean>();
|
|
18
44
|
@Output() onClick = new EventEmitter();
|
|
19
|
-
@Input() type:
|
|
45
|
+
@Input() type: "medium" | "important" = "important";
|
|
20
46
|
@Input() isChecked: boolean = false;
|
|
21
47
|
|
|
22
48
|
ngOnInit() {
|
|
23
|
-
if (!this.type || this.type.trim() ===
|
|
24
|
-
this.type =
|
|
49
|
+
if (!this.type || this.type.trim() === "") {
|
|
50
|
+
this.type = "important";
|
|
25
51
|
}
|
|
26
52
|
}
|
|
27
53
|
|
|
28
|
-
changeValue(event) {
|
|
54
|
+
changeValue(event: any) {
|
|
29
55
|
this.onChange.emit(event);
|
|
30
56
|
}
|
|
31
57
|
|
|
@@ -1,219 +1,82 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ChangeDetectorRef,
|
|
3
2
|
Component,
|
|
4
3
|
EventEmitter,
|
|
5
|
-
forwardRef,
|
|
6
4
|
Input,
|
|
7
|
-
OnChanges,
|
|
8
5
|
OnInit,
|
|
9
6
|
Output,
|
|
10
7
|
SimpleChanges,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from
|
|
20
|
-
|
|
21
|
-
import { debounceTime } from 'rxjs/operators';
|
|
22
|
-
import { Option } from '@app/utilities/interfaces/ui/checkbox-selection-list-interface';
|
|
23
|
-
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
24
|
-
import { DropiCheckboxComponent } from '../dropi-checkbox/dropi-checkbox.component';
|
|
25
|
-
import { Subscription } from 'rxjs';
|
|
8
|
+
Inject,
|
|
9
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
10
|
+
} from "@angular/core";
|
|
11
|
+
import { CommonModule } from "@angular/common";
|
|
12
|
+
import { FormControl, ReactiveFormsModule } from "@angular/forms";
|
|
13
|
+
import { TranslateModule, TranslateService } from "@ngx-translate/core";
|
|
14
|
+
import { Subscription } from "rxjs";
|
|
15
|
+
import { debounceTime } from "rxjs/operators";
|
|
16
|
+
import { Option } from "../../utilities/interfaces/ui/selection-list-interface";
|
|
26
17
|
|
|
27
|
-
/**
|
|
28
|
-
* Componente que renderiza un listado de opciones con checkboxes.
|
|
29
|
-
* Permite buscar dentro del listado de opciones.
|
|
30
|
-
* Emite eventos cuando se selecciona o deselecciona una opción.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* <app-checkbox-selection-list
|
|
34
|
-
* [showFilter]="true"
|
|
35
|
-
* [options]="[
|
|
36
|
-
* { label: 'Opción 1', value: 'opcion-1' },
|
|
37
|
-
* { label: 'Opción 2', value: 'opcion-2' },
|
|
38
|
-
* { label: 'Opción 3', value: 'opcion-3' }
|
|
39
|
-
* ]"
|
|
40
|
-
* (ngModel)="selectedOptions"
|
|
41
|
-
* ></app-checkbox-selection-list>
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* <app-checkbox-selection-list
|
|
45
|
-
* [showFilter]="true"
|
|
46
|
-
* [options]="[
|
|
47
|
-
* { label: 'Opción 1', value: 'opcion-1' },
|
|
48
|
-
* { label: 'Opción 2', value: 'opcion-2' },
|
|
49
|
-
* { label: 'Opción 3', value: 'opcion-3' }
|
|
50
|
-
* ]"
|
|
51
|
-
* [formControlName]="selectedOptions"
|
|
52
|
-
* ></app-checkbox-selection-list>
|
|
53
|
-
* */
|
|
54
18
|
@Component({
|
|
55
|
-
selector:
|
|
56
|
-
templateUrl: './checkbox-selection-list.component.html',
|
|
57
|
-
styleUrls: ['./checkbox-selection-list.component.scss'],
|
|
19
|
+
selector: "app-checkbox-selection-list",
|
|
58
20
|
standalone: true,
|
|
59
|
-
imports: [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
ReactiveFormsModule,
|
|
64
|
-
DropiCheckboxComponent,
|
|
65
|
-
],
|
|
66
|
-
providers: [
|
|
67
|
-
{
|
|
68
|
-
provide: NG_VALUE_ACCESSOR,
|
|
69
|
-
useExisting: forwardRef(() => CheckboxSelectionListComponent),
|
|
70
|
-
multi: true,
|
|
71
|
-
},
|
|
72
|
-
],
|
|
21
|
+
imports: [CommonModule, TranslateModule, ReactiveFormsModule],
|
|
22
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
23
|
+
templateUrl: "./checkbox-selection-list.component.html",
|
|
24
|
+
styleUrls: ["./checkbox-selection-list.component.scss"],
|
|
73
25
|
})
|
|
74
|
-
export class CheckboxSelectionListComponent implements
|
|
75
|
-
/**
|
|
76
|
-
* Listado de opciones disponibles para seleccionar
|
|
77
|
-
*/
|
|
26
|
+
export class CheckboxSelectionListComponent implements OnInit {
|
|
78
27
|
@Input() options: Option[] = [];
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
*/
|
|
84
|
-
@Input() showFilter: boolean = true;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Placeholder para el campo de búsqueda
|
|
88
|
-
*/
|
|
89
|
-
@Input() filterPlaceholder: string = 'Search';
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Tiempo de demora en milisegundos para realizar la búsqueda
|
|
93
|
-
*/
|
|
28
|
+
@Input() showFilter: boolean = false;
|
|
29
|
+
@Input() filterPlaceholder: string = "Search";
|
|
30
|
+
@Input() showNotFound: boolean = false;
|
|
31
|
+
@Input() notFoundMessage: string = "No results found";
|
|
94
32
|
@Input() searchDelay: number = 100;
|
|
33
|
+
@Output() valueChange: EventEmitter<any[]> = new EventEmitter<any[]>();
|
|
95
34
|
|
|
96
|
-
/**
|
|
97
|
-
* Permite mostrar u ocultar el mensaje de "No se encontraron resultados"
|
|
98
|
-
* @default true
|
|
99
|
-
*/
|
|
100
|
-
@Input() showNotFound: boolean = true;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Mensaje personalizado para mostrar cuando no se encuentran resultados
|
|
104
|
-
* @default "No se encontraron resultados"
|
|
105
|
-
*/
|
|
106
|
-
@Input() notFoundMessage: string = 'No related results found';
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Permite seleccionar multiples opciones
|
|
110
|
-
* @default true
|
|
111
|
-
*/
|
|
112
|
-
@Input() multiSelect: boolean = true;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Evento que se dispara al realizar una búsqueda (Se emite cuando se cambia el valor del input de búsqueda basado en @SearchDelay)
|
|
116
|
-
*/
|
|
117
|
-
@Output() onSearch = new EventEmitter<string>();
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Evento que se dispara al cambiar el estado de los checkbox
|
|
121
|
-
*/
|
|
122
|
-
@Output() checkedValues = new EventEmitter<Option[]>();
|
|
123
|
-
|
|
124
|
-
searchControl = new FormControl('');
|
|
125
|
-
selectedValues: Option[] = [];
|
|
126
|
-
filteredOptions: Option[] = [];
|
|
127
|
-
|
|
128
|
-
private onChange: (value: Option[]) => void = () => {};
|
|
129
|
-
private onTouched: () => void = () => {};
|
|
130
35
|
private readonly subscriptions: Subscription = new Subscription();
|
|
36
|
+
searchControl = new FormControl("");
|
|
37
|
+
filteredOptions: Option[] = [];
|
|
131
38
|
|
|
132
39
|
constructor(
|
|
133
|
-
|
|
134
|
-
private readonly
|
|
40
|
+
@Inject(TranslateService)
|
|
41
|
+
private readonly translateService: TranslateService,
|
|
135
42
|
) {}
|
|
136
43
|
|
|
137
44
|
ngOnInit() {
|
|
138
45
|
this.subscriptions.add(
|
|
139
|
-
this.searchControl.valueChanges
|
|
140
|
-
this.
|
|
141
|
-
|
|
142
|
-
|
|
46
|
+
this.searchControl.valueChanges
|
|
47
|
+
.pipe(debounceTime(this.searchDelay))
|
|
48
|
+
.subscribe((value) => {
|
|
49
|
+
this.filterOption(value);
|
|
50
|
+
}),
|
|
143
51
|
);
|
|
144
52
|
|
|
145
53
|
this.filteredOptions = this.options;
|
|
146
54
|
}
|
|
147
55
|
|
|
148
56
|
ngOnChanges(changes: SimpleChanges) {
|
|
149
|
-
if (changes[
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
clearSearchInput() {
|
|
153
|
-
this.searchControl.setValue('');
|
|
154
|
-
this.onSearch.emit('');
|
|
57
|
+
if (changes["options"]) this.filteredOptions = this.options;
|
|
155
58
|
}
|
|
156
59
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
this.selectedValues = this.options.filter((o) => o.checked);
|
|
161
|
-
this.checkedValues.emit(this.selectedValues);
|
|
162
|
-
this.onChange(this.selectedValues);
|
|
163
|
-
this.onTouched();
|
|
164
|
-
} else {
|
|
165
|
-
// Desmarcar todas
|
|
166
|
-
this.options.forEach((o) => (o.checked = false));
|
|
167
|
-
// Marcar solo el actual si se está marcando
|
|
168
|
-
option.checked = checked;
|
|
169
|
-
this.selectedValues = this.options.filter((o) => o.checked);
|
|
170
|
-
// Reflejar cambios visuales también en el filtrado
|
|
171
|
-
this.filteredOptions = [...this.options];
|
|
172
|
-
// Emitir
|
|
173
|
-
this.checkedValues.emit(this.selectedValues);
|
|
174
|
-
this.onChange(this.selectedValues);
|
|
175
|
-
this.onTouched();
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
filterOption(optionLabel: string) {
|
|
180
|
-
if (!optionLabel?.trim()) {
|
|
60
|
+
filterOption(optionName: any) {
|
|
61
|
+
const val = typeof optionName === "string" ? optionName : "";
|
|
62
|
+
if (!val.trim()) {
|
|
181
63
|
this.filteredOptions = this.options;
|
|
182
64
|
return;
|
|
183
65
|
}
|
|
184
66
|
this.filteredOptions = this.options.filter((o) =>
|
|
185
|
-
o.
|
|
67
|
+
o.name.toLowerCase().includes(val.toLowerCase()),
|
|
186
68
|
);
|
|
187
69
|
}
|
|
188
70
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
this.
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
registerOnChange(fn: any): void {
|
|
198
|
-
this.onChange = fn;
|
|
71
|
+
toggleSelection(event: any, option: Option): void {
|
|
72
|
+
const checked =
|
|
73
|
+
typeof event === "boolean" ? event : event?.checked || false;
|
|
74
|
+
option.checked = checked;
|
|
75
|
+
const selected = this.options.filter((o) => o.checked).map((o) => o.id);
|
|
76
|
+
this.valueChange.emit(selected);
|
|
199
77
|
}
|
|
200
78
|
|
|
201
|
-
|
|
202
|
-
this.
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
setDisabledState(isDisabled: boolean): void {
|
|
206
|
-
// Si tu componente tuviera un disabled global lo controlas aquí.
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
private syncCheckedValues() {
|
|
210
|
-
this.options.forEach((option) => {
|
|
211
|
-
option.checked = this.selectedValues.some((o) => o.id === option.id);
|
|
212
|
-
});
|
|
213
|
-
this.filteredOptions = [...this.options];
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
ngOnDestroy() {
|
|
217
|
-
this.subscriptions.unsubscribe();
|
|
79
|
+
clearSearchInput() {
|
|
80
|
+
this.searchControl.setValue("");
|
|
218
81
|
}
|
|
219
82
|
}
|
|
@@ -1,151 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface City {
|
|
17
|
-
label: string;
|
|
18
|
-
value: number;
|
|
19
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
Input,
|
|
4
|
+
Output,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
OnInit,
|
|
7
|
+
Inject,
|
|
8
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
9
|
+
} from "@angular/core";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
|
|
12
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
13
|
+
import { IconComponent } from "../icon/icon.component";
|
|
14
|
+
import { DropiSelectComponent } from "../dropi-select/dropi-select.component";
|
|
20
15
|
|
|
21
16
|
@Component({
|
|
22
|
-
selector:
|
|
23
|
-
templateUrl: './city-selector.component.html',
|
|
24
|
-
styleUrls: ['./city-selector.component.scss'],
|
|
17
|
+
selector: "app-city-selector",
|
|
25
18
|
standalone: true,
|
|
26
|
-
imports: [
|
|
27
|
-
|
|
19
|
+
imports: [
|
|
20
|
+
CommonModule,
|
|
21
|
+
FormsModule,
|
|
22
|
+
ReactiveFormsModule,
|
|
23
|
+
TranslateModule,
|
|
24
|
+
IconComponent,
|
|
25
|
+
DropiSelectComponent,
|
|
26
|
+
],
|
|
27
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
28
|
+
templateUrl: "./city-selector.component.html",
|
|
29
|
+
styleUrls: ["./city-selector.component.scss"],
|
|
28
30
|
})
|
|
29
31
|
export class CitySelectorComponent implements OnInit {
|
|
30
|
-
@Input()
|
|
31
|
-
@Input() disabled: boolean = false;
|
|
32
|
-
|
|
33
|
-
@Output() selectedCitiesChange = new EventEmitter<any>();
|
|
32
|
+
@Input() public formControlCity: any;
|
|
33
|
+
@Input() public disabled: boolean = false;
|
|
34
34
|
|
|
35
|
-
groupedCities
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
private subscription: Subscription;
|
|
39
|
-
private localStorageKey = 'groupedCities';
|
|
40
|
-
private allCities: any[] = []; // Almacena todas las ciudades
|
|
41
|
-
private chunkSize = 100; // Tamaño del chunk para la carga diferida
|
|
35
|
+
public groupedCities: any[] = [];
|
|
36
|
+
public selectedCities: any[] = [];
|
|
37
|
+
@Output() public onCityChange = new EventEmitter<any>();
|
|
42
38
|
|
|
43
39
|
constructor(
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
@Inject("CityService") public cityService: any,
|
|
41
|
+
@Inject("SettingsService") public settingsService: any,
|
|
46
42
|
) {}
|
|
47
43
|
|
|
48
|
-
ngOnInit() {
|
|
49
|
-
console.log(this.disabled);
|
|
50
|
-
|
|
51
|
-
const country = JSON.parse(localStorage.getItem('DROPI_configurations'))[0].country || '';
|
|
52
|
-
if (country) {
|
|
53
|
-
this.country = country;
|
|
54
|
-
}
|
|
55
|
-
if (!this.selectedCities) {
|
|
56
|
-
this.selectedCities = [];
|
|
57
|
-
} else {
|
|
58
|
-
this.selectedCities =
|
|
59
|
-
this.selectedCities.map((city: any) => city.value) || this.selectedCities;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Verificar caché por dominio primero
|
|
63
|
-
const domain = window.location.hostname;
|
|
64
|
-
const cacheKey = `grouped-cities-${domain}`;
|
|
65
|
-
const cachedCities = this.cacheService.get<any[]>(cacheKey);
|
|
66
|
-
|
|
67
|
-
if (cachedCities) {
|
|
68
|
-
console.log('🔄 Usando ciudades desde caché para dominio:', domain);
|
|
69
|
-
this.allCities = cachedCities;
|
|
70
|
-
this.groupedCities = this.allCities.slice(0, this.chunkSize);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Fallback a localStorage si no hay caché por dominio
|
|
75
|
-
const storedCities = localStorage.getItem(this.localStorageKey);
|
|
76
|
-
if (storedCities) {
|
|
77
|
-
this.allCities = JSON.parse(storedCities);
|
|
78
|
-
this.groupedCities = this.allCities.slice(0, this.chunkSize);
|
|
79
|
-
} else {
|
|
80
|
-
this.fetchCitiesFromAPI();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
fetchCitiesFromAPI() {
|
|
85
|
-
//console.log('Fetching cities from API for country:', this.country);
|
|
86
|
-
this.subscription = this.cityService.getCitiesByCountry({ country: this.country }).subscribe(
|
|
87
|
-
(res: any) => {
|
|
88
|
-
if (!res.data) return;
|
|
89
|
-
|
|
90
|
-
let response = res.data;
|
|
91
|
-
console.log('State response', response);
|
|
92
|
-
|
|
93
|
-
const capitalize = (str: string) => {
|
|
94
|
-
return str
|
|
95
|
-
.toLowerCase()
|
|
96
|
-
.replace(/\b\w/g, (char) => char.toUpperCase())
|
|
97
|
-
.replace(/\s*\(.*?\)\s*/g, ''); // Eliminar texto entre paréntesis
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
if (Array.isArray(response)) {
|
|
101
|
-
this.allCities = response.map((state: any) => {
|
|
102
|
-
return {
|
|
103
|
-
label: capitalize(state.label),
|
|
104
|
-
value: state.id_state.toString(),
|
|
105
|
-
items: state.items
|
|
106
|
-
? state.items.map((city: any) => {
|
|
107
|
-
return {
|
|
108
|
-
label: capitalize(city.label),
|
|
109
|
-
value: city.id_city.toString(),
|
|
110
|
-
};
|
|
111
|
-
})
|
|
112
|
-
: [],
|
|
113
|
-
};
|
|
114
|
-
});
|
|
44
|
+
ngOnInit(): void {}
|
|
115
45
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
// Guardar en localStorage (fallback)
|
|
119
|
-
localStorage.setItem(this.localStorageKey, JSON.stringify(this.allCities));
|
|
120
|
-
|
|
121
|
-
// Guardar en caché por dominio (6 horas)
|
|
122
|
-
const domain = window.location.hostname;
|
|
123
|
-
const cacheKey = `grouped-cities-${domain}`;
|
|
124
|
-
this.cacheService.set(cacheKey, this.allCities, 6 * 60 * 60 * 1000);
|
|
125
|
-
console.log('💾 Guardando ciudades en caché para dominio:', domain);
|
|
126
|
-
} else {
|
|
127
|
-
console.error('Response is not an array:', response);
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
(error: any) => {
|
|
131
|
-
console.error('❌ Error fetching cities:', error);
|
|
132
|
-
},
|
|
133
|
-
);
|
|
46
|
+
public onSelectCityChange(event: any): void {
|
|
47
|
+
this.onCityChange.emit(event);
|
|
134
48
|
}
|
|
135
49
|
|
|
136
|
-
loadCities(event: any) {
|
|
137
|
-
// Cargar más datos cuando se desplaza
|
|
138
|
-
const { first, last } = event;
|
|
139
|
-
if (last > this.groupedCities.length) {
|
|
140
|
-
const moreCities = this.allCities.slice(
|
|
141
|
-
this.groupedCities.length,
|
|
142
|
-
this.groupedCities.length + this.chunkSize,
|
|
143
|
-
);
|
|
144
|
-
this.groupedCities = [...this.groupedCities, ...moreCities];
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
onSelectCityChange(event: any) {
|
|
149
|
-
this.selectedCitiesChange.emit(event);
|
|
150
|
-
}
|
|
50
|
+
public loadCities(event: any): void {}
|
|
151
51
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<div class="wrapper text-center">
|
|
2
|
+
<div class="header text-center">
|
|
3
|
+
<!-- <mat-icon class="notranslate warn-500-fg s-64">error_outline</mat-icon> -->
|
|
4
|
+
<img
|
|
5
|
+
src="../../../assets/img/theme/interrogation.png"
|
|
6
|
+
class="md-avatar"
|
|
7
|
+
style="width: 90px; height: 90px; border-radius: 100%"
|
|
8
|
+
/>
|
|
9
|
+
</div>
|
|
10
|
+
<div mat-dialog-content>{{ data.message }}</div>
|
|
11
|
+
<div class="actions">
|
|
12
|
+
<button class="btn btn-primary" (click)="close('yes')">{{ 'Yes' | translate }}</button>
|
|
13
|
+
<button class="btn btn-secondary" (click)="close('no')">{{ 'No' | translate }}</button>
|
|
14
|
+
</div>
|
|
15
|
+
<!-- <div mat-dialog-actions class="pt-24" class="d-flex justify-content-center">
|
|
16
|
+
<button mat-raised-button class="mat-accent mr-16" (click)="close('yes')">
|
|
17
|
+
{{ 'Yes' | translate }}
|
|
18
|
+
</button>
|
|
19
|
+
<button mat-raised-button class="mat-accent mr-16" (click)="close('no')">
|
|
20
|
+
{{ 'No' | translate }}
|
|
21
|
+
</button>
|
|
22
|
+
<button mat-raised-button class="mat-accent mr-16" (click)="close('cancel')" *ngIf="data.show">
|
|
23
|
+
{{ 'Cancel' | translate }}
|
|
24
|
+
</button>
|
|
25
|
+
</div> -->
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
padding: 20px;
|
|
3
|
+
overflow: hidden !important;
|
|
4
|
+
height: 25%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.icono {
|
|
8
|
+
font-size: 60px !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mat-icon {
|
|
12
|
+
background-repeat: no-repeat !important;
|
|
13
|
+
display: inline-block !important;
|
|
14
|
+
fill: currentColor !important;
|
|
15
|
+
height: 50px !important;
|
|
16
|
+
width: 40px !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mat-flat-button.mat-accent,
|
|
20
|
+
.mat-raised-button.mat-accent,
|
|
21
|
+
.mat-fab.mat-accent,
|
|
22
|
+
.mat-mini-fab.mat-accent {
|
|
23
|
+
background-color: #198cf0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.actions {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 10px;
|
|
29
|
+
width: 100%;
|
|
30
|
+
margin-top: 1.5rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
button {
|
|
34
|
+
flex: 1;
|
|
35
|
+
outline: none;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 8px;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
&.btn-primary {
|
|
42
|
+
background: var(--Primary-Naranja, #ff9333);
|
|
43
|
+
border: navajowhite;
|
|
44
|
+
height: 40px;
|
|
45
|
+
padding: 8px 20px 8px 16px;
|
|
46
|
+
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
}
|
|
49
|
+
&.btn-secondary {
|
|
50
|
+
background: #fff;
|
|
51
|
+
color: var(--Primary-Naranja, #ff9333);
|
|
52
|
+
border: 1px solid;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component, Inject, Input } from '@angular/core';
|
|
2
|
+
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-confirm-dialog',
|
|
7
|
+
templateUrl: 'confirm-dialog.component.html',
|
|
8
|
+
styleUrls: ['./confirm-dialog.component.scss'],
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [TranslateModule]
|
|
11
|
+
})
|
|
12
|
+
export class ConfirmDialogComponent {
|
|
13
|
+
@Input() public data: any = {
|
|
14
|
+
message: '',
|
|
15
|
+
show: true
|
|
16
|
+
};
|
|
17
|
+
constructor(public dialogRef: NgbActiveModal) {}
|
|
18
|
+
|
|
19
|
+
close(type): void {
|
|
20
|
+
this.dialogRef.close({ type: type });
|
|
21
|
+
}
|
|
22
|
+
}
|