@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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface DropiTableColumn {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
sortable?: boolean;
|
|
5
|
+
type?: string;
|
|
6
|
+
highlightColumn?: boolean;
|
|
7
|
+
align?: "left" | "center" | "right" | string;
|
|
8
|
+
disabledColumn?: boolean;
|
|
9
|
+
imageUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DropiTableRow {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
export interface TypedField {
|
|
15
|
+
type: "text" | "currency" | "date" | "tag" | "carrier" | "textIcon" | "status" | "textLink" | string;
|
|
16
|
+
value: any;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
19
|
+
export interface DropiTableConfiguration {
|
|
20
|
+
rowActions?: DropiTableAction[];
|
|
21
|
+
pageSizeConfiguration?: number[];
|
|
22
|
+
showCheckbox?: boolean;
|
|
23
|
+
showSearch?: boolean;
|
|
24
|
+
showPaginator?: boolean;
|
|
25
|
+
showActionsPerRow?: boolean;
|
|
26
|
+
emptyMessage?: string;
|
|
27
|
+
backendPagination?: boolean;
|
|
28
|
+
title?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DropiTableAction {
|
|
31
|
+
label: string;
|
|
32
|
+
icon?: string;
|
|
33
|
+
event?: string;
|
|
34
|
+
callback?: (row: any) => void;
|
|
35
|
+
}
|
|
36
|
+
export interface DropiTableBackendParams {
|
|
37
|
+
currentPage: number;
|
|
38
|
+
pageSize: number;
|
|
39
|
+
totalPages: number;
|
|
40
|
+
totalCount: number;
|
|
41
|
+
}
|
|
42
|
+
export interface SortParams {
|
|
43
|
+
column: string;
|
|
44
|
+
asc: boolean;
|
|
45
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface InputProperties {
|
|
2
|
+
label?: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
formControl?: any;
|
|
6
|
+
showObligatory?: boolean;
|
|
7
|
+
textHelper?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
iconPos?: "left" | "right";
|
|
10
|
+
maxLength?: number;
|
|
11
|
+
minLength?: number;
|
|
12
|
+
isMoneyInput?: boolean;
|
|
13
|
+
isThousandSeparator?: boolean;
|
|
14
|
+
isNumericInput?: boolean;
|
|
15
|
+
isLettersOnly?: boolean;
|
|
16
|
+
isPasswordInput?: boolean;
|
|
17
|
+
id?: string;
|
|
18
|
+
dataCy?: string;
|
|
19
|
+
inputMode?: string;
|
|
20
|
+
showHelperOnlyOnError?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface TextAreaProperties {
|
|
23
|
+
label?: string;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
rows?: number;
|
|
26
|
+
cols?: number;
|
|
27
|
+
formControl?: any;
|
|
28
|
+
maxLength?: number;
|
|
29
|
+
minLength?: number;
|
|
30
|
+
textHelper?: string;
|
|
31
|
+
id?: string;
|
|
32
|
+
resize?: "none" | "both" | "horizontal" | "vertical" | string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface Option {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
icons?: string[];
|
|
7
|
+
tag?: string;
|
|
8
|
+
halfWidth?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
iconImages?: Array<{
|
|
11
|
+
url: string;
|
|
12
|
+
alt?: string;
|
|
13
|
+
}>;
|
|
14
|
+
descriptionIcons?: Array<{
|
|
15
|
+
url: string;
|
|
16
|
+
alt?: string;
|
|
17
|
+
}>;
|
|
18
|
+
table?: Array<{
|
|
19
|
+
name: string;
|
|
20
|
+
value: any;
|
|
21
|
+
}>;
|
|
22
|
+
checked?: boolean;
|
|
23
|
+
preIcon?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface FileItem {
|
|
2
|
+
id: string | number;
|
|
3
|
+
file: File | null;
|
|
4
|
+
progress: number;
|
|
5
|
+
state: UploadFileState;
|
|
6
|
+
previewUrl?: string;
|
|
7
|
+
typeView?: string;
|
|
8
|
+
uploadedUrl?: string;
|
|
9
|
+
fileType?: "image" | "document" | string;
|
|
10
|
+
isTemp?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type UploadFileState = "uploading" | "complete" | "error" | "confirm-delete" | "upload-complete";
|
|
13
|
+
export interface UploadParams {
|
|
14
|
+
title: string;
|
|
15
|
+
label: string;
|
|
16
|
+
previewType: "card" | "grid";
|
|
17
|
+
multiple: boolean;
|
|
18
|
+
maxFiles: number;
|
|
19
|
+
maxFileSizeMB: number;
|
|
20
|
+
accept: string[];
|
|
21
|
+
compress: boolean;
|
|
22
|
+
maxHeight: number;
|
|
23
|
+
maxWidth: number;
|
|
24
|
+
path: string;
|
|
25
|
+
onlyView: boolean;
|
|
26
|
+
viewDragAndDrop: boolean;
|
|
27
|
+
textButton?: string;
|
|
28
|
+
textDropZone?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const FILE_TYPE_MAP: Record<string, string[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dropi/ui-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Dropi UI Components - Framework-agnostic Web Components library built with Angular Elements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -23,21 +23,33 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@angular/common": "^18.2.0",
|
|
26
|
+
"@angular/compiler": "^18.2.0",
|
|
26
27
|
"@angular/core": "^18.2.0",
|
|
27
28
|
"@angular/elements": "^18.2.0",
|
|
28
29
|
"@angular/platform-browser": "^18.2.0",
|
|
29
30
|
"zone.js": "~0.14.10"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@angular-devkit/build-angular": "^18.2.
|
|
33
|
-
"@angular/cli": "^18.2.
|
|
34
|
-
"@angular/
|
|
33
|
+
"@angular-devkit/build-angular": "^18.2.21",
|
|
34
|
+
"@angular/cli": "^18.2.21",
|
|
35
|
+
"@angular/common": "^18.2.14",
|
|
36
|
+
"@angular/compiler": "^18.2.14",
|
|
37
|
+
"@angular/compiler-cli": "^18.2.14",
|
|
38
|
+
"@angular/core": "^18.2.14",
|
|
39
|
+
"@angular/elements": "^18.2.14",
|
|
40
|
+
"@angular/forms": "^18.2.14",
|
|
41
|
+
"@angular/platform-browser": "^18.2.14",
|
|
42
|
+
"@angular/router": "^18.2.14",
|
|
35
43
|
"ng-packagr": "^18.2.1",
|
|
36
44
|
"tslib": "^2.3.0",
|
|
37
|
-
"typescript": "~5.5.4"
|
|
45
|
+
"typescript": "~5.5.4",
|
|
46
|
+
"zone.js": "^0.14.10"
|
|
38
47
|
},
|
|
39
48
|
"dependencies": {
|
|
40
|
-
"@
|
|
49
|
+
"@ng-bootstrap/ng-bootstrap": "^17.0.1",
|
|
50
|
+
"@ngx-translate/core": "^15.0.0",
|
|
51
|
+
"primeicons": "^7.0.0",
|
|
52
|
+
"primeng": "^17.18.12"
|
|
41
53
|
},
|
|
42
54
|
"repository": {
|
|
43
55
|
"type": "git",
|
|
@@ -6,148 +6,41 @@ import {
|
|
|
6
6
|
OnInit,
|
|
7
7
|
Output,
|
|
8
8
|
SimpleChanges,
|
|
9
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
9
10
|
} from "@angular/core";
|
|
10
11
|
import { CommonModule } from "@angular/common";
|
|
11
12
|
import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
|
|
12
|
-
import {
|
|
13
|
-
animate,
|
|
14
|
-
keyframes,
|
|
15
|
-
style,
|
|
16
|
-
transition,
|
|
17
|
-
trigger,
|
|
18
|
-
} from "@angular/animations";
|
|
19
|
-
|
|
20
13
|
import { IconComponent } from "../icon/icon.component";
|
|
21
14
|
import { ButtonComponent } from "../dropi-button/dropi-button.component";
|
|
22
15
|
|
|
23
|
-
/**
|
|
24
|
-
* Componente que muestra una alerta en la pantalla.
|
|
25
|
-
*
|
|
26
|
-
* Basado en: https://www.figma.com/design/ONiVQJJ2qrJ6tmJnpNrrKE/%5BWEB%5D-components?node-id=26-199&p=f&m=dev
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* <app-alert
|
|
30
|
-
* [message]="'Este es un mensaje de alerta'"
|
|
31
|
-
* [type]="'default'"
|
|
32
|
-
* [state]="'success'"
|
|
33
|
-
* [dismissable]="true"
|
|
34
|
-
* [showButton]="true"
|
|
35
|
-
* [buttonText]="'Cerrar'"
|
|
36
|
-
* ></app-alert>
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* <app-alert
|
|
40
|
-
* [message]="'Este es un <b>mensaje</b> de alerta'"
|
|
41
|
-
* [type]="'flag'"
|
|
42
|
-
* [state]="'error'"
|
|
43
|
-
* [dismissable]="false"
|
|
44
|
-
* [showButton]="false"
|
|
45
|
-
* [buttonText]="'Cerrar'"
|
|
46
|
-
* ></app-alert>
|
|
47
|
-
*
|
|
48
|
-
* @param message Texto del mensaje que se mostrar, puede contener etiquetas HTML.
|
|
49
|
-
* @param type Tipo de alerta que se mostrar (default o flag).
|
|
50
|
-
* @param state Estado de la alerta (success, error, warning o info).
|
|
51
|
-
* @param dismissable Si se puede cerrar la alerta.
|
|
52
|
-
* @param showButton Si se mostrar el bot n de cierre.
|
|
53
|
-
* @param buttonText Texto del bot n de cierre.
|
|
54
|
-
* @param textLink Texto del link
|
|
55
|
-
* @param linkUrl Url del link
|
|
56
|
-
*/
|
|
57
16
|
@Component({
|
|
58
17
|
selector: "dropi-wc-alert",
|
|
59
18
|
standalone: true,
|
|
60
19
|
imports: [CommonModule, IconComponent, ButtonComponent],
|
|
20
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
61
21
|
templateUrl: "./alert.component.html",
|
|
62
22
|
styleUrls: ["./alert.component.scss"],
|
|
63
|
-
animations: [
|
|
64
|
-
trigger("fade", [
|
|
65
|
-
transition(":enter", [
|
|
66
|
-
animate(
|
|
67
|
-
"300ms ease-out",
|
|
68
|
-
keyframes([
|
|
69
|
-
style({ opacity: 0, transform: "translateY(-20px)", offset: 0 }),
|
|
70
|
-
style({
|
|
71
|
-
opacity: 0.5,
|
|
72
|
-
transform: "translateY(-10px)",
|
|
73
|
-
offset: 0.5,
|
|
74
|
-
}),
|
|
75
|
-
style({ opacity: 1, transform: "translateY(0)", offset: 1 }),
|
|
76
|
-
]),
|
|
77
|
-
),
|
|
78
|
-
]),
|
|
79
|
-
transition(":leave", [
|
|
80
|
-
animate(
|
|
81
|
-
"300ms ease-in",
|
|
82
|
-
keyframes([
|
|
83
|
-
style({ opacity: 1, transform: "translateY(0)", offset: 0 }),
|
|
84
|
-
style({
|
|
85
|
-
opacity: 0.5,
|
|
86
|
-
transform: "translateY(-10px)",
|
|
87
|
-
offset: 0.5,
|
|
88
|
-
}),
|
|
89
|
-
style({ opacity: 0, transform: "translateY(-20px)", offset: 1 }),
|
|
90
|
-
]),
|
|
91
|
-
),
|
|
92
|
-
]),
|
|
93
|
-
]),
|
|
94
|
-
],
|
|
95
23
|
})
|
|
96
24
|
export class AlertComponent implements OnInit, OnChanges {
|
|
97
|
-
/** Texto del mensaje que se mostrará en la alerta. Puede contener etiquetas HTML */
|
|
98
25
|
@Input() message: string = "";
|
|
99
|
-
|
|
100
|
-
/** Tipo de alerta que se mostrar (default o flag) */
|
|
101
26
|
@Input() type: "default" | "flag" = "default";
|
|
102
|
-
|
|
103
|
-
/** Estado de la alerta (success, error, warning o info) */
|
|
104
27
|
@Input() state: "success" | "error" | "warning" | "info" = "success";
|
|
105
|
-
|
|
106
|
-
/** Si se puede cerrar la alerta */
|
|
107
28
|
@Input() dismissable: boolean = true;
|
|
108
|
-
|
|
109
|
-
/** Si se mostrar el botón de cierre */
|
|
110
29
|
@Input() showButton: boolean = false;
|
|
111
|
-
|
|
112
|
-
/** Texto del botón de cierre */
|
|
113
30
|
@Input() buttonText: string = "Close";
|
|
114
|
-
|
|
115
31
|
@Input() anchorText: string = "none";
|
|
116
|
-
|
|
117
32
|
@Input() anchorUrl: string = "none";
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Indica si la alerta debe ser visible.
|
|
121
|
-
* Por defecto es `true`.
|
|
122
|
-
*/
|
|
123
33
|
@Input() showAlert = true;
|
|
124
|
-
|
|
125
|
-
/** Texto del link */
|
|
126
|
-
@Input() textLink: string;
|
|
127
|
-
|
|
128
|
-
/** funcion clickeable del texto */
|
|
34
|
+
@Input() textLink: string = "";
|
|
129
35
|
@Input() clickedText: string = "";
|
|
36
|
+
@Input() linkUrl: string = "";
|
|
130
37
|
|
|
131
|
-
/** Url del link */
|
|
132
|
-
@Input() linkUrl: string;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Emite un evento cuando se cierra la alerta.
|
|
136
|
-
*/
|
|
137
38
|
@Output() onClose = new EventEmitter<void>();
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Emite un evento cuando se hace click en el botón opcional.
|
|
141
|
-
*/
|
|
142
39
|
@Output() onButtonClick = new EventEmitter<void>();
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Emite un evento cuando se hace click en el botón opcional.
|
|
146
|
-
*/
|
|
147
40
|
@Output() onClickLink = new EventEmitter<void>();
|
|
148
41
|
|
|
149
|
-
sanitinezedMessage: SafeHtml;
|
|
150
|
-
alertState = {
|
|
42
|
+
sanitinezedMessage: SafeHtml = "";
|
|
43
|
+
alertState: any = {
|
|
151
44
|
success: {
|
|
152
45
|
icon: "Check-circle",
|
|
153
46
|
color: "Success-Success-500",
|
|
@@ -177,43 +70,33 @@ export class AlertComponent implements OnInit, OnChanges {
|
|
|
177
70
|
}
|
|
178
71
|
|
|
179
72
|
ngOnChanges(changes: SimpleChanges) {
|
|
180
|
-
if (
|
|
73
|
+
if (changes["message"] || changes["textLink"] || changes["linkUrl"]) {
|
|
74
|
+
this.sanitizeMessage();
|
|
75
|
+
}
|
|
181
76
|
}
|
|
182
77
|
|
|
183
|
-
/**
|
|
184
|
-
* Sanitiza el mensaje de la alerta para que pueda incluir una etiqueta <a> con un enlace
|
|
185
|
-
* y un texto de enlace. Si no se proporciona texto de enlace ni url, se devuelve el
|
|
186
|
-
* mensaje sanitizado.
|
|
187
|
-
*/
|
|
188
78
|
sanitizeMessage() {
|
|
189
79
|
if (!this.textLink || !this.linkUrl) {
|
|
190
80
|
this.sanitinezedMessage = this.sanitizer.bypassSecurityTrustHtml(
|
|
191
|
-
this.message,
|
|
81
|
+
this.message || "",
|
|
192
82
|
);
|
|
193
83
|
return;
|
|
194
84
|
}
|
|
195
85
|
|
|
196
|
-
const message = `${this.message} <a
|
|
86
|
+
const message = `${this.message || ""} <a style="${this.alertState[this.state].anchorStyle}" href="${this.linkUrl}" target="_blank"> ${this.textLink} </a>`;
|
|
197
87
|
this.sanitinezedMessage = this.sanitizer.bypassSecurityTrustHtml(message);
|
|
198
88
|
}
|
|
199
89
|
|
|
200
|
-
/**
|
|
201
|
-
* Cierra la alerta.
|
|
202
|
-
* Llama a la función closeAlert() y cambia el valor de showAlert a false.
|
|
203
|
-
*/
|
|
204
90
|
closeAlert() {
|
|
205
91
|
this.showAlert = false;
|
|
206
92
|
this.onClose.emit();
|
|
207
93
|
}
|
|
208
94
|
|
|
209
|
-
/**
|
|
210
|
-
* Emite un evento cuando se hace click en el botón opcional.
|
|
211
|
-
*/
|
|
212
95
|
buttonClick() {
|
|
213
96
|
this.onButtonClick.emit();
|
|
214
97
|
}
|
|
215
98
|
|
|
216
|
-
emitClickLink(e) {
|
|
99
|
+
emitClickLink(e: any) {
|
|
217
100
|
this.onClickLink.emit(e);
|
|
218
101
|
}
|
|
219
102
|
}
|