@dropi/ui-components 1.0.0
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/.gitignore +13 -0
- package/CONTRIBUTING.md +188 -0
- package/MIGRATION_STEPS.md +39 -0
- package/PUBLISH_CHECKLIST.md +97 -0
- package/QUICK_START.md +108 -0
- package/README.md +146 -0
- package/jest.config.ts +21 -0
- package/ng-package.json +8 -0
- package/package.json +66 -0
- package/project.json +48 -0
- package/publish.sh +113 -0
- package/src/components-source/accordion/accordion-item/accordion-item.component.html +12 -0
- package/src/components-source/accordion/accordion-item/accordion-item.component.scss +47 -0
- package/src/components-source/accordion/accordion-item/accordion-item.component.spec.ts +122 -0
- package/src/components-source/accordion/accordion-item/accordion-item.component.ts +42 -0
- package/src/components-source/accordion/accordion.component.html +3 -0
- package/src/components-source/accordion/accordion.component.scss +5 -0
- package/src/components-source/accordion/accordion.component.spec.ts +243 -0
- package/src/components-source/accordion/accordion.component.stories.ts +111 -0
- package/src/components-source/accordion/accordion.component.ts +43 -0
- package/src/components-source/alert/alert.component.html +28 -0
- package/src/components-source/alert/alert.component.scss +154 -0
- package/src/components-source/alert/alert.component.spec.ts +185 -0
- package/src/components-source/alert/alert.component.stories.ts +310 -0
- package/src/components-source/alert/alert.component.ts +203 -0
- package/src/components-source/alert-legacy/alert.component.html +21 -0
- package/src/components-source/alert-legacy/alert.component.scss +42 -0
- package/src/components-source/alert-legacy/alert.component.spec.ts +159 -0
- package/src/components-source/alert-legacy/alert.component.ts +33 -0
- package/src/components-source/alert-modal/alert-modal.component.html +124 -0
- package/src/components-source/alert-modal/alert-modal.component.scss +203 -0
- package/src/components-source/alert-modal/alert-modal.component.spec.ts +557 -0
- package/src/components-source/alert-modal/alert-modal.component.stories.ts +295 -0
- package/src/components-source/alert-modal/alert-modal.component.ts +294 -0
- package/src/components-source/alert-modal/services/template-alert-modal.service.ts +75 -0
- package/src/components-source/badge/badge.component.html +49 -0
- package/src/components-source/badge/badge.component.scss +57 -0
- package/src/components-source/badge/badge.component.spec.ts +181 -0
- package/src/components-source/badge/badge.component.ts +21 -0
- package/src/components-source/breadcrumb/breadcrumb.component.html +5 -0
- package/src/components-source/breadcrumb/breadcrumb.component.scss +46 -0
- package/src/components-source/breadcrumb/breadcrumb.component.spec.ts +279 -0
- package/src/components-source/breadcrumb/breadcrumb.component.ts +24 -0
- package/src/components-source/card-product/card-product.component.html +173 -0
- package/src/components-source/card-product/card-product.component.spec.ts +601 -0
- package/src/components-source/card-product/card-product.component.stories.ts +322 -0
- package/src/components-source/card-product/card-product.component.ts +1101 -0
- package/src/components-source/card-section/card-section.component.html +22 -0
- package/src/components-source/card-section/card-section.component.scss +14 -0
- package/src/components-source/card-section/card-section.component.spec.ts +333 -0
- package/src/components-source/card-section/card-section.component.stories.ts +141 -0
- package/src/components-source/card-section/card-section.component.ts +35 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.html +38 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.scss +147 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.spec.ts +555 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.stories.ts +157 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.ts +219 -0
- package/src/components-source/city-selector/city-selector.component.html +22 -0
- package/src/components-source/city-selector/city-selector.component.scss +1 -0
- package/src/components-source/city-selector/city-selector.component.spec.ts +278 -0
- package/src/components-source/city-selector/city-selector.component.stories.ts +200 -0
- package/src/components-source/city-selector/city-selector.component.ts +151 -0
- package/src/components-source/color-picker/color-picker.component.html +54 -0
- package/src/components-source/color-picker/color-picker.component.scss +203 -0
- package/src/components-source/color-picker/color-picker.component.spec.ts +148 -0
- package/src/components-source/color-picker/color-picker.component.stories.ts +70 -0
- package/src/components-source/color-picker/color-picker.component.ts +353 -0
- package/src/components-source/country-flags/country-flags.component.html +10 -0
- package/src/components-source/country-flags/country-flags.component.scss +34 -0
- package/src/components-source/country-flags/country-flags.component.spec.ts +78 -0
- package/src/components-source/country-flags/country-flags.component.ts +18 -0
- package/src/components-source/date-picker/date-picker.component.html +35 -0
- package/src/components-source/date-picker/date-picker.component.scss +388 -0
- package/src/components-source/date-picker/date-picker.component.spec.ts +510 -0
- package/src/components-source/date-picker/date-picker.component.stories.ts +444 -0
- package/src/components-source/date-picker/date-picker.component.ts +313 -0
- package/src/components-source/date-picker/date-picker.stories.spec.ts +150 -0
- package/src/components-source/date-picker-range/date-picker-range.component.html +45 -0
- package/src/components-source/date-picker-range/date-picker-range.component.scss +229 -0
- package/src/components-source/date-picker-range/date-picker-range.component.spec.ts +555 -0
- package/src/components-source/date-picker-range/date-picker-range.component.ts +254 -0
- package/src/components-source/dropi-avatars/dropi-avatars.component.html +17 -0
- package/src/components-source/dropi-avatars/dropi-avatars.component.scss +58 -0
- package/src/components-source/dropi-avatars/dropi-avatars.component.spec.ts +403 -0
- package/src/components-source/dropi-avatars/dropi-avatars.component.ts +24 -0
- package/src/components-source/dropi-badge/dropi-badge.component.html +12 -0
- package/src/components-source/dropi-badge/dropi-badge.component.scss +50 -0
- package/src/components-source/dropi-badge/dropi-badge.component.spec.ts +108 -0
- package/src/components-source/dropi-badge/dropi-badge.component.stories.ts +140 -0
- package/src/components-source/dropi-badge/dropi-badge.component.ts +39 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.html +67 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.scss +46 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.spec.ts +170 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.stories.ts +203 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.ts +204 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.html +65 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.scss +65 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.spec.ts +125 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.ts +38 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.stories.ts +133 -0
- package/src/components-source/dropi-button/dropi-button.component.html +37 -0
- package/src/components-source/dropi-button/dropi-button.component.scss +266 -0
- package/src/components-source/dropi-button/dropi-button.component.spec.ts +264 -0
- package/src/components-source/dropi-button/dropi-button.component.stories.ts +221 -0
- package/src/components-source/dropi-button/dropi-button.component.ts +82 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.html +24 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.scss +85 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.spec.ts +157 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.stories.ts +209 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.ts +41 -0
- package/src/components-source/dropi-carousel/dropi-carousel.component.html +57 -0
- package/src/components-source/dropi-carousel/dropi-carousel.component.scss +156 -0
- package/src/components-source/dropi-carousel/dropi-carousel.component.spec.ts +224 -0
- package/src/components-source/dropi-carousel/dropi-carousel.component.ts +266 -0
- package/src/components-source/dropi-carousel/dropi-carousel.stories.ts +365 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.css +39 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.html +18 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.spec.ts +155 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.stories.ts +101 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.ts +25 -0
- package/src/components-source/dropi-chips/dropi-chips.component.html +10 -0
- package/src/components-source/dropi-chips/dropi-chips.component.scss +54 -0
- package/src/components-source/dropi-chips/dropi-chips.component.spec.ts +356 -0
- package/src/components-source/dropi-chips/dropi-chips.component.stories.ts +275 -0
- package/src/components-source/dropi-chips/dropi-chips.component.ts +100 -0
- package/src/components-source/dropi-country-selector/countries.data.ts +239 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.html +59 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.scss +126 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.spec.ts +244 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.stories.ts +117 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.ts +179 -0
- package/src/components-source/dropi-drawer/dropi-drawer.component.html +23 -0
- package/src/components-source/dropi-drawer/dropi-drawer.component.scss +88 -0
- package/src/components-source/dropi-drawer/dropi-drawer.component.spec.ts +84 -0
- package/src/components-source/dropi-drawer/dropi-drawer.component.ts +90 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.html +30 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.scss +58 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.spec.ts +213 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.stories.ts +143 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.ts +53 -0
- package/src/components-source/dropi-favorite-button/dropi-favorite-button.component.html +23 -0
- package/src/components-source/dropi-favorite-button/dropi-favorite-button.component.scss +21 -0
- package/src/components-source/dropi-favorite-button/dropi-favorite-button.component.spec.ts +240 -0
- package/src/components-source/dropi-favorite-button/dropi-favorite-button.component.ts +31 -0
- package/src/components-source/dropi-file-upload/card-view/card-view.component.html +154 -0
- package/src/components-source/dropi-file-upload/card-view/card-view.component.scss +118 -0
- package/src/components-source/dropi-file-upload/card-view/card-view.component.ts +72 -0
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.coment.stories.ts +179 -0
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.html +111 -0
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.scss +90 -0
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.ts +172 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.html +42 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.scss +31 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.spec.ts +398 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.stories.ts +139 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.ts +329 -0
- package/src/components-source/dropi-file-upload/file-list/file-list.component.html +51 -0
- package/src/components-source/dropi-file-upload/file-list/file-list.component.scss +60 -0
- package/src/components-source/dropi-file-upload/file-list/file-list.component.ts +84 -0
- package/src/components-source/dropi-file-upload/grid-view/grid-view.component.html +77 -0
- package/src/components-source/dropi-file-upload/grid-view/grid-view.component.scss +85 -0
- package/src/components-source/dropi-file-upload/grid-view/grid-view.component.ts +35 -0
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.html +38 -0
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.scss +59 -0
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.spec.ts +214 -0
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.ts +65 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.html +54 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.scss +210 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.spec.ts +145 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.ts +76 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.stories.ts +267 -0
- package/src/components-source/dropi-languages-selector/dropi-languages-selector.component.html +17 -0
- package/src/components-source/dropi-languages-selector/dropi-languages-selector.component.scss +82 -0
- package/src/components-source/dropi-languages-selector/dropi-languages-selector.component.spec.ts +152 -0
- package/src/components-source/dropi-languages-selector/dropi-languages-selector.component.ts +41 -0
- package/src/components-source/dropi-logo/dropi-logo.component.html +3 -0
- package/src/components-source/dropi-logo/dropi-logo.component.scss +20 -0
- package/src/components-source/dropi-logo/dropi-logo.component.spec.ts +274 -0
- package/src/components-source/dropi-logo/dropi-logo.component.ts +24 -0
- package/src/components-source/dropi-modal/dropi-modal-stack.service.ts +75 -0
- package/src/components-source/dropi-modal/dropi-modal.component.html +55 -0
- package/src/components-source/dropi-modal/dropi-modal.component.scss +274 -0
- package/src/components-source/dropi-modal/dropi-modal.component.spec.ts +46 -0
- package/src/components-source/dropi-modal/dropi-modal.component.stories.ts +392 -0
- package/src/components-source/dropi-modal/dropi-modal.component.ts +392 -0
- package/src/components-source/dropi-modal/p-template.directive.ts +11 -0
- package/src/components-source/dropi-navbar/dropi-navbar.component.html +41 -0
- package/src/components-source/dropi-navbar/dropi-navbar.component.scss +227 -0
- package/src/components-source/dropi-navbar/dropi-navbar.component.spec.ts +110 -0
- package/src/components-source/dropi-navbar/dropi-navbar.component.ts +52 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.html +64 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.scss +43 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.spec.ts +285 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.stories.ts +345 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.ts +85 -0
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.html +93 -0
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.scss +224 -0
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.spec.ts +376 -0
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.ts +203 -0
- package/src/components-source/dropi-phone-input/numeric-input.directive.ts +17 -0
- package/src/components-source/dropi-radio-button/dropi-radio-button.component.html +8 -0
- package/src/components-source/dropi-radio-button/dropi-radio-button.component.scss +33 -0
- package/src/components-source/dropi-radio-button/dropi-radio-button.component.spec.ts +225 -0
- package/src/components-source/dropi-radio-button/dropi-radio-button.component.ts +48 -0
- package/src/components-source/dropi-search/dropi-search.component.html +124 -0
- package/src/components-source/dropi-search/dropi-search.component.scss +116 -0
- package/src/components-source/dropi-search/dropi-search.component.spec.ts +483 -0
- package/src/components-source/dropi-search/dropi-search.component.stories.ts +267 -0
- package/src/components-source/dropi-search/dropi-search.component.ts +230 -0
- package/src/components-source/dropi-select/dropi-select.component.html +158 -0
- package/src/components-source/dropi-select/dropi-select.component.scss +275 -0
- package/src/components-source/dropi-select/dropi-select.component.spec.ts +386 -0
- package/src/components-source/dropi-select/dropi-select.component.stories.ts +686 -0
- package/src/components-source/dropi-select/dropi-select.component.ts +465 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.html +10 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.scss +28 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.spec.ts +273 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.stories.ts +145 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.ts +30 -0
- package/src/components-source/dropi-steps/dropi-steps.component.html +29 -0
- package/src/components-source/dropi-steps/dropi-steps.component.scss +110 -0
- package/src/components-source/dropi-steps/dropi-steps.component.spec.ts +228 -0
- package/src/components-source/dropi-steps/dropi-steps.component.stories.ts +231 -0
- package/src/components-source/dropi-steps/dropi-steps.component.ts +98 -0
- package/src/components-source/dropi-switch/dropi-switch.component.html +4 -0
- package/src/components-source/dropi-switch/dropi-switch.component.scss +50 -0
- package/src/components-source/dropi-switch/dropi-switch.component.spec.ts +105 -0
- package/src/components-source/dropi-switch/dropi-switch.component.stories.ts +106 -0
- package/src/components-source/dropi-switch/dropi-switch.component.ts +22 -0
- package/src/components-source/dropi-table/dropi-table.component.html +395 -0
- package/src/components-source/dropi-table/dropi-table.component.scss +506 -0
- package/src/components-source/dropi-table/dropi-table.component.spec.ts +578 -0
- package/src/components-source/dropi-table/dropi-table.component.stories.ts +313 -0
- package/src/components-source/dropi-table/dropi-table.component.ts +580 -0
- package/src/components-source/dropi-tag/dropi-tag.component.html +17 -0
- package/src/components-source/dropi-tag/dropi-tag.component.scss +50 -0
- package/src/components-source/dropi-tag/dropi-tag.component.spec.ts +267 -0
- package/src/components-source/dropi-tag/dropi-tag.component.stories.ts +290 -0
- package/src/components-source/dropi-tag/dropi-tag.component.ts +92 -0
- package/src/components-source/dropi-text-area/droip-text-area.component.stories.ts +138 -0
- package/src/components-source/dropi-text-area/dropi-text-area.component.html +63 -0
- package/src/components-source/dropi-text-area/dropi-text-area.component.scss +106 -0
- package/src/components-source/dropi-text-area/dropi-text-area.component.spec.ts +507 -0
- package/src/components-source/dropi-text-area/dropi-text-area.component.ts +80 -0
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.html +70 -0
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.scss +250 -0
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.spec.ts +423 -0
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.ts +153 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.html +20 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.scss +63 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.spec.ts +121 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.ts +43 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.stories.ts +125 -0
- package/src/components-source/empty-state/empty-state.component.html +30 -0
- package/src/components-source/empty-state/empty-state.component.scss +76 -0
- package/src/components-source/empty-state/empty-state.component.spec.ts +244 -0
- package/src/components-source/empty-state/empty-state.component.stories.ts +198 -0
- package/src/components-source/empty-state/empty-state.component.ts +34 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.html +81 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.scss +86 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.spec.ts +27 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.stories.ts +149 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.ts +89 -0
- package/src/components-source/foundations/dropi-border-radius-demo/dropi-border-radius-demo.component.scss +32 -0
- package/src/components-source/foundations/dropi-border-radius-demo/dropi-border-radius-demo.component.ts +17 -0
- package/src/components-source/foundations/foundations.component.html +183 -0
- package/src/components-source/foundations/foundations.component.scss +31 -0
- package/src/components-source/foundations/foundations.component.ts +26 -0
- package/src/components-source/icon/icon-names.const.ts +270 -0
- package/src/components-source/icon/icon.component.html +3 -0
- package/src/components-source/icon/icon.component.scss +4 -0
- package/src/components-source/icon/icon.component.spec.ts +304 -0
- package/src/components-source/icon/icon.component.ts +53 -0
- package/src/components-source/index.ts +89 -0
- package/src/components-source/input/input.component.html +97 -0
- package/src/components-source/input/input.component.scss +149 -0
- package/src/components-source/input/input.component.spec.ts +243 -0
- package/src/components-source/input/input.component.stories.ts +269 -0
- package/src/components-source/input/input.component.ts +119 -0
- package/src/components-source/lottie-loader/lottie-loader.component.html +16 -0
- package/src/components-source/lottie-loader/lottie-loader.component.scss +32 -0
- package/src/components-source/lottie-loader/lottie-loader.component.spec.ts +103 -0
- package/src/components-source/lottie-loader/lottie-loader.component.ts +20 -0
- package/src/components-source/otp-send-code/mock-otp-services.ts +214 -0
- package/src/components-source/otp-send-code/otp-send-code.component.html +151 -0
- package/src/components-source/otp-send-code/otp-send-code.component.scss +156 -0
- package/src/components-source/otp-send-code/otp-send-code.component.spec.ts +419 -0
- package/src/components-source/otp-send-code/otp-send-code.component.stories.ts +190 -0
- package/src/components-source/otp-send-code/otp-send-code.component.ts +659 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.html +107 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.scss +280 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.spec.ts +243 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.stories.ts +313 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.ts +143 -0
- package/src/components-source/read-more/read-more.component.html +14 -0
- package/src/components-source/read-more/read-more.component.scss +16 -0
- package/src/components-source/read-more/read-more.component.spec.ts +272 -0
- package/src/components-source/read-more/read-more.component.stories.ts +131 -0
- package/src/components-source/read-more/read-more.component.ts +88 -0
- package/src/components-source/sidebar/sidebar.component.html +42 -0
- package/src/components-source/sidebar/sidebar.component.scss +70 -0
- package/src/components-source/sidebar/sidebar.component.spec.ts +354 -0
- package/src/components-source/sidebar/sidebar.component.stories.ts +145 -0
- package/src/components-source/sidebar/sidebar.component.ts +105 -0
- package/src/components-source/simple-stepper/simple-stepper.component.html +17 -0
- package/src/components-source/simple-stepper/simple-stepper.component.scss +117 -0
- package/src/components-source/simple-stepper/simple-stepper.component.spec.ts +348 -0
- package/src/components-source/simple-stepper/simple-stepper.component.stories.ts +104 -0
- package/src/components-source/simple-stepper/simple-stepper.component.ts +69 -0
- package/src/components-source/storybook-doc-components/avatars-storybook/avatars-storybook.component.html +192 -0
- package/src/components-source/storybook-doc-components/avatars-storybook/avatars-storybook.component.scss +15 -0
- package/src/components-source/storybook-doc-components/avatars-storybook/avatars-storybook.component.ts +17 -0
- package/src/components-source/storybook-doc-components/border-radius-storybook/border-radius-storybook.component.html +22 -0
- package/src/components-source/storybook-doc-components/border-radius-storybook/border-radius-storybook.component.scss +0 -0
- package/src/components-source/storybook-doc-components/border-radius-storybook/border-radius-storybook.component.ts +54 -0
- package/src/components-source/storybook-doc-components/breakpoints-and-grids-storybook/breakpoints-and-grids-storybook.component.css +81 -0
- package/src/components-source/storybook-doc-components/breakpoints-and-grids-storybook/breakpoints-and-grids-storybook.component.html +143 -0
- package/src/components-source/storybook-doc-components/breakpoints-and-grids-storybook/breakpoints-and-grids-storybook.component.ts +97 -0
- package/src/components-source/storybook-doc-components/colors-storybook/colors-storybook.component.css +10 -0
- package/src/components-source/storybook-doc-components/colors-storybook/colors-storybook.component.html +63 -0
- package/src/components-source/storybook-doc-components/colors-storybook/colors-storybook.component.ts +542 -0
- package/src/components-source/storybook-doc-components/dropi-modal/dropi-modal.component.html +132 -0
- package/src/components-source/storybook-doc-components/dropi-modal/dropi-modal.component.scss +15 -0
- package/src/components-source/storybook-doc-components/dropi-modal/dropi-modal.component.ts +67 -0
- package/src/components-source/storybook-doc-components/dropi-toast/dropi-toast.component.html +156 -0
- package/src/components-source/storybook-doc-components/dropi-toast/dropi-toast.component.scss +13 -0
- package/src/components-source/storybook-doc-components/dropi-toast/dropi-toast.component.ts +55 -0
- package/src/components-source/storybook-doc-components/flags-storybook/flags-storybook.component.css +0 -0
- package/src/components-source/storybook-doc-components/flags-storybook/flags-storybook.component.html +99 -0
- package/src/components-source/storybook-doc-components/flags-storybook/flags-storybook.component.ts +19 -0
- package/src/components-source/storybook-doc-components/icons-storybook/icons-storybook.component.css +82 -0
- package/src/components-source/storybook-doc-components/icons-storybook/icons-storybook.component.html +111 -0
- package/src/components-source/storybook-doc-components/icons-storybook/icons-storybook.component.ts +196 -0
- package/src/components-source/storybook-doc-components/logo-storybook/logo-foundations.component.ts +19 -0
- package/src/components-source/storybook-doc-components/logo-storybook/logo-storybook.component.css +0 -0
- package/src/components-source/storybook-doc-components/logo-storybook/logo-storybook.component.html +104 -0
- package/src/components-source/storybook-doc-components/lustration-storybook/lustration-storybook.component.css +0 -0
- package/src/components-source/storybook-doc-components/lustration-storybook/lustration-storybook.component.html +218 -0
- package/src/components-source/storybook-doc-components/lustration-storybook/lustration-storybook.component.ts +20 -0
- package/src/components-source/storybook-doc-components/shadow-storybook/shadow-storybook.component.html +21 -0
- package/src/components-source/storybook-doc-components/shadow-storybook/shadow-storybook.component.scss +0 -0
- package/src/components-source/storybook-doc-components/shadow-storybook/shadow-storybook.component.ts +66 -0
- package/src/components-source/storybook-doc-components/spacing-storybook/spacing-storybook.component.html +33 -0
- package/src/components-source/storybook-doc-components/spacing-storybook/spacing-storybook.component.scss +0 -0
- package/src/components-source/storybook-doc-components/spacing-storybook/spacing-storybook.component.ts +37 -0
- package/src/components-source/storybook-doc-components/story-page/story-page.component.html +74 -0
- package/src/components-source/storybook-doc-components/story-page/story-page.component.scss +103 -0
- package/src/components-source/storybook-doc-components/story-page/story-page.component.ts +424 -0
- package/src/components-source/storybook-doc-components/template-breakpoint-storybook/template-breakpoint-storybook.component.html +35 -0
- package/src/components-source/storybook-doc-components/template-breakpoint-storybook/template-breakpoint-storybook.component.scss +64 -0
- package/src/components-source/storybook-doc-components/template-breakpoint-storybook/template-breakpoint-storybook.component.ts +71 -0
- package/src/components-source/storybook-doc-components/tillte-table-documentation/tillte-table-documentation.component.html +44 -0
- package/src/components-source/storybook-doc-components/tillte-table-documentation/tillte-table-documentation.component.scss +270 -0
- package/src/components-source/storybook-doc-components/tillte-table-documentation/tillte-table-documentation.component.ts +153 -0
- package/src/components-source/tabs/tabs.component.html +26 -0
- package/src/components-source/tabs/tabs.component.scss +62 -0
- package/src/components-source/tabs/tabs.component.spec.ts +212 -0
- package/src/components-source/tabs/tabs.component.stories.ts +203 -0
- package/src/components-source/tabs/tabs.component.ts +138 -0
- package/src/components-source/tag-type-product/tag-type-product.component.html +1 -0
- package/src/components-source/tag-type-product/tag-type-product.component.scss +10 -0
- package/src/components-source/tag-type-product/tag-type-product.component.spec.ts +38 -0
- package/src/components-source/tag-type-product/tag-type-product.component.ts +9 -0
- package/src/components-source/toast/toast.component.html +37 -0
- package/src/components-source/toast/toast.component.scss +142 -0
- package/src/components-source/toast/toast.component.spec.ts +368 -0
- package/src/components-source/toast/toast.component.ts +59 -0
- package/src/components-source/toast/toast.stories.ts +69 -0
- package/src/components-source/tooltip/tooltip.component.html +46 -0
- package/src/components-source/tooltip/tooltip.component.scss +44 -0
- package/src/components-source/tooltip/tooltip.component.spec.ts +327 -0
- package/src/components-source/tooltip/tooltip.component.ts +24 -0
- package/src/components-source/ui-dropi.module.ts +125 -0
- package/src/components-source/ui-inventory.json +1138 -0
- package/src/components-source/vertical-steps/vertical-steps.component.html +35 -0
- package/src/components-source/vertical-steps/vertical-steps.component.scss +143 -0
- package/src/components-source/vertical-steps/vertical-steps.component.spec.ts +121 -0
- package/src/components-source/vertical-steps/vertical-steps.component.stories.ts +216 -0
- package/src/components-source/vertical-steps/vertical-steps.component.ts +151 -0
- package/src/index.ts +31 -0
- package/src/lib/bootstrap.ts +28 -0
- package/src/lib/dropi-ui-elements/dropi-ui-elements.component.html +1 -0
- package/src/lib/dropi-ui-elements/dropi-ui-elements.component.scss +0 -0
- package/src/lib/dropi-ui-elements/dropi-ui-elements.component.spec.ts +21 -0
- package/src/lib/dropi-ui-elements/dropi-ui-elements.component.ts +9 -0
- package/src/lib/elements-registry.ts +66 -0
- package/src/lib/elements.module.ts +22 -0
- package/src/styles.scss +152 -0
- package/src/test-setup.ts +6 -0
- package/tsconfig.json +28 -0
- package/tsconfig.lib.json +18 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +12 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { DebugElement } from '@angular/core';
|
|
3
|
+
import { EmptyStateComponent } from './empty-state.component';
|
|
4
|
+
import { SettingsService } from '@app/services/setting.service';
|
|
5
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
6
|
+
import { ButtonComponent } from '../dropi-button/dropi-button.component';
|
|
7
|
+
import { IconComponent } from '../icon/icon.component';
|
|
8
|
+
|
|
9
|
+
describe('EmptyStateComponent', () => {
|
|
10
|
+
let component: EmptyStateComponent;
|
|
11
|
+
let fixture: ComponentFixture<EmptyStateComponent>;
|
|
12
|
+
let mockSettingsService: any;
|
|
13
|
+
|
|
14
|
+
beforeEach(async () => {
|
|
15
|
+
mockSettingsService = {
|
|
16
|
+
getBrandInfo: jest.fn().mockReturnValue({
|
|
17
|
+
name: 'TestBrand',
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Instanciación directa del componente standalone
|
|
22
|
+
component = new EmptyStateComponent(mockSettingsService);
|
|
23
|
+
|
|
24
|
+
// Mock del fixture para compatibilidad
|
|
25
|
+
fixture = {
|
|
26
|
+
componentInstance: component,
|
|
27
|
+
debugElement: {
|
|
28
|
+
nativeElement: document.createElement('div'),
|
|
29
|
+
query: jest.fn(),
|
|
30
|
+
queryAll: jest.fn().mockReturnValue([]),
|
|
31
|
+
},
|
|
32
|
+
nativeElement: document.createElement('div'),
|
|
33
|
+
detectChanges: jest.fn(),
|
|
34
|
+
destroy: jest.fn(),
|
|
35
|
+
} as any;
|
|
36
|
+
|
|
37
|
+
// Llamar ngOnInit manualmente
|
|
38
|
+
component.ngOnInit();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
describe('Inicialización del componente', () => {
|
|
42
|
+
it('should create', () => {
|
|
43
|
+
expect(component).toBeTruthy();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('should initialize with default values', () => {
|
|
47
|
+
expect(component.buttonText).toBe('');
|
|
48
|
+
expect(component.description).toBe('');
|
|
49
|
+
expect(component.title).toBe('');
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('should set brandName from SettingsService on ngOnInit', () => {
|
|
53
|
+
expect(mockSettingsService.getBrandInfo).toHaveBeenCalled();
|
|
54
|
+
expect(component.brandName).toBe('testbrand');
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
describe('Propiedades de entrada', () => {
|
|
59
|
+
it('should accept buttonText input', () => {
|
|
60
|
+
component.buttonText = 'Click Me';
|
|
61
|
+
expect(component.buttonText).toBe('Click Me');
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('should accept description input', () => {
|
|
65
|
+
component.description = 'This is a test description';
|
|
66
|
+
expect(component.description).toBe('This is a test description');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('should accept title input', () => {
|
|
70
|
+
component.title = 'Test Title';
|
|
71
|
+
expect(component.title).toBe('Test Title');
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
describe('Eventos de salida', () => {
|
|
76
|
+
it('should emit buttonClickEvent when buttonClick is called', () => {
|
|
77
|
+
const emitSpy = jest.spyOn(component.buttonClickEvent, 'emit');
|
|
78
|
+
|
|
79
|
+
component.buttonClick();
|
|
80
|
+
|
|
81
|
+
expect(emitSpy).toHaveBeenCalled();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('should emit event when button is clicked in template', () => {
|
|
85
|
+
const emitSpy = jest.spyOn(component.buttonClickEvent, 'emit');
|
|
86
|
+
component.buttonText = 'Test Button';
|
|
87
|
+
fixture.detectChanges();
|
|
88
|
+
|
|
89
|
+
const buttonComponent = fixture.debugElement.query(
|
|
90
|
+
(de) => de.nativeElement.tagName === 'DROPI-BUTTON',
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
if (buttonComponent) {
|
|
94
|
+
buttonComponent.triggerEventHandler('onClick', null);
|
|
95
|
+
expect(emitSpy).toHaveBeenCalled();
|
|
96
|
+
} else {
|
|
97
|
+
// Si no encontramos el botón, al menos el test no debe fallar
|
|
98
|
+
expect(true).toBe(true);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
describe('SettingsService integration', () => {
|
|
104
|
+
it('should call getBrandInfo on initialization', () => {
|
|
105
|
+
expect(mockSettingsService.getBrandInfo).toHaveBeenCalled();
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it('should convert brand name to lowercase', () => {
|
|
109
|
+
mockSettingsService.getBrandInfo.mockReturnValue({
|
|
110
|
+
name: 'UPPERCASE_BRAND',
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
component.ngOnInit();
|
|
114
|
+
|
|
115
|
+
expect(component.brandName).toBe('uppercase_brand');
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it('should handle empty brand name', () => {
|
|
119
|
+
mockSettingsService.getBrandInfo.mockReturnValue({
|
|
120
|
+
name: '',
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
component.ngOnInit();
|
|
124
|
+
|
|
125
|
+
expect(component.brandName).toBe('');
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it('should handle undefined brand name', () => {
|
|
129
|
+
mockSettingsService.getBrandInfo.mockReturnValue({
|
|
130
|
+
name: undefined,
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
expect(() => component.ngOnInit()).toThrow();
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
describe('Renderizado', () => {
|
|
138
|
+
it('should display title when provided', () => {
|
|
139
|
+
component.title = 'Empty State Title';
|
|
140
|
+
// Sin TestBed completo, solo verificamos que la propiedad se establece
|
|
141
|
+
expect(component.title).toBe('Empty State Title');
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it('should display description when provided', () => {
|
|
145
|
+
component.description = 'Empty State Description';
|
|
146
|
+
expect(component.description).toBe('Empty State Description');
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it('should display button when buttonText is provided', () => {
|
|
150
|
+
component.buttonText = 'Action Button';
|
|
151
|
+
fixture.detectChanges();
|
|
152
|
+
|
|
153
|
+
// Verificamos que buttonText está configurado
|
|
154
|
+
expect(component.buttonText).toBe('Action Button');
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('should not display button when buttonText is empty', () => {
|
|
158
|
+
component.buttonText = '';
|
|
159
|
+
fixture.detectChanges();
|
|
160
|
+
|
|
161
|
+
expect(component.buttonText).toBe('');
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
it('should display icon when present', () => {
|
|
165
|
+
fixture.detectChanges();
|
|
166
|
+
|
|
167
|
+
// El componente muestra icon según brandName
|
|
168
|
+
expect(component.brandName).toBe('testbrand');
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
describe('Casos edge', () => {
|
|
173
|
+
it('should handle null inputs gracefully', () => {
|
|
174
|
+
component.title = null as any;
|
|
175
|
+
component.description = null as any;
|
|
176
|
+
component.buttonText = null as any;
|
|
177
|
+
|
|
178
|
+
expect(() => fixture.detectChanges()).not.toThrow();
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it('should handle undefined inputs gracefully', () => {
|
|
182
|
+
component.title = undefined as any;
|
|
183
|
+
component.description = undefined as any;
|
|
184
|
+
component.buttonText = undefined as any;
|
|
185
|
+
|
|
186
|
+
expect(() => fixture.detectChanges()).not.toThrow();
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
it('should handle SettingsService error gracefully', () => {
|
|
190
|
+
mockSettingsService.getBrandInfo.mockImplementation(() => {
|
|
191
|
+
throw new Error('Settings service error');
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
expect(() => component.ngOnInit()).toThrow();
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it('should handle missing brand info', () => {
|
|
198
|
+
mockSettingsService.getBrandInfo.mockReturnValue(null);
|
|
199
|
+
|
|
200
|
+
expect(() => component.ngOnInit()).toThrow();
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
describe('Integración completa', () => {
|
|
205
|
+
it('should handle complete empty state configuration', () => {
|
|
206
|
+
// Setup component with all properties
|
|
207
|
+
component.title = 'No Data Found';
|
|
208
|
+
component.description = 'There are no items to display at this time.';
|
|
209
|
+
component.buttonText = 'Add New Item';
|
|
210
|
+
|
|
211
|
+
fixture.detectChanges();
|
|
212
|
+
|
|
213
|
+
// Verify all properties are set correctly
|
|
214
|
+
expect(component.title).toBe('No Data Found');
|
|
215
|
+
expect(component.description).toBe('There are no items to display at this time.');
|
|
216
|
+
expect(component.buttonText).toBe('Add New Item');
|
|
217
|
+
expect(component.brandName).toBe('testbrand');
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
it('should handle minimal empty state', () => {
|
|
221
|
+
component.title = 'Empty';
|
|
222
|
+
// No description or button
|
|
223
|
+
|
|
224
|
+
fixture.detectChanges();
|
|
225
|
+
|
|
226
|
+
expect(component.title).toBe('Empty');
|
|
227
|
+
expect(component.description).toBe('');
|
|
228
|
+
expect(component.buttonText).toBe('');
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
it('should handle button interaction workflow', () => {
|
|
232
|
+
const emitSpy = jest.spyOn(component.buttonClickEvent, 'emit');
|
|
233
|
+
|
|
234
|
+
component.title = 'No Results';
|
|
235
|
+
component.buttonText = 'Try Again';
|
|
236
|
+
fixture.detectChanges();
|
|
237
|
+
|
|
238
|
+
// Simulate button click
|
|
239
|
+
component.buttonClick();
|
|
240
|
+
|
|
241
|
+
expect(emitSpy).toHaveBeenCalled();
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
});
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { type Meta, type StoryObj, applicationConfig } from '@storybook/angular';
|
|
2
|
+
import { importProvidersFrom, APP_INITIALIZER } from '@angular/core';
|
|
3
|
+
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
4
|
+
|
|
5
|
+
import { EmptyStateComponent } from './empty-state.component';
|
|
6
|
+
import { SettingsService } from '@app/services/setting.service';
|
|
7
|
+
|
|
8
|
+
/* ---------------- Claves planas (ES / EN) ---------------- */
|
|
9
|
+
const ES: Record<string, string> = {
|
|
10
|
+
// Empty state (descripciones y botones)
|
|
11
|
+
'no results found': 'No encontramos resultados para tu búsqueda.',
|
|
12
|
+
'create new order': 'Crear nuevo pedido',
|
|
13
|
+
"you don't have any products yet": 'Aún no tienes productos.',
|
|
14
|
+
'create product': 'Crear producto',
|
|
15
|
+
'no data to display': 'No hay datos para mostrar.',
|
|
16
|
+
'no items match your filters':
|
|
17
|
+
'No encontramos ningún elemento que coincida con los filtros aplicados. Intenta ajustar los criterios o crea un nuevo registro.',
|
|
18
|
+
'create record': 'Crear registro',
|
|
19
|
+
|
|
20
|
+
// (ejemplo genérico por si lo usas en otros componentes)
|
|
21
|
+
'close modal': 'Cerrar modal',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const EN: Record<string, string> = {
|
|
25
|
+
'no results found': 'We found no results for your search.',
|
|
26
|
+
'create new order': 'Create new order',
|
|
27
|
+
"you don't have any products yet": 'You don’t have any products yet.',
|
|
28
|
+
'create product': 'Create product',
|
|
29
|
+
'no data to display': 'There is no data to display.',
|
|
30
|
+
'no items match your filters':
|
|
31
|
+
'We didn’t find any items matching your filters. Try adjusting criteria or create a new record.',
|
|
32
|
+
'create record': 'Create record',
|
|
33
|
+
|
|
34
|
+
'close modal': 'Close modal',
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
function setupI18nFactory(translate: TranslateService) {
|
|
38
|
+
return () => {
|
|
39
|
+
translate.setTranslation('es', ES, true);
|
|
40
|
+
translate.setTranslation('en', EN, true);
|
|
41
|
+
translate.use('es'); // idioma por defecto en las historias
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* ---------------- SettingsService mocks ---------------- */
|
|
46
|
+
class SettingsServiceDropiMock {
|
|
47
|
+
getBrandInfo() {
|
|
48
|
+
return { name: 'dropi' };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
class SettingsServiceWhiteLabelMock {
|
|
52
|
+
getBrandInfo() {
|
|
53
|
+
return { name: 'AcmeShop' }; // cualquier nombre ≠ 'dropi'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* ---------------- Meta ---------------- */
|
|
58
|
+
const meta: Meta<EmptyStateComponent> = {
|
|
59
|
+
title: 'UI Dropi/Empty State',
|
|
60
|
+
component: EmptyStateComponent,
|
|
61
|
+
tags: ['autodocs'],
|
|
62
|
+
decorators: [
|
|
63
|
+
applicationConfig({
|
|
64
|
+
providers: [
|
|
65
|
+
importProvidersFrom(TranslateModule.forRoot()),
|
|
66
|
+
{ provide: SettingsService, useClass: SettingsServiceDropiMock },
|
|
67
|
+
{
|
|
68
|
+
provide: APP_INITIALIZER,
|
|
69
|
+
useFactory: setupI18nFactory,
|
|
70
|
+
deps: [TranslateService],
|
|
71
|
+
multi: true,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
}),
|
|
75
|
+
],
|
|
76
|
+
parameters: {
|
|
77
|
+
layout: 'centered',
|
|
78
|
+
design: {
|
|
79
|
+
type: 'figma',
|
|
80
|
+
url: 'https://www.figma.com/design/ONiVQJJ2qrJ6tmJnpNrrKE/-WEB--components?node-id=225-5190&m=dev',
|
|
81
|
+
},
|
|
82
|
+
docs: {
|
|
83
|
+
description: {
|
|
84
|
+
component: `
|
|
85
|
+
# Empty State Component
|
|
86
|
+
|
|
87
|
+
This component **automatically applies** \`| translate\`. Pass **flat descriptive keys** (not nested), e.g. \`"no results found"\`.
|
|
88
|
+
|
|
89
|
+
### ✅ Correct
|
|
90
|
+
\`\`\`ts
|
|
91
|
+
description = 'no results found';
|
|
92
|
+
buttonText = 'create new order';
|
|
93
|
+
\`\`\`
|
|
94
|
+
|
|
95
|
+
### ❌ Incorrect
|
|
96
|
+
Don't translate before or use the pipe in args:
|
|
97
|
+
\`\`\`ts
|
|
98
|
+
description = translate.instant('no results found'); // NO
|
|
99
|
+
buttonText = 'create new order' | translate; // NO
|
|
100
|
+
\`\`\`
|
|
101
|
+
|
|
102
|
+
## 🏷️ Brand
|
|
103
|
+
- **dropi** → renders the logo
|
|
104
|
+
- **white label** → renders an icon in gray container
|
|
105
|
+
`,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
argTypes: {
|
|
110
|
+
description: { control: 'text', description: 'Descriptive key for the description text.' },
|
|
111
|
+
buttonText: { control: 'text', description: 'Descriptive key for the button (empty to hide).' },
|
|
112
|
+
buttonClickEvent: {
|
|
113
|
+
action: 'buttonClickEvent',
|
|
114
|
+
description: 'Emitted when button is clicked.',
|
|
115
|
+
},
|
|
116
|
+
dropiIcon: {
|
|
117
|
+
control: 'select',
|
|
118
|
+
options: ['success', 'error', 'warning', 'info', 'default', 'loading', 'sorry'],
|
|
119
|
+
description: 'Existing states for Dropi illustrations.',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export default meta;
|
|
125
|
+
type Story = StoryObj<EmptyStateComponent>;
|
|
126
|
+
|
|
127
|
+
/* ---------------- Stories (using flat keys) ---------------- */
|
|
128
|
+
|
|
129
|
+
export const DropiBrand: Story = {
|
|
130
|
+
name: 'Dropi default – with button',
|
|
131
|
+
args: {
|
|
132
|
+
description: 'No results',
|
|
133
|
+
buttonText: 'Try again',
|
|
134
|
+
title: 'We found no results for your search.',
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export const DropiSorry: Story = {
|
|
139
|
+
name: 'Dropi Sorry – (illustrate Icon)',
|
|
140
|
+
args: {
|
|
141
|
+
description: 'No results',
|
|
142
|
+
buttonText: 'Try again',
|
|
143
|
+
title: 'We found no results for your search.',
|
|
144
|
+
dropiIcon: 'sorry',
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export const WhiteLabelBrand: Story = {
|
|
149
|
+
name: 'White label – with button',
|
|
150
|
+
args: {
|
|
151
|
+
description: "You don't have any products yet.",
|
|
152
|
+
buttonText: 'Create product',
|
|
153
|
+
},
|
|
154
|
+
decorators: [
|
|
155
|
+
applicationConfig({
|
|
156
|
+
providers: [{ provide: SettingsService, useClass: SettingsServiceWhiteLabelMock }],
|
|
157
|
+
}),
|
|
158
|
+
],
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export const WithoutButton: Story = {
|
|
162
|
+
name: 'Without button',
|
|
163
|
+
args: {
|
|
164
|
+
description: 'No information to display',
|
|
165
|
+
buttonText: '',
|
|
166
|
+
},
|
|
167
|
+
decorators: [
|
|
168
|
+
applicationConfig({
|
|
169
|
+
providers: [{ provide: SettingsService, useClass: SettingsServiceWhiteLabelMock }],
|
|
170
|
+
}),
|
|
171
|
+
],
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export const onlyTitle: Story = {
|
|
175
|
+
name: 'Title only',
|
|
176
|
+
args: {
|
|
177
|
+
title: 'No data to display.',
|
|
178
|
+
buttonText: 'Retry',
|
|
179
|
+
},
|
|
180
|
+
decorators: [
|
|
181
|
+
applicationConfig({
|
|
182
|
+
providers: [{ provide: SettingsService, useClass: SettingsServiceWhiteLabelMock }],
|
|
183
|
+
}),
|
|
184
|
+
],
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export const LongDescription: Story = {
|
|
188
|
+
name: 'Long description',
|
|
189
|
+
args: {
|
|
190
|
+
description: 'No results found according to the entered search filters',
|
|
191
|
+
buttonText: 'Retry',
|
|
192
|
+
},
|
|
193
|
+
decorators: [
|
|
194
|
+
applicationConfig({
|
|
195
|
+
providers: [{ provide: SettingsService, useClass: SettingsServiceWhiteLabelMock }],
|
|
196
|
+
}),
|
|
197
|
+
],
|
|
198
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ButtonComponent } from '../dropi-button/dropi-button.component';
|
|
4
|
+
import { SettingsService } from '@app/services/setting.service';
|
|
5
|
+
import { IconComponent } from '../icon/icon.component';
|
|
6
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
7
|
+
import { DropiIlustrationIconComponent } from '../dropi-ilustration-icon/dropi-ilustration-icon.component';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'app-empty-state',
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [CommonModule, ButtonComponent, IconComponent, TranslateModule, DropiIlustrationIconComponent],
|
|
13
|
+
templateUrl: './empty-state.component.html',
|
|
14
|
+
styleUrls: ['./empty-state.component.scss'],
|
|
15
|
+
})
|
|
16
|
+
export class EmptyStateComponent implements OnInit {
|
|
17
|
+
@Input() buttonText: string = '';
|
|
18
|
+
@Input() description: string = '';
|
|
19
|
+
@Input() buttonSeverity: 'primary' | 'secondary' | 'tertiary' = 'tertiary';
|
|
20
|
+
@Input() title: string = '';
|
|
21
|
+
@Output() buttonClickEvent = new EventEmitter();
|
|
22
|
+
brandName: string;
|
|
23
|
+
@Input() dropiIcon: 'success'| 'error'| 'warning'| 'info'| 'default'| 'loading'| 'sorry' = 'default';
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
constructor(private readonly settingsService: SettingsService) {}
|
|
27
|
+
ngOnInit(): void {
|
|
28
|
+
this.brandName = this.settingsService.getBrandInfo().name.toLowerCase();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
buttonClick() {
|
|
32
|
+
this.buttonClickEvent.emit();
|
|
33
|
+
}
|
|
34
|
+
}
|
package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.html
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<div class="container-progress-bar">
|
|
2
|
+
<div class="container-icon-info" *ngIf="fileExtension !== 'pdf'">
|
|
3
|
+
<app-icon
|
|
4
|
+
*ngIf="type !== 'image'"
|
|
5
|
+
name="File-text"
|
|
6
|
+
width="24px"
|
|
7
|
+
height="24px"
|
|
8
|
+
color="Info-Info-600"
|
|
9
|
+
></app-icon>
|
|
10
|
+
<app-dropi-skeleton
|
|
11
|
+
*ngIf="type == 'image' && !ulrImage"
|
|
12
|
+
width="34px"
|
|
13
|
+
height="34px"
|
|
14
|
+
radius="8px"
|
|
15
|
+
>
|
|
16
|
+
</app-dropi-skeleton>
|
|
17
|
+
|
|
18
|
+
<img
|
|
19
|
+
*ngIf="type == 'image' && ulrImage"
|
|
20
|
+
class="image-to-view"
|
|
21
|
+
width="34"
|
|
22
|
+
height="34"
|
|
23
|
+
[src]="ulrImage"
|
|
24
|
+
alt=""
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div class="icon-pdf" *ngIf="fileExtension === 'pdf'">
|
|
29
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
30
|
+
<g clip-path="url(#clip0_6227_22223)">
|
|
31
|
+
<path
|
|
32
|
+
d="M16.6243 4.61667L13.716 1.70833C12.616 0.608333 11.1493 0 9.59102 0H5.83268C3.53268 0 1.66602 1.86667 1.66602 4.16667V15.8333C1.66602 18.1333 3.53268 20 5.83268 20H14.166C16.466 20 18.3327 18.1333 18.3327 15.8333V8.74167C18.3327 7.18333 17.7243 5.71667 16.6243 4.61667ZM15.4493 5.79167C15.716 6.05833 15.941 6.35 16.1243 6.66667H12.5077C12.0493 6.66667 11.6743 6.29167 11.6743 5.83333V2.21667C11.991 2.4 12.2827 2.625 12.5493 2.89167L15.4577 5.8L15.4493 5.79167ZM16.666 15.8333C16.666 17.2083 15.541 18.3333 14.166 18.3333H5.83268C4.45768 18.3333 3.33268 17.2083 3.33268 15.8333V4.16667C3.33268 2.79167 4.45768 1.66667 5.83268 1.66667H9.59102C9.72435 1.66667 9.86602 1.66667 9.99935 1.68333V5.83333C9.99935 7.20833 11.1243 8.33333 12.4993 8.33333H16.6493C16.666 8.46667 16.666 8.6 16.666 8.74167V15.8333ZM5.90768 10.8333H4.99935C4.54102 10.8333 4.16602 11.2083 4.16602 11.6667V15.3667C4.16602 15.6583 4.39935 15.8833 4.68268 15.8833C4.96602 15.8833 5.19935 15.65 5.19935 15.3667V14.35H5.89935C6.88268 14.35 7.68268 13.5583 7.68268 12.5917C7.68268 11.625 6.88268 10.8333 5.89935 10.8333H5.90768ZM5.90768 13.3083H5.21602V11.875H5.91602C6.31602 11.875 6.65768 12.2 6.65768 12.5917C6.65768 12.9833 6.31602 13.3083 5.91602 13.3083H5.90768ZM15.8493 11.3583C15.8493 11.65 15.616 11.875 15.3327 11.875H13.9243V12.825H14.9577C15.2493 12.825 15.4743 13.0583 15.4743 13.3417C15.4743 13.625 15.241 13.8583 14.9577 13.8583H13.9243V15.3583C13.9243 15.65 13.691 15.875 13.4077 15.875C13.1243 15.875 12.891 15.6417 12.891 15.3583V11.35C12.891 11.0583 13.1243 10.8333 13.4077 10.8333H15.3327C15.6243 10.8333 15.8493 11.0667 15.8493 11.35V11.3583ZM10.0743 10.8417H9.16602C8.70768 10.8417 8.33268 11.2167 8.33268 11.675V15.375C8.33268 15.6667 8.56602 15.8417 8.84935 15.8417C9.13268 15.8417 10.066 15.8417 10.066 15.8417C11.0493 15.8417 11.8493 15.05 11.8493 14.0833V12.6C11.8493 11.6333 11.0493 10.8417 10.066 10.8417H10.0743ZM10.816 14.0833C10.816 14.475 10.4743 14.8 10.0743 14.8H9.38268V11.8833H10.0827C10.4827 11.8833 10.8243 12.2083 10.8243 12.6V14.0833H10.816Z"
|
|
33
|
+
fill="#DE6061"
|
|
34
|
+
/>
|
|
35
|
+
</g>
|
|
36
|
+
<defs>
|
|
37
|
+
<clipPath id="clip0_6227_22223">
|
|
38
|
+
<rect width="20" height="20" fill="white" />
|
|
39
|
+
</clipPath>
|
|
40
|
+
</defs>
|
|
41
|
+
</svg>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="container-bar-title">
|
|
45
|
+
<p class="Body-S-Regular">{{ textFile }}</p>
|
|
46
|
+
<progress *ngIf="progress < 100" [value]="progress" max="100">{{ progress }}%</progress>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="view-icon" *ngIf="progress == 100 && isPreview" (click)="viewEmiter()">
|
|
49
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="14" viewBox="0 0 18 14" fill="none">
|
|
50
|
+
<path
|
|
51
|
+
fill-rule="evenodd"
|
|
52
|
+
clip-rule="evenodd"
|
|
53
|
+
d="M7.07148 4.14758C7.64227 3.76618 8.31334 3.56262 8.99983 3.56262C9.92004 3.56372 10.8022 3.92976 11.4529 4.58045C12.1036 5.23114 12.4697 6.11334 12.4708 7.03355C12.4708 7.72004 12.2672 8.39111 11.8858 8.9619C11.5044 9.53269 10.9623 9.97757 10.3281 10.2403C9.69387 10.503 8.99598 10.5717 8.32268 10.4378C7.64939 10.3039 7.03092 9.9733 6.54551 9.48788C6.06009 9.00246 5.72951 8.384 5.59558 7.7107C5.46166 7.0374 5.53039 6.33951 5.7931 5.70528C6.05581 5.07105 6.50069 4.52897 7.07148 4.14758ZM7.84282 8.76514C8.18529 8.99398 8.58794 9.11612 8.99983 9.11612C9.55216 9.11612 10.0819 8.8967 10.4724 8.50615C10.863 8.11559 11.0824 7.58588 11.0824 7.03355C11.0824 6.62166 10.9602 6.21902 10.7314 5.87654C10.5026 5.53407 10.1773 5.26714 9.79679 5.10952C9.41625 4.95189 8.99752 4.91065 8.59354 4.99101C8.18956 5.07136 7.81849 5.26971 7.52723 5.56096C7.23598 5.85221 7.03764 6.22329 6.95728 6.62727C6.87693 7.03124 6.91817 7.44998 7.07579 7.83052C7.23342 8.21105 7.50034 8.53631 7.84282 8.76514Z"
|
|
54
|
+
fill="#475066"
|
|
55
|
+
/>
|
|
56
|
+
<path
|
|
57
|
+
fill-rule="evenodd"
|
|
58
|
+
clip-rule="evenodd"
|
|
59
|
+
d="M8.99996 0.546387C13.2984 0.546387 15.7475 3.48835 16.8241 5.24187C17.157 5.78022 17.3333 6.40064 17.3333 7.03357C17.3333 7.6665 17.157 8.28692 16.8241 8.82526C15.7475 10.5788 13.2984 13.5207 8.99996 13.5207C4.70155 13.5207 2.25246 10.5788 1.17577 8.82526C0.842931 8.28692 0.666626 7.6665 0.666626 7.03357C0.666626 6.40064 0.842931 5.78022 1.17577 5.24187C2.25246 3.48835 4.70155 0.546387 8.99996 0.546387ZM8.99996 12.1324C12.6229 12.1324 14.7159 9.60206 15.6406 8.09845C15.8383 7.77846 15.943 7.40973 15.943 7.03357C15.943 6.6574 15.8383 6.28867 15.6406 5.96868C14.7159 4.4623 12.6229 1.93476 8.99996 1.93476C5.377 1.93476 3.28402 4.46507 2.35936 5.96868C2.16161 6.28867 2.05687 6.6574 2.05687 7.03357C2.05687 7.40973 2.16161 7.77846 2.35936 8.09845C3.28402 9.60206 5.377 12.1324 8.99996 12.1324Z"
|
|
60
|
+
fill="#475066"
|
|
61
|
+
/>
|
|
62
|
+
</svg>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div *ngIf="progress == 100" (click)="deleteFileAction()" class="container-icon-trash">
|
|
66
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="21" viewBox="0 0 20 21" fill="none">
|
|
67
|
+
<path
|
|
68
|
+
d="M16.2501 4.94477H14.0973C13.9362 4.16103 13.5097 3.45682 12.8899 2.95082C12.27 2.44483 11.4947 2.168 10.6946 2.16699H9.30566C8.50552 2.168 7.73019 2.44483 7.11035 2.95082C6.49051 3.45682 6.06406 4.16103 5.90289 4.94477H3.75011C3.56593 4.94477 3.3893 5.01793 3.25906 5.14817C3.12883 5.2784 3.05566 5.45504 3.05566 5.63921C3.05566 5.82339 3.12883 6.00003 3.25906 6.13026C3.3893 6.26049 3.56593 6.33366 3.75011 6.33366H4.44455V15.3614C4.44566 16.282 4.81183 17.1645 5.46276 17.8155C6.11369 18.4664 6.99622 18.8326 7.91677 18.8337H12.0834C13.004 18.8326 13.8865 18.4664 14.5375 17.8155C15.1884 17.1645 15.5546 16.282 15.5557 15.3614V6.33366H16.2501C16.4343 6.33366 16.6109 6.26049 16.7412 6.13026C16.8714 6.00003 16.9446 5.82339 16.9446 5.63921C16.9446 5.45504 16.8714 5.2784 16.7412 5.14817C16.6109 5.01793 16.4343 4.94477 16.2501 4.94477ZM9.30566 3.55588H10.6946C11.1253 3.55641 11.5453 3.69017 11.8971 3.93883C12.2488 4.18749 12.515 4.53886 12.6591 4.94477H7.34108C7.48524 4.53886 7.75143 4.18749 8.10315 3.93883C8.45488 3.69017 8.87492 3.55641 9.30566 3.55588ZM14.1668 15.3614C14.1668 15.914 13.9473 16.4439 13.5566 16.8346C13.1659 17.2253 12.636 17.4448 12.0834 17.4448H7.91677C7.36424 17.4448 6.83434 17.2253 6.44364 16.8346C6.05294 16.4439 5.83344 15.914 5.83344 15.3614V6.33366H14.1668V15.3614Z"
|
|
69
|
+
fill="#DE6061"
|
|
70
|
+
/>
|
|
71
|
+
<path
|
|
72
|
+
d="M8.61128 14.6666C8.79545 14.6666 8.97209 14.5934 9.10232 14.4632C9.23256 14.3329 9.30572 14.1563 9.30572 13.9721V9.80545C9.30572 9.62127 9.23256 9.44464 9.10232 9.3144C8.97209 9.18417 8.79545 9.11101 8.61128 9.11101C8.4271 9.11101 8.25046 9.18417 8.12023 9.3144C7.99 9.44464 7.91683 9.62127 7.91683 9.80545V13.9721C7.91683 14.1563 7.99 14.3329 8.12023 14.4632C8.25046 14.5934 8.4271 14.6666 8.61128 14.6666Z"
|
|
73
|
+
fill="#DE6061"
|
|
74
|
+
/>
|
|
75
|
+
<path
|
|
76
|
+
d="M11.389 14.6666C11.5731 14.6666 11.7498 14.5934 11.88 14.4632C12.0102 14.3329 12.0834 14.1563 12.0834 13.9721V9.80545C12.0834 9.62127 12.0102 9.44464 11.88 9.3144C11.7498 9.18417 11.5731 9.11101 11.389 9.11101C11.2048 9.11101 11.0281 9.18417 10.8979 9.3144C10.7677 9.44464 10.6945 9.62127 10.6945 9.80545V13.9721C10.6945 14.1563 10.7677 14.3329 10.8979 14.4632C11.0281 14.5934 11.2048 14.6666 11.389 14.6666Z"
|
|
77
|
+
fill="#DE6061"
|
|
78
|
+
/>
|
|
79
|
+
</svg>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.scss
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.container-progress-bar {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: var(--Size-4);
|
|
6
|
+
gap: var(--Size-3);
|
|
7
|
+
border-radius: var(--Size-2);
|
|
8
|
+
border: 1px solid var(--Gray-Gray-100);
|
|
9
|
+
min-width: 0; // Permite que el flex container se encoja
|
|
10
|
+
overflow: hidden; // Previene desbordamiento de nombres largos
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.container-icon-info {
|
|
14
|
+
background: var(--Info-Info-50);
|
|
15
|
+
width: 32px;
|
|
16
|
+
height: 32px;
|
|
17
|
+
border-radius: var(--Size-2);
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
progress {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 4px;
|
|
26
|
+
-webkit-appearance: none; /* Safari/Chrome */
|
|
27
|
+
appearance: none;
|
|
28
|
+
border-radius: 4.5px;
|
|
29
|
+
max-width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
progress::-webkit-progress-bar {
|
|
33
|
+
background-color: var(--Gray-Gray-100);
|
|
34
|
+
border-radius: 4.5px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
progress::-webkit-progress-value {
|
|
38
|
+
background-color: var(--Primary-Primary-500); /* Color de la barra de progreso */
|
|
39
|
+
border-radius: 4.5px;
|
|
40
|
+
transition: width 0.3s ease;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.container-bar-title {
|
|
44
|
+
display: flex;
|
|
45
|
+
gap: 8px;
|
|
46
|
+
flex: 1;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
min-width: 0; // Importante para que flex item pueda encogerse
|
|
50
|
+
|
|
51
|
+
p {
|
|
52
|
+
margin-bottom: 0;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
max-width: 100%;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.container-icon-trash {
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.view-icon {
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.image-to-view {
|
|
75
|
+
border-radius: var(--Border-2);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.icon-pdf {
|
|
79
|
+
background: var(--Error-Error-50);
|
|
80
|
+
border-radius: var(--Border-2);
|
|
81
|
+
width: 34px;
|
|
82
|
+
height: 34px;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
}
|
package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.spec.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* tslint:disable:no-unused-variable */
|
|
2
|
+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
3
|
+
import { By } from '@angular/platform-browser';
|
|
4
|
+
import { DebugElement } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
import { FileUploadProgressBarComponent } from './file-upload-progress-bar.component';
|
|
7
|
+
|
|
8
|
+
describe('FileUploadProgressBarComponent', () => {
|
|
9
|
+
let component: FileUploadProgressBarComponent;
|
|
10
|
+
let fixture: ComponentFixture<FileUploadProgressBarComponent>;
|
|
11
|
+
|
|
12
|
+
beforeEach(waitForAsync(() => {
|
|
13
|
+
TestBed.configureTestingModule({
|
|
14
|
+
imports: [FileUploadProgressBarComponent],
|
|
15
|
+
}).compileComponents();
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
fixture = TestBed.createComponent(FileUploadProgressBarComponent);
|
|
20
|
+
component = fixture.componentInstance;
|
|
21
|
+
fixture.detectChanges();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('should create', () => {
|
|
25
|
+
expect(component).toBeTruthy();
|
|
26
|
+
});
|
|
27
|
+
});
|