@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,39 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
EventEmitter,
|
|
4
|
+
Input,
|
|
5
|
+
OnChanges,
|
|
6
|
+
Output,
|
|
7
|
+
SimpleChanges,
|
|
8
|
+
Inject,
|
|
9
|
+
} from "@angular/core";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
import { FileItem } from "../../../utilities/interfaces/ui/upload.model";
|
|
12
|
+
import { CardViewComponent } from "../card-view/card-view.component";
|
|
13
|
+
import { GridViewComponent } from "../grid-view/grid-view.component";
|
|
14
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
8
15
|
|
|
9
16
|
@Component({
|
|
10
|
-
selector:
|
|
17
|
+
selector: "app-file-list",
|
|
11
18
|
standalone: true,
|
|
12
|
-
imports: [
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
imports: [
|
|
20
|
+
CommonModule,
|
|
21
|
+
CardViewComponent,
|
|
22
|
+
GridViewComponent,
|
|
23
|
+
TranslateModule,
|
|
24
|
+
],
|
|
25
|
+
templateUrl: "./file-list.component.html",
|
|
26
|
+
styleUrls: ["./file-list.component.scss"],
|
|
15
27
|
})
|
|
16
28
|
export class FileListComponent implements OnChanges {
|
|
17
|
-
@Input() files: FileItem[];
|
|
18
|
-
@Input() onlyView: boolean;
|
|
19
|
-
@Input() previewType:
|
|
20
|
-
@Input() maxFiles: number = 1;
|
|
29
|
+
@Input() files: FileItem[] = [];
|
|
30
|
+
@Input() onlyView: boolean = false;
|
|
31
|
+
@Input() previewType: "card" | "grid" = "card";
|
|
32
|
+
@Input() maxFiles: number = 1;
|
|
21
33
|
@Input() addButton: boolean = true;
|
|
22
34
|
@Output() action = new EventEmitter<{
|
|
23
35
|
file: FileItem;
|
|
24
|
-
type:
|
|
36
|
+
type: "delete" | "confirm-delete" | "cancel-delete";
|
|
25
37
|
}>();
|
|
26
38
|
|
|
27
|
-
public cardFiles: FileItem[];
|
|
28
|
-
public gridFiles: FileItem[];
|
|
29
|
-
viewImageToDelete: boolean;
|
|
30
|
-
imageTodelete: FileItem;
|
|
31
|
-
imageCopyValue: FileItem;
|
|
39
|
+
public cardFiles: FileItem[] = [];
|
|
40
|
+
public gridFiles: FileItem[] = [];
|
|
41
|
+
viewImageToDelete: boolean = false;
|
|
42
|
+
imageTodelete: FileItem | null = null;
|
|
43
|
+
imageCopyValue: FileItem | null = null;
|
|
44
|
+
imageCopyValueGrid: FileItem | null = null; // Fix for grid delete
|
|
32
45
|
|
|
33
|
-
constructor(private uploadFileService:
|
|
46
|
+
constructor(@Inject("UploadFileService") private uploadFileService: any) {}
|
|
34
47
|
|
|
35
48
|
ngOnChanges(changes: SimpleChanges) {
|
|
36
|
-
if (changes[
|
|
49
|
+
if (changes["files"]) {
|
|
37
50
|
this.updateFileViews();
|
|
38
51
|
}
|
|
39
52
|
}
|
|
@@ -43,7 +56,7 @@ export class FileListComponent implements OnChanges {
|
|
|
43
56
|
this.gridFiles = [];
|
|
44
57
|
|
|
45
58
|
this.files.forEach((file) => {
|
|
46
|
-
if (file.typeView ===
|
|
59
|
+
if (file.typeView === "card") {
|
|
47
60
|
this.cardFiles.push(file);
|
|
48
61
|
return;
|
|
49
62
|
}
|
|
@@ -51,34 +64,40 @@ export class FileListComponent implements OnChanges {
|
|
|
51
64
|
});
|
|
52
65
|
}
|
|
53
66
|
|
|
54
|
-
onChildAction(event: {
|
|
67
|
+
onChildAction(event: {
|
|
68
|
+
file: FileItem;
|
|
69
|
+
type: "delete" | "confirm-delete" | "cancel-delete";
|
|
70
|
+
}) {
|
|
55
71
|
this.action.emit(event);
|
|
56
72
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
onChildGridAction(event: {
|
|
74
|
+
file: FileItem;
|
|
75
|
+
type: "delete" | "confirm-delete" | "cancel-delete";
|
|
76
|
+
}) {
|
|
77
|
+
this.imageTodelete = { ...event.file, state: "confirm-delete" };
|
|
78
|
+
this.viewImageToDelete = true;
|
|
79
|
+
this.imageCopyValueGrid = event.file;
|
|
63
80
|
}
|
|
64
81
|
|
|
65
|
-
onDeleteCardAction(event: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
82
|
+
onDeleteCardAction(event: {
|
|
83
|
+
file: FileItem;
|
|
84
|
+
type: "delete" | "confirm-delete" | "cancel-delete";
|
|
85
|
+
}) {
|
|
86
|
+
if (event.type == "confirm-delete") {
|
|
87
|
+
this.action.emit({
|
|
88
|
+
type: "confirm-delete",
|
|
89
|
+
file: this.imageCopyValueGrid || event.file,
|
|
90
|
+
});
|
|
91
|
+
this.viewImageToDelete = false;
|
|
92
|
+
this.imageCopyValueGrid = null;
|
|
73
93
|
} else {
|
|
74
94
|
this.imageTodelete = null;
|
|
75
95
|
this.viewImageToDelete = false;
|
|
76
|
-
this.
|
|
96
|
+
this.imageCopyValueGrid = null;
|
|
77
97
|
}
|
|
78
|
-
|
|
79
|
-
}
|
|
98
|
+
}
|
|
80
99
|
|
|
81
100
|
addImage() {
|
|
82
|
-
this.uploadFileService
|
|
101
|
+
this.uploadFileService?.triggerInput();
|
|
83
102
|
}
|
|
84
103
|
}
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from
|
|
2
|
-
import { CommonModule } from
|
|
3
|
-
import { FileItem } from
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { FileItem } from "../../../utilities/interfaces/ui/upload.model";
|
|
4
|
+
import { IconComponent } from "../../icon/icon.component";
|
|
5
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
4
6
|
|
|
5
7
|
@Component({
|
|
6
|
-
selector:
|
|
8
|
+
selector: "app-grid-view",
|
|
7
9
|
standalone: true,
|
|
8
|
-
imports: [CommonModule],
|
|
9
|
-
templateUrl:
|
|
10
|
-
styleUrls: [
|
|
10
|
+
imports: [CommonModule, IconComponent, TranslateModule],
|
|
11
|
+
templateUrl: "./grid-view.component.html",
|
|
12
|
+
styleUrls: ["./grid-view.component.scss"],
|
|
11
13
|
})
|
|
12
14
|
export class GridViewComponent {
|
|
13
|
-
@Input() fileItem
|
|
14
|
-
file: undefined,
|
|
15
|
-
progress: 0,
|
|
16
|
-
state: 'uploading',
|
|
17
|
-
id: '',
|
|
18
|
-
};
|
|
15
|
+
@Input() fileItem!: FileItem;
|
|
19
16
|
@Output() action = new EventEmitter<{
|
|
20
17
|
file: FileItem;
|
|
21
|
-
type:
|
|
18
|
+
type: "delete" | "confirm-delete" | "cancel-delete";
|
|
22
19
|
}>();
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (type.includes('pdf')) return 'pdf';
|
|
27
|
-
if (type.includes('word') || type.includes('document')) return 'word';
|
|
28
|
-
if (type.startsWith('image/')) return 'image';
|
|
29
|
-
return 'generic';
|
|
21
|
+
onDelete(): void {
|
|
22
|
+
this.action.emit({ file: this.fileItem, type: "delete" });
|
|
30
23
|
}
|
|
31
24
|
|
|
32
|
-
onSendClick(type:
|
|
33
|
-
this.action.emit({ file: this.fileItem, type
|
|
25
|
+
onSendClick(type: "delete" | "confirm-delete" | "cancel-delete"): void {
|
|
26
|
+
this.action.emit({ file: this.fileItem, type });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
getFileTypeClass(file: any): string {
|
|
30
|
+
if (!file) return "file-default";
|
|
31
|
+
const type = file.type || "";
|
|
32
|
+
if (type.startsWith("image/")) return "file-image";
|
|
33
|
+
if (type === "application/pdf") return "file-pdf";
|
|
34
|
+
return "file-default";
|
|
34
35
|
}
|
|
35
36
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
background: var(--Info-Info-500);
|
|
17
17
|
}
|
|
18
18
|
&.warning {
|
|
19
|
-
background: url('../../../assets/icons/ilustration/bg-warning.svg') no-repeat center;
|
|
19
|
+
// background: url('../../../assets/icons/ilustration/bg-warning.svg') no-repeat center;
|
|
20
20
|
background-size: contain;
|
|
21
21
|
border-radius: 0;
|
|
22
22
|
}
|
|
@@ -53,7 +53,11 @@
|
|
|
53
53
|
background: linear-gradient(90deg, #ff6102 56.52%, #ffc10d 107.25%);
|
|
54
54
|
}
|
|
55
55
|
&--exclusive {
|
|
56
|
-
background: linear-gradient(
|
|
56
|
+
background: linear-gradient(
|
|
57
|
+
90deg,
|
|
58
|
+
var(--Gray-900, #0e111a) 26.09%,
|
|
59
|
+
#ff6102 116.67%
|
|
60
|
+
);
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
}
|
|
@@ -1,76 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
Input,
|
|
4
|
+
Inject,
|
|
5
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
6
|
+
} from "@angular/core";
|
|
7
|
+
import { CommonModule } from "@angular/common";
|
|
7
8
|
|
|
8
9
|
@Component({
|
|
9
|
-
selector:
|
|
10
|
+
selector: "app-dropi-image-overlay",
|
|
10
11
|
standalone: true,
|
|
11
|
-
imports: [CommonModule
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
imports: [CommonModule],
|
|
13
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
14
|
+
template: '<div *ngIf="settingsService.brand$ | async">Overlay</div>',
|
|
14
15
|
})
|
|
15
|
-
export class DropiImageOverlayComponent
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
fallbackUrl= '';
|
|
21
|
-
|
|
22
|
-
private readonly subscriptions = new Subscription();
|
|
23
|
-
constructor(private readonly imageOverlayService: ImageOverlayService, public settingsService: SettingsService) { }
|
|
24
|
-
|
|
25
|
-
ngOnInit() {
|
|
26
|
-
this.subscriptions.add(
|
|
27
|
-
this.imageOverlayService.imageUrls$.subscribe(imageUrls => {
|
|
28
|
-
this.imageUrls = imageUrls;
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
this.subscriptions.add(
|
|
34
|
-
this.imageOverlayService.selectedImageIndex$.subscribe(selectedImageIndex => {
|
|
35
|
-
this.selectedImageIndex = selectedImageIndex;
|
|
36
|
-
})
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
this.isDropi = this.settingsService.getBrand()?.name?.toLowerCase() === 'dropi';
|
|
40
|
-
this.fallbackUrl = this.isDropi ? './assets/utils/no-image.jpg' : './assets/utils/wb-no-image.jpg';
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
closeOverlay() {
|
|
44
|
-
this.imageOverlayService.closeOverlay();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
nextImage(event: MouseEvent) {
|
|
48
|
-
event.stopPropagation();
|
|
49
|
-
|
|
50
|
-
if (this.selectedImageIndex === this.imageUrls.length - 1) {
|
|
51
|
-
this.imageOverlayService.setSelectedImageIndex(0);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
this.imageOverlayService.setSelectedImageIndex(this.selectedImageIndex + 1);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
previousImage(event: MouseEvent) {
|
|
59
|
-
event.stopPropagation();
|
|
60
|
-
|
|
61
|
-
if (this.selectedImageIndex === 0) {
|
|
62
|
-
this.imageOverlayService.setSelectedImageIndex(this.imageUrls.length - 1);
|
|
63
|
-
return
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
this.imageOverlayService.setSelectedImageIndex(this.selectedImageIndex - 1);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
ngOnDestroy() {
|
|
70
|
-
this.subscriptions.unsubscribe();
|
|
71
|
-
}
|
|
72
|
-
selectImage(index: number) {
|
|
73
|
-
this.imageOverlayService.setSelectedImageIndex(index);
|
|
74
|
-
}
|
|
75
|
-
|
|
16
|
+
export class DropiImageOverlayComponent {
|
|
17
|
+
constructor(
|
|
18
|
+
@Inject("ImageOverlayService") private readonly imageOverlayService: any,
|
|
19
|
+
@Inject("SettingsService") public settingsService: any,
|
|
20
|
+
) {}
|
|
76
21
|
}
|