@seniorsistemas/angular-components 19.0.5 → 19.0.6
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/accordion/lib/accordion/accordion.component.d.ts +25 -0
- package/accordion/lib/accordion/components/accordion-panel/accordion-panel.component.d.ts +60 -0
- package/alert/lib/alert/alert.component.d.ts +40 -0
- package/autocomplete/lib/autocomplete/autocomplete.component.d.ts +51 -0
- package/badge/lib/badge/badge.component.d.ts +20 -0
- package/bignumber-input/lib/bignumber-input/bignumber-input.directive.d.ts +46 -1
- package/breadcrumb/lib/breadcrumb/breadcrumb.component.d.ts +12 -0
- package/button/lib/button/button.component.d.ts +101 -0
- package/calendar-mask/lib/calendar-mask/calendar-mask.directive.d.ts +24 -0
- package/card/lib/card/card.component.d.ts +18 -0
- package/chat/lib/chat/chat.component.d.ts +20 -2
- package/chat/lib/chat/components/chat-message/chat-message.component.d.ts +18 -2
- package/checkbox/lib/checkbox/checkbox.component.d.ts +23 -3
- package/checkbox-list/lib/checkbox-list/checkbox-list.component.d.ts +20 -0
- package/chips/lib/chips/chip-item/chip-item.component.d.ts +15 -0
- package/chips/lib/chips/chips/chips.component.d.ts +41 -0
- package/code-editor/lib/code-editor/code-editor.component.d.ts +40 -0
- package/collapse-link/lib/collapse-link/collapse-link.component.d.ts +18 -0
- package/common/lib/svg-factory/components/iassist-icon/iassist-icon.component.d.ts +5 -0
- package/confirm-dialog/lib/popup-confirm-dialog/popup-confirm-dialog.component.d.ts +19 -0
- package/content-generator/lib/content-generator/content-generator.component.d.ts +30 -0
- package/control-errors/lib/control-errors/control-errors.component.d.ts +36 -0
- package/country-phone-picker/lib/country-phone-picker/country-phone-picker.component.d.ts +36 -0
- package/currency/lib/currency.service.d.ts +15 -2
- package/custom-fields/lib/custom-fields/custom-fields.component.d.ts +31 -0
- package/dialog/lib/src/dialog/dialog.component.d.ts +51 -0
- package/dialog/lib/src/dialog/services/dialog.service.d.ts +2 -2
- package/dialog/lib/src/dialog/services/internal-dialog.service.d.ts +1 -1
- package/dynamic-form/dynamic-form/components/lookup/lookup.component.d.ts +6 -5
- package/dynamic-form/dynamic-form/components/lookup/models/lookup-api.model.d.ts +5 -0
- package/dynamic-form/dynamic-form/configurations/structure/fieldset.d.ts +14 -0
- package/dynamic-form/dynamic-form/configurations/structure/row.d.ts +67 -0
- package/dynamic-form/dynamic-form/configurations/structure/section.d.ts +8 -0
- package/dynamic-form/dynamic-form/configurations/structure/structure.d.ts +19 -0
- package/dynamic-form/dynamic-form/dynamic-form.component.d.ts +21 -1
- package/dynamic-form/dynamic-form/form-field/configurations/fields/autocomplete-field.d.ts +45 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/bignumber-field.d.ts +59 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/blob-field.d.ts +55 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/boolean-field.d.ts +35 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/boolean-switch-field.d.ts +17 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/button-field.d.ts +23 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/calendar-field.d.ts +66 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/checkbox-field.d.ts +15 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/chips-field.d.ts +30 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/content-generator-field.d.ts +47 -2
- package/dynamic-form/dynamic-form/form-field/configurations/fields/country-phone-picker-field.d.ts +26 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/currency-field.d.ts +18 -1
- package/dynamic-form/dynamic-form/form-field/configurations/fields/field.d.ts +44 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/lookup-field.d.ts +112 -4
- package/dynamic-form/dynamic-form/form-field/configurations/fields/number-field.d.ts +42 -3
- package/dynamic-form/dynamic-form/form-field/configurations/fields/password-field.d.ts +48 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/profile-picture.d.ts +62 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/radio-button-field.d.ts +34 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/select-field.d.ts +63 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/slider-field.d.ts +47 -1
- package/dynamic-form/dynamic-form/form-field/configurations/fields/star-rating-field.d.ts +23 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/text-area-field.d.ts +37 -1
- package/dynamic-form/dynamic-form/form-field/configurations/fields/text-field.d.ts +65 -2
- package/dynamic-form/public-api.d.ts +1 -0
- package/editable-overlay/lib/editable-overlay/editable-overlay.directive.d.ts +16 -0
- package/empty-state/lib/empty-state/empty-state.component.d.ts +59 -0
- package/esm2022/accordion/lib/accordion/accordion.component.mjs +26 -1
- package/esm2022/accordion/lib/accordion/components/accordion-panel/accordion-panel.component.mjs +61 -1
- package/esm2022/alert/lib/alert/alert.component.mjs +41 -1
- package/esm2022/autocomplete/lib/autocomplete/autocomplete.component.mjs +52 -1
- package/esm2022/badge/lib/badge/badge.component.mjs +21 -1
- package/esm2022/bignumber-input/lib/bignumber-input/bignumber-input.directive.mjs +47 -2
- package/esm2022/breadcrumb/lib/breadcrumb/breadcrumb.component.mjs +13 -1
- package/esm2022/button/lib/button/button.component.mjs +102 -1
- package/esm2022/calendar-mask/lib/calendar-mask/calendar-mask.directive.mjs +72 -47
- package/esm2022/card/lib/card/card.component.mjs +21 -6
- package/esm2022/chat/lib/chat/chat.component.mjs +23 -5
- package/esm2022/chat/lib/chat/components/chat-message/chat-message.component.mjs +20 -4
- package/esm2022/checkbox/lib/checkbox/checkbox.component.mjs +24 -4
- package/esm2022/checkbox-list/lib/checkbox-list/checkbox-list.component.mjs +22 -2
- package/esm2022/chips/lib/chips/chip-item/chip-item.component.mjs +17 -2
- package/esm2022/chips/lib/chips/chips/chips.component.mjs +42 -1
- package/esm2022/code-editor/lib/code-editor/code-editor.component.mjs +41 -1
- package/esm2022/collapse-link/lib/collapse-link/collapse-link.component.mjs +19 -1
- package/esm2022/common/lib/svg-factory/components/iassist-icon/iassist-icon.component.mjs +6 -1
- package/esm2022/confirm-dialog/lib/popup-confirm-dialog/popup-confirm-dialog.component.mjs +20 -1
- package/esm2022/content-generator/lib/content-generator/content-generator.component.mjs +31 -1
- package/esm2022/control-errors/lib/control-errors/control-errors.component.mjs +37 -1
- package/esm2022/country-phone-picker/lib/country-phone-picker/country-phone-picker.component.mjs +37 -1
- package/esm2022/currency/lib/currency.service.mjs +21 -8
- package/esm2022/custom-fields/lib/custom-fields/custom-fields.component.mjs +32 -1
- package/esm2022/dialog/lib/src/dialog/dialog.component.mjs +66 -11
- package/esm2022/dialog/lib/src/dialog/services/dialog.service.mjs +13 -10
- package/esm2022/dialog/lib/src/dialog/services/internal-dialog.service.mjs +3 -3
- package/esm2022/dynamic-form/dynamic-form/components/lookup/lookup.component.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/components/lookup/models/lookup-api.model.mjs +2 -0
- package/esm2022/dynamic-form/dynamic-form/configurations/structure/fieldset.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/configurations/structure/row.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/configurations/structure/section.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/configurations/structure/structure.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/dynamic-form.component.mjs +22 -2
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/autocomplete-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/bignumber-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/blob-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/boolean-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/boolean-switch-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/button-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/calendar-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/checkbox-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/chips-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/content-generator-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/country-phone-picker-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/currency-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/field.mjs +1 -2
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/lookup-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/number-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/password-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/profile-picture.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/radio-button-field.mjs +6 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/select-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/slider-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/star-rating-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/text-area-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/text-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/text-area/text-area-field.component.mjs +3 -3
- package/esm2022/dynamic-form/public-api.mjs +2 -2
- package/esm2022/editable-overlay/lib/editable-overlay/editable-overlay.directive.mjs +17 -1
- package/esm2022/empty-state/lib/empty-state/empty-state.component.mjs +60 -1
- package/esm2022/fieldset/lib/fieldset/fieldset.component.mjs +25 -5
- package/esm2022/file-picker/lib/file-picker/file-picker.component.mjs +48 -1
- package/esm2022/gantt/lib/gantt/gantt.component.mjs +32 -1
- package/esm2022/global-search/lib/global-search/global-search.component.mjs +30 -1
- package/esm2022/grid-menu/lib/grid-menu/grid-menu.component.mjs +40 -1
- package/esm2022/help-popover/lib/help-popover/help-popover.directive.mjs +83 -27
- package/esm2022/image-cropper/lib/image-cropper/image-cropper.component.mjs +40 -3
- package/esm2022/infinite-scroll/lib/infinite-scroll/infinite-scroll.directive.mjs +18 -2
- package/esm2022/info-sign/lib/info-sign/info-sign.directive.mjs +33 -4
- package/esm2022/inline-edit/lib/inline-edit/inline-edit.component.mjs +16 -1
- package/esm2022/insights/lib/insights/insights.component.mjs +23 -1
- package/esm2022/interactive-content/lib/interactive-content/interactive-content.directive.mjs +21 -1
- package/esm2022/kanban/lib/kanban/kanban.component.mjs +34 -16
- package/esm2022/label-value/lib/label-value/label-value.component.mjs +14 -1
- package/esm2022/loading-state/lib/loading-state/loading-state.component.mjs +37 -1
- package/esm2022/loading-state/lib/loading-state/loading-state.directive.mjs +24 -1
- package/esm2022/locale/lib/locale/locale.service.mjs +8 -1
- package/esm2022/localized-number-input/lib/localized-number-input/localized-number-input.directive.mjs +17 -1
- package/esm2022/mask/lib/mask/mask-formatter.pipe.mjs +13 -1
- package/esm2022/mouse-events/lib/mouse-events/double-click.directive.mjs +16 -3
- package/esm2022/mouse-events/lib/mouse-events/long-press.directive.mjs +24 -10
- package/esm2022/navigation-button/lib/navigation-button/navigation-button.component.mjs +20 -1
- package/esm2022/number-input/lib/number-input/number-input.directive.mjs +32 -12
- package/esm2022/numeric/lib/numeric.pipe.mjs +16 -1
- package/esm2022/numeric/lib/numeric.service.mjs +21 -1
- package/esm2022/numeric-mask/lib/numeric-mask/numeric-mask.directive.mjs +9 -6
- package/esm2022/object-card/lib/object-card/object-card.component.mjs +24 -1
- package/esm2022/optional-fields/editor/editor-field.mjs +1 -1
- package/esm2022/paginator/lib/paginator/paginator.component.mjs +20 -1
- package/esm2022/panel/lib/panel/panel.component.mjs +44 -23
- package/esm2022/password-strength/lib/password-strength/password-strength.component.mjs +25 -1
- package/esm2022/password-strength/lib/password-strength/password-strength.directive.mjs +54 -1
- package/esm2022/picklist/lib/picklist/picklist.component.mjs +33 -2
- package/esm2022/pin-code-field/lib/pin-code-field/pin-code-field.component.mjs +29 -34
- package/esm2022/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.component.mjs +86 -2
- package/esm2022/progressbar/lib/progressbar/progressbar.component.mjs +53 -3
- package/esm2022/radio-button/lib/radio-button/radio-button.component.mjs +28 -1
- package/esm2022/radio-button/lib/radio-button-group/radio-button-group.component.mjs +27 -1
- package/esm2022/rating-scale/lib/rating-scale/rating-scale.component.mjs +39 -7
- package/esm2022/select/lib/select/select.component.mjs +35 -1
- package/esm2022/select-button/lib/select-button/select-button.component.mjs +35 -1
- package/esm2022/shared/lib/shared/border-button/border-button.component.mjs +11 -3
- package/esm2022/sidebar/lib/sidebar/sidebar.component.mjs +54 -1
- package/esm2022/slide-in-bar/lib/slide-in-bar/slide-in-bar.component.mjs +76 -36
- package/esm2022/slider/lib/slider/slider.component.mjs +90 -9
- package/esm2022/speech-recognition/lib/speech-recognition/speech-recognition/speech-recognition.component.mjs +25 -4
- package/esm2022/split-button/lib/split-button/split-button.component.mjs +24 -2
- package/esm2022/star-rating/star-rating/star-rating.component.mjs +17 -1
- package/esm2022/stats-card/lib/stats-card/stats-card.component.mjs +32 -10
- package/esm2022/stepper/lib/stepper/stepper.component.mjs +20 -1
- package/esm2022/structure/lib/structure/footer.component.mjs +11 -1
- package/esm2022/switch/lib/switch/switch.component.mjs +22 -2
- package/esm2022/table/lib/table/table-column/table-columns.component.mjs +16 -1
- package/esm2022/table-header/lib/table-header/table-header-checkbox.component.mjs +29 -3
- package/esm2022/tabs/lib/tab-item/tab-item.component.mjs +33 -2
- package/esm2022/tabs/lib/tabs/tabs.component.mjs +35 -3
- package/esm2022/template/lib/template/template.directive.mjs +14 -2
- package/esm2022/text-area/lib/text-area/text-area.component.mjs +28 -1
- package/esm2022/thumbnail/lib/thumbnail/thumbnail.component.mjs +25 -1
- package/esm2022/thumbnails/lib/thumbnails/thumbnails.component.mjs +28 -3
- package/esm2022/tiered-menu/lib/tiered-menu/tiered-menu.directive.mjs +30 -1
- package/esm2022/tile/lib/tile/tile.component.mjs +26 -1
- package/esm2022/timeline/lib/timeline/timeline.component.mjs +26 -3
- package/esm2022/toast/lib/toast/toast.component.mjs +24 -4
- package/esm2022/token-list/lib/token-list/token-list.component.mjs +22 -1
- package/esm2022/tooltip/lib/tooltip/tooltip.directive.mjs +66 -1
- package/esm2022/topbar/lib/topbar/topbar.component.mjs +18 -1
- package/esm2022/tree/lib/tree/tree.component.mjs +28 -1
- package/esm2022/workspace-switch/lib/workspace-switch/workspace-switch.component.mjs +47 -1
- package/fesm2022/seniorsistemas-angular-components-accordion.mjs +85 -0
- package/fesm2022/seniorsistemas-angular-components-accordion.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-alert.mjs +40 -0
- package/fesm2022/seniorsistemas-angular-components-alert.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-autocomplete.mjs +51 -0
- package/fesm2022/seniorsistemas-angular-components-autocomplete.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-badge.mjs +20 -0
- package/fesm2022/seniorsistemas-angular-components-badge.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-bignumber-input.mjs +46 -1
- package/fesm2022/seniorsistemas-angular-components-bignumber-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs +12 -0
- package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-button.mjs +101 -0
- package/fesm2022/seniorsistemas-angular-components-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs +71 -46
- package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-card.mjs +19 -4
- package/fesm2022/seniorsistemas-angular-components-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-chat.mjs +39 -5
- package/fesm2022/seniorsistemas-angular-components-chat.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-checkbox-list.mjs +21 -1
- package/fesm2022/seniorsistemas-angular-components-checkbox-list.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-checkbox.mjs +23 -3
- package/fesm2022/seniorsistemas-angular-components-checkbox.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-chips.mjs +57 -1
- package/fesm2022/seniorsistemas-angular-components-chips.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-code-editor.mjs +40 -0
- package/fesm2022/seniorsistemas-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-collapse-link.mjs +18 -0
- package/fesm2022/seniorsistemas-angular-components-collapse-link.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-common.mjs +5 -0
- package/fesm2022/seniorsistemas-angular-components-common.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-confirm-dialog.mjs +19 -0
- package/fesm2022/seniorsistemas-angular-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-content-generator.mjs +30 -0
- package/fesm2022/seniorsistemas-angular-components-content-generator.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-control-errors.mjs +36 -0
- package/fesm2022/seniorsistemas-angular-components-control-errors.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs +36 -0
- package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-currency.mjs +19 -6
- package/fesm2022/seniorsistemas-angular-components-currency.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs +31 -0
- package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-dialog.mjs +74 -16
- package/fesm2022/seniorsistemas-angular-components-dialog.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +29 -4
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-editable-overlay.mjs +16 -0
- package/fesm2022/seniorsistemas-angular-components-editable-overlay.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-empty-state.mjs +59 -0
- package/fesm2022/seniorsistemas-angular-components-empty-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-fieldset.mjs +21 -1
- package/fesm2022/seniorsistemas-angular-components-fieldset.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-file-picker.mjs +47 -0
- package/fesm2022/seniorsistemas-angular-components-file-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-gantt.mjs +31 -0
- package/fesm2022/seniorsistemas-angular-components-gantt.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-global-search.mjs +29 -0
- package/fesm2022/seniorsistemas-angular-components-global-search.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-grid-menu.mjs +39 -0
- package/fesm2022/seniorsistemas-angular-components-grid-menu.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-help-popover.mjs +80 -24
- package/fesm2022/seniorsistemas-angular-components-help-popover.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs +38 -1
- package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs +17 -1
- package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-info-sign.mjs +30 -1
- package/fesm2022/seniorsistemas-angular-components-info-sign.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs +15 -0
- package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-insights.mjs +22 -0
- package/fesm2022/seniorsistemas-angular-components-insights.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs +20 -0
- package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-kanban.mjs +28 -10
- package/fesm2022/seniorsistemas-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-label-value.mjs +13 -0
- package/fesm2022/seniorsistemas-angular-components-label-value.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-loading-state.mjs +59 -0
- package/fesm2022/seniorsistemas-angular-components-loading-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-locale.mjs +7 -0
- package/fesm2022/seniorsistemas-angular-components-locale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs +16 -0
- package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-mask.mjs +12 -0
- package/fesm2022/seniorsistemas-angular-components-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-mouse-events.mjs +35 -8
- package/fesm2022/seniorsistemas-angular-components-mouse-events.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs +19 -0
- package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-number-input.mjs +31 -11
- package/fesm2022/seniorsistemas-angular-components-number-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-numeric-mask.mjs +8 -5
- package/fesm2022/seniorsistemas-angular-components-numeric-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-numeric.mjs +35 -0
- package/fesm2022/seniorsistemas-angular-components-numeric.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-object-card.mjs +23 -0
- package/fesm2022/seniorsistemas-angular-components-object-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-optional-fields-editor.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-paginator.mjs +19 -0
- package/fesm2022/seniorsistemas-angular-components-paginator.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-panel.mjs +39 -18
- package/fesm2022/seniorsistemas-angular-components-panel.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-password-strength.mjs +77 -0
- package/fesm2022/seniorsistemas-angular-components-password-strength.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-picklist.mjs +32 -1
- package/fesm2022/seniorsistemas-angular-components-picklist.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-pin-code-field.mjs +28 -33
- package/fesm2022/seniorsistemas-angular-components-pin-code-field.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs +85 -1
- package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-progressbar.mjs +52 -2
- package/fesm2022/seniorsistemas-angular-components-progressbar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-radio-button.mjs +53 -0
- package/fesm2022/seniorsistemas-angular-components-radio-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-rating-scale.mjs +36 -4
- package/fesm2022/seniorsistemas-angular-components-rating-scale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-select-button.mjs +34 -0
- package/fesm2022/seniorsistemas-angular-components-select-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-select.mjs +34 -0
- package/fesm2022/seniorsistemas-angular-components-select.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-shared.mjs +9 -1
- package/fesm2022/seniorsistemas-angular-components-shared.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-sidebar.mjs +53 -0
- package/fesm2022/seniorsistemas-angular-components-sidebar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs +71 -31
- package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-slider.mjs +89 -8
- package/fesm2022/seniorsistemas-angular-components-slider.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs +24 -3
- package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-split-button.mjs +22 -0
- package/fesm2022/seniorsistemas-angular-components-split-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-star-rating.mjs +16 -0
- package/fesm2022/seniorsistemas-angular-components-star-rating.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-stats-card.mjs +30 -8
- package/fesm2022/seniorsistemas-angular-components-stats-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-stepper.mjs +19 -0
- package/fesm2022/seniorsistemas-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-structure.mjs +10 -0
- package/fesm2022/seniorsistemas-angular-components-structure.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-switch.mjs +20 -0
- package/fesm2022/seniorsistemas-angular-components-switch.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-table-header.mjs +28 -2
- package/fesm2022/seniorsistemas-angular-components-table-header.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-table.mjs +15 -0
- package/fesm2022/seniorsistemas-angular-components-table.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tabs.mjs +65 -2
- package/fesm2022/seniorsistemas-angular-components-tabs.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-template.mjs +13 -1
- package/fesm2022/seniorsistemas-angular-components-template.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-text-area.mjs +27 -0
- package/fesm2022/seniorsistemas-angular-components-text-area.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs +24 -0
- package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-thumbnails.mjs +26 -1
- package/fesm2022/seniorsistemas-angular-components-thumbnails.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs +29 -0
- package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tile.mjs +25 -0
- package/fesm2022/seniorsistemas-angular-components-tile.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-timeline.mjs +25 -2
- package/fesm2022/seniorsistemas-angular-components-timeline.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-toast.mjs +22 -2
- package/fesm2022/seniorsistemas-angular-components-toast.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-token-list.mjs +21 -0
- package/fesm2022/seniorsistemas-angular-components-token-list.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tooltip.mjs +65 -0
- package/fesm2022/seniorsistemas-angular-components-tooltip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-topbar.mjs +17 -0
- package/fesm2022/seniorsistemas-angular-components-topbar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tree.mjs +27 -0
- package/fesm2022/seniorsistemas-angular-components-tree.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs +46 -0
- package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs.map +1 -1
- package/fieldset/lib/fieldset/fieldset.component.d.ts +23 -3
- package/file-picker/lib/file-picker/file-picker.component.d.ts +47 -0
- package/gantt/lib/gantt/gantt.component.d.ts +31 -0
- package/global-search/lib/global-search/global-search.component.d.ts +29 -0
- package/grid-menu/lib/grid-menu/grid-menu.component.d.ts +39 -0
- package/help-popover/lib/help-popover/help-popover.directive.d.ts +67 -17
- package/image-cropper/lib/image-cropper/image-cropper.component.d.ts +38 -0
- package/infinite-scroll/lib/infinite-scroll/infinite-scroll.directive.d.ts +15 -0
- package/info-sign/lib/info-sign/info-sign.directive.d.ts +30 -1
- package/inline-edit/lib/inline-edit/inline-edit.component.d.ts +15 -0
- package/insights/lib/insights/insights.component.d.ts +22 -0
- package/interactive-content/lib/interactive-content/interactive-content.directive.d.ts +20 -0
- package/kanban/lib/kanban/kanban.component.d.ts +25 -5
- package/label-value/lib/label-value/label-value.component.d.ts +13 -0
- package/loading-state/lib/loading-state/loading-state.component.d.ts +36 -0
- package/loading-state/lib/loading-state/loading-state.directive.d.ts +23 -0
- package/locale/lib/locale/locale.service.d.ts +7 -0
- package/localized-number-input/lib/localized-number-input/localized-number-input.directive.d.ts +16 -0
- package/mask/lib/mask/mask-formatter.pipe.d.ts +12 -0
- package/mouse-events/lib/mouse-events/double-click.directive.d.ts +13 -0
- package/mouse-events/lib/mouse-events/long-press.directive.d.ts +16 -2
- package/navigation-button/lib/navigation-button/navigation-button.component.d.ts +19 -0
- package/number-input/lib/number-input/number-input.directive.d.ts +19 -1
- package/numeric/lib/numeric.pipe.d.ts +15 -0
- package/numeric/lib/numeric.service.d.ts +20 -0
- package/numeric-mask/lib/numeric-mask/numeric-mask.directive.d.ts +5 -4
- package/object-card/lib/object-card/object-card.component.d.ts +23 -0
- package/optional-fields/editor/editor-field.d.ts +19 -0
- package/package.json +12 -12
- package/paginator/lib/paginator/paginator.component.d.ts +19 -0
- package/panel/lib/panel/panel.component.d.ts +24 -3
- package/password-strength/lib/password-strength/password-strength.component.d.ts +24 -0
- package/password-strength/lib/password-strength/password-strength.directive.d.ts +53 -0
- package/picklist/lib/picklist/picklist.component.d.ts +29 -0
- package/pin-code-field/lib/pin-code-field/pin-code-field.component.d.ts +28 -33
- package/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.component.d.ts +85 -1
- package/progressbar/lib/progressbar/progressbar.component.d.ts +50 -0
- package/radio-button/lib/radio-button/radio-button.component.d.ts +27 -0
- package/radio-button/lib/radio-button-group/radio-button-group.component.d.ts +26 -0
- package/rating-scale/lib/rating-scale/rating-scale.component.d.ts +30 -2
- package/select/lib/select/select.component.d.ts +34 -0
- package/select-button/lib/select-button/select-button.component.d.ts +34 -0
- package/shared/lib/shared/border-button/border-button.component.d.ts +10 -2
- package/sidebar/lib/sidebar/sidebar.component.d.ts +53 -0
- package/slide-in-bar/lib/slide-in-bar/slide-in-bar.component.d.ts +53 -2
- package/slider/lib/slider/slider.component.d.ts +72 -0
- package/speech-recognition/lib/speech-recognition/speech-recognition/speech-recognition.component.d.ts +18 -0
- package/split-button/lib/split-button/split-button.component.d.ts +22 -0
- package/star-rating/star-rating/star-rating.component.d.ts +16 -0
- package/stats-card/lib/stats-card/stats-card.component.d.ts +28 -0
- package/stepper/lib/stepper/stepper.component.d.ts +19 -0
- package/structure/lib/structure/footer.component.d.ts +10 -0
- package/switch/lib/switch/switch.component.d.ts +20 -0
- package/table/lib/table/table-column/table-columns.component.d.ts +15 -0
- package/table-header/lib/table-header/table-header-checkbox.component.d.ts +18 -0
- package/tabs/lib/tab-item/tab-item.component.d.ts +31 -0
- package/tabs/lib/tabs/tabs.component.d.ts +28 -0
- package/template/lib/template/template.directive.d.ts +12 -0
- package/text-area/lib/text-area/text-area.component.d.ts +27 -0
- package/thumbnail/lib/thumbnail/thumbnail.component.d.ts +24 -0
- package/thumbnails/lib/thumbnails/thumbnails.component.d.ts +27 -2
- package/tiered-menu/lib/tiered-menu/tiered-menu.directive.d.ts +29 -0
- package/tile/lib/tile/tile.component.d.ts +25 -0
- package/timeline/lib/timeline/timeline.component.d.ts +24 -0
- package/toast/lib/toast/toast.component.d.ts +22 -2
- package/token-list/lib/token-list/token-list.component.d.ts +21 -0
- package/tooltip/lib/tooltip/tooltip.directive.d.ts +65 -0
- package/topbar/lib/topbar/topbar.component.d.ts +17 -0
- package/tree/lib/tree/tree.component.d.ts +27 -0
- package/workspace-switch/lib/workspace-switch/workspace-switch.component.d.ts +46 -0
|
@@ -4,7 +4,23 @@ import { DomHandler } from 'primeng/dom';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
|
|
6
6
|
// TODO: O que é esta diretiva?
|
|
7
|
+
/**
|
|
8
|
+
* @description Diretiva aplicada a um `p-table` do PrimeNG para corrigir o comportamento
|
|
9
|
+
* de clique fora da célula editável, evitando que cliques em overlays (como dropdowns e modais)
|
|
10
|
+
* fechem indevidamente o modo de edição da célula.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```html
|
|
14
|
+
* <p-table sEditableOverlay [table]="dt" #dt>...</p-table>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @category Overlay
|
|
18
|
+
*/
|
|
7
19
|
class EditableOverlayDirective {
|
|
20
|
+
/**
|
|
21
|
+
* @description Referência direta à instância do `p-table` ao qual a diretiva está aplicada.
|
|
22
|
+
* Utilizada para sobrescrever o comportamento padrão de `bindDocumentEditListener`.
|
|
23
|
+
*/
|
|
8
24
|
table;
|
|
9
25
|
ngAfterViewInit() {
|
|
10
26
|
this.table.bindDocumentEditListener = this._bindDocument.bind(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-editable-overlay.mjs","sources":["../../projects/angular-components/editable-overlay/src/lib/editable-overlay/editable-overlay.directive.ts","../../projects/angular-components/editable-overlay/src/lib/editable-overlay/editable-overlay.module.ts","../../projects/angular-components/editable-overlay/src/seniorsistemas-angular-components-editable-overlay.ts"],"sourcesContent":["import { AfterViewInit, Directive, Input } from '@angular/core';\n\nimport { DomHandler } from 'primeng/dom';\n\n// TODO: O que é esta diretiva?\n\n@Directive({\n selector: 'p-table[sEditableOverlay]',\n})\nexport class EditableOverlayDirective implements AfterViewInit {\n @Input()\n public table: any;\n\n public ngAfterViewInit(): void {\n this.table.bindDocumentEditListener = this._bindDocument.bind(this);\n }\n\n public isFromOverlayTrigger(event: any) {\n return event.path.some((path: any) => path.className && path.className.includes('ng-trigger-overlayAnimation'));\n }\n\n public isFromModal(event: any) {\n return event.path.some((path: any) => path.className && path.className.includes('s-lookup'));\n }\n\n private _bindDocument() {\n if (!this.table.documentEditListener) {\n this.table.documentEditListener = (event: any) => {\n if (\n !this.isFromOverlayTrigger(event) &&\n !this.isFromModal(event) &&\n this.table.editingCell &&\n !this.table.editingCellClick &&\n this.table.isEditingCellValid()\n ) {\n DomHandler.removeClass(this.table.editingCell, 'ui-editing-cell');\n this.table.editingCell = null;\n this.table.unbindDocumentEditListener();\n }\n\n this.table.editingCellClick = false;\n };\n\n document.addEventListener('click', this.table.documentEditListener);\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { EditableOverlayDirective } from './editable-overlay.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [EditableOverlayDirective],\n exports: [EditableOverlayDirective],\n})\nexport class EditableOverlayModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAIA;
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-editable-overlay.mjs","sources":["../../projects/angular-components/editable-overlay/src/lib/editable-overlay/editable-overlay.directive.ts","../../projects/angular-components/editable-overlay/src/lib/editable-overlay/editable-overlay.module.ts","../../projects/angular-components/editable-overlay/src/seniorsistemas-angular-components-editable-overlay.ts"],"sourcesContent":["import { AfterViewInit, Directive, Input } from '@angular/core';\n\nimport { DomHandler } from 'primeng/dom';\n\n// TODO: O que é esta diretiva?\n\n/**\n * @description Diretiva aplicada a um `p-table` do PrimeNG para corrigir o comportamento\n * de clique fora da célula editável, evitando que cliques em overlays (como dropdowns e modais)\n * fechem indevidamente o modo de edição da célula.\n *\n * @example\n * ```html\n * <p-table sEditableOverlay [table]=\"dt\" #dt>...</p-table>\n * ```\n *\n * @category Overlay\n */\n@Directive({\n selector: 'p-table[sEditableOverlay]',\n})\nexport class EditableOverlayDirective implements AfterViewInit {\n /**\n * @description Referência direta à instância do `p-table` ao qual a diretiva está aplicada.\n * Utilizada para sobrescrever o comportamento padrão de `bindDocumentEditListener`.\n */\n @Input()\n public table: any;\n\n public ngAfterViewInit(): void {\n this.table.bindDocumentEditListener = this._bindDocument.bind(this);\n }\n\n public isFromOverlayTrigger(event: any) {\n return event.path.some((path: any) => path.className && path.className.includes('ng-trigger-overlayAnimation'));\n }\n\n public isFromModal(event: any) {\n return event.path.some((path: any) => path.className && path.className.includes('s-lookup'));\n }\n\n private _bindDocument() {\n if (!this.table.documentEditListener) {\n this.table.documentEditListener = (event: any) => {\n if (\n !this.isFromOverlayTrigger(event) &&\n !this.isFromModal(event) &&\n this.table.editingCell &&\n !this.table.editingCellClick &&\n this.table.isEditingCellValid()\n ) {\n DomHandler.removeClass(this.table.editingCell, 'ui-editing-cell');\n this.table.editingCell = null;\n this.table.unbindDocumentEditListener();\n }\n\n this.table.editingCellClick = false;\n };\n\n document.addEventListener('click', this.table.documentEditListener);\n }\n }\n}\n\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { EditableOverlayDirective } from './editable-overlay.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [EditableOverlayDirective],\n exports: [EditableOverlayDirective],\n})\nexport class EditableOverlayModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAIA;AAEA;;;;;;;;;;;AAWG;MAIU,wBAAwB,CAAA;AACjC;;;AAGG;AAEI,IAAA,KAAK,CAAM;IAEX,eAAe,GAAA;AAClB,QAAA,IAAI,CAAC,KAAK,CAAC,wBAAwB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACvE;AAEM,IAAA,oBAAoB,CAAC,KAAU,EAAA;QAClC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAS,KAAK,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC;KACnH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CAAA,CAAA;;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,2BAA2B;AACxC,iBAAA,CAAA;8BAOU,KAAK,EAAA,CAAA;sBADX,KAAK;;;MChBG,qBAAqB,CAAA;wGAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EAHf,YAAA,EAAA,CAAA,wBAAwB,CAD7B,EAAA,OAAA,EAAA,CAAA,YAAY,aAEZ,wBAAwB,CAAA,EAAA,CAAA,CAAA;AAEzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAJpB,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAIb,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -6,22 +6,81 @@ import { CookieService } from 'ngx-cookie-service';
|
|
|
6
6
|
import * as i1 from '@seniorsistemas/angular-components/button';
|
|
7
7
|
import { ButtonModule } from '@seniorsistemas/angular-components/button';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @description Componente de estado vazio exibido quando não há conteúdo para mostrar.
|
|
11
|
+
* Apresenta um ícone, título, descrição e até duas ações configuráveis
|
|
12
|
+
* (primária com suporte a tiered menu e secundária simples).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <s-empty-state
|
|
17
|
+
* title="Nenhum resultado encontrado"
|
|
18
|
+
* description="Tente ajustar os filtros da busca."
|
|
19
|
+
* primaryActionLabel="Criar novo"
|
|
20
|
+
* (primaryAction)="onCreate()"
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @category Feedback
|
|
25
|
+
*/
|
|
9
26
|
class EmptyStateComponent {
|
|
10
27
|
static nextIdSeed = 0;
|
|
11
28
|
static _nextId = EmptyStateComponent.nextIdSeed;
|
|
12
29
|
static getNextId() {
|
|
13
30
|
return this._nextId++;
|
|
14
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* @description Identificador único do componente. Gerado automaticamente se não informado.
|
|
34
|
+
*/
|
|
15
35
|
id = `s-empty-state-${EmptyStateComponent.getNextId()}`;
|
|
36
|
+
/**
|
|
37
|
+
* @description Título principal exibido no estado vazio. Campo obrigatório.
|
|
38
|
+
*/
|
|
16
39
|
title;
|
|
40
|
+
/**
|
|
41
|
+
* @description Classe CSS do ícone exibido no estado vazio.
|
|
42
|
+
* Aceita classes de bibliotecas de ícones como Font Awesome.
|
|
43
|
+
*
|
|
44
|
+
* @default 'fa fa-inbox'
|
|
45
|
+
*/
|
|
17
46
|
iconClass = 'fa fa-inbox';
|
|
47
|
+
/**
|
|
48
|
+
* @description Texto descritivo exibido abaixo do título, explicando o motivo do estado vazio
|
|
49
|
+
* ou orientando o usuário sobre as próximas ações.
|
|
50
|
+
*/
|
|
18
51
|
description;
|
|
52
|
+
/**
|
|
53
|
+
* @description Controla a visibilidade do botão de ação primária.
|
|
54
|
+
*
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
19
57
|
showPrimaryAction = true;
|
|
58
|
+
/**
|
|
59
|
+
* @description Controla a visibilidade do botão de ação secundária.
|
|
60
|
+
*
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
20
63
|
showSecondaryAction = true;
|
|
64
|
+
/**
|
|
65
|
+
* @description Texto do botão de ação primária.
|
|
66
|
+
* Quando `primaryModel` possui itens, o botão exibe um tiered menu ao clicar.
|
|
67
|
+
*/
|
|
21
68
|
primaryActionLabel;
|
|
69
|
+
/** @description Texto do botão de ação secundária. */
|
|
22
70
|
secondaryActionLabel;
|
|
71
|
+
/**
|
|
72
|
+
* @description Lista de itens para o tiered menu da ação primária.
|
|
73
|
+
* Quando informado com itens, o botão primário exibe um menu de opções
|
|
74
|
+
* ao invés de emitir o evento `primaryAction` diretamente.
|
|
75
|
+
*/
|
|
23
76
|
primaryModel = [];
|
|
77
|
+
/**
|
|
78
|
+
* @description Emitido quando o usuário clica no botão de ação primária e `primaryModel` está vazio.
|
|
79
|
+
*/
|
|
24
80
|
primaryAction = new EventEmitter();
|
|
81
|
+
/**
|
|
82
|
+
* @description Emitido quando o usuário clica no botão de ação secundária.
|
|
83
|
+
*/
|
|
25
84
|
secondaryAction = new EventEmitter();
|
|
26
85
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27
86
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: EmptyStateComponent, selector: "s-empty-state", inputs: { id: "id", title: "title", iconClass: "iconClass", description: "description", showPrimaryAction: "showPrimaryAction", showSecondaryAction: "showSecondaryAction", primaryActionLabel: "primaryActionLabel", secondaryActionLabel: "secondaryActionLabel", primaryModel: "primaryModel" }, outputs: { primaryAction: "primaryAction", secondaryAction: "secondaryAction" }, ngImport: i0, template: "<div\n [id]=\"id\"\n class=\"empty-state\"\n>\n <div\n [id]=\"id + '-icon'\"\n class=\"icon\"\n >\n <i\n [attr.class]=\"iconClass ? iconClass : 'fa fa-cogs'\"\n aria-hidden=\"true\"\n ></i>\n </div>\n <div\n [id]=\"id + '-title'\"\n class=\"title\"\n >\n {{ title }}\n </div>\n\n @if (description) {\n <div\n [id]=\"id + '-description'\"\n class=\"description\"\n >\n <p>{{ description }}</p>\n </div>\n }\n @if (showPrimaryAction && primaryActionLabel) {\n <div\n [id]=\"id + '-actions'\"\n class=\"actions\"\n >\n <s-button\n [id]=\"id + '-primary-action'\"\n type=\"button\"\n [label]=\"primaryActionLabel\"\n [menuOptions]=\"primaryModel\"\n (clicked)=\"primaryAction.next()\"\n ></s-button>\n @if (showSecondaryAction && secondaryActionLabel) {\n <s-button\n [id]=\"id + '-secondary-action'\"\n id=\"secondaryAction\"\n type=\"button\"\n [label]=\"secondaryActionLabel\"\n priority=\"link\"\n (clicked)=\"secondaryAction.next()\"\n ></s-button>\n }\n </div>\n }\n</div>\n", styles: [".empty-state{width:100%;text-align:center}.empty-state .icon{color:#d8d8d8;font-size:6em}.empty-state .title{font-weight:700;margin-bottom:10px}.empty-state .description{margin-bottom:15px;color:#999;padding:0 20px;text-align:center}.empty-state .description p{margin:auto;max-width:400px;max-height:80px;overflow:hidden}.empty-state .actions{text-align:center;width:100%}\n"], dependencies: [{ kind: "component", type: i1.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "menuAriaLabel", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-empty-state.mjs","sources":["../../projects/angular-components/empty-state/src/lib/empty-state/empty-state.component.ts","../../projects/angular-components/empty-state/src/lib/empty-state/empty-state.component.html","../../projects/angular-components/empty-state/src/lib/empty-state/go-back/go-back.component.ts","../../projects/angular-components/empty-state/src/lib/empty-state/go-back/go-back.component.html","../../projects/angular-components/empty-state/src/lib/empty-state/empty-state.module.ts","../../projects/angular-components/empty-state/src/seniorsistemas-angular-components-empty-state.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { TieredMenuItemData } from '@seniorsistemas/angular-components/tiered-menu';\n\n@Component({\n selector: 's-empty-state',\n templateUrl: './empty-state.component.html',\n styleUrls: ['./empty-state.component.scss'],\n})\nexport class EmptyStateComponent {\n public static readonly nextIdSeed = 0;\n private static _nextId = EmptyStateComponent.nextIdSeed;\n\n public static getNextId(): number {\n return this._nextId++;\n }\n \n @Input()\n public id = `s-empty-state-${EmptyStateComponent.getNextId()}`;\n\n @Input({ required: true })\n public title!: string;\n \n @Input()\n public iconClass = 'fa fa-inbox'; \n \n @Input()\n public description?: string;\n \n @Input()\n public showPrimaryAction = true;\n \n @Input()\n public showSecondaryAction = true;\n \n @Input()\n public primaryActionLabel?: string;\n \n @Input()\n public secondaryActionLabel?: string;\n \n @Input()\n public primaryModel: TieredMenuItemData[] = [];\n\n @Output()\n public primaryAction = new EventEmitter<void>();\n \n @Output()\n public secondaryAction = new EventEmitter<void>();\n}\n","<div\n [id]=\"id\"\n class=\"empty-state\"\n>\n <div\n [id]=\"id + '-icon'\"\n class=\"icon\"\n >\n <i\n [attr.class]=\"iconClass ? iconClass : 'fa fa-cogs'\"\n aria-hidden=\"true\"\n ></i>\n </div>\n <div\n [id]=\"id + '-title'\"\n class=\"title\"\n >\n {{ title }}\n </div>\n\n @if (description) {\n <div\n [id]=\"id + '-description'\"\n class=\"description\"\n >\n <p>{{ description }}</p>\n </div>\n }\n @if (showPrimaryAction && primaryActionLabel) {\n <div\n [id]=\"id + '-actions'\"\n class=\"actions\"\n >\n <s-button\n [id]=\"id + '-primary-action'\"\n type=\"button\"\n [label]=\"primaryActionLabel\"\n [menuOptions]=\"primaryModel\"\n (clicked)=\"primaryAction.next()\"\n ></s-button>\n @if (showSecondaryAction && secondaryActionLabel) {\n <s-button\n [id]=\"id + '-secondary-action'\"\n id=\"secondaryAction\"\n type=\"button\"\n [label]=\"secondaryActionLabel\"\n priority=\"link\"\n (clicked)=\"secondaryAction.next()\"\n ></s-button>\n }\n </div>\n }\n</div>\n","import { Component, Input } from '@angular/core';\n\nimport { CookieService } from 'ngx-cookie-service';\n\n@Component({\n selector: 's-empty-state-go-back',\n templateUrl: './go-back.component.html',\n styleUrls: [],\n})\nexport class EmptyStateGoBackComponent {\n @Input()\n public iconClass = 'fa fa-exclamation-triangle';\n\n @Input({ required: true })\n public title!: string;\n\n @Input()\n public description?: string;\n\n @Input()\n public primaryActionLabel?: string;\n\n constructor(private readonly _cookieService: CookieService) {}\n\n public goBack() {\n const portalUrl = this._cookieService.get('com.senior.portal.url');\n window.open(portalUrl, '_top');\n }\n}\n","<s-empty-state \n [iconClass]=\"iconClass\" \n [title]=\"title\" \n [description]=\"description\" \n (primaryAction)=\"goBack()\"\n [primaryActionLabel]=\"primaryActionLabel\">\n</s-empty-state>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { CookieService } from 'ngx-cookie-service';\n\nimport { EmptyStateComponent } from './empty-state.component';\nimport { EmptyStateGoBackComponent } from './go-back/go-back.component';\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\n\n@NgModule({\n imports: [CommonModule, ButtonModule],\n providers: [CookieService],\n declarations: [EmptyStateComponent, EmptyStateGoBackComponent],\n exports: [EmptyStateComponent, EmptyStateGoBackComponent],\n})\nexport class EmptyStateModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2.EmptyStateComponent"],"mappings":";;;;;;;;MAQa,mBAAmB,CAAA;AACrB,IAAA,OAAgB,UAAU,GAAG,CAAC,CAAC;AAC9B,IAAA,OAAO,OAAO,GAAG,mBAAmB,CAAC,UAAU,CAAC;AAEjD,IAAA,OAAO,SAAS,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;KACzB;AAGM,IAAA,EAAE,GAAG,CAAiB,cAAA,EAA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B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;oBACrC,SAAS,EAAE,CAAC,aAAa,CAAC;AAC1B,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;AAC9D,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;AAC5D,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-empty-state.mjs","sources":["../../projects/angular-components/empty-state/src/lib/empty-state/empty-state.component.ts","../../projects/angular-components/empty-state/src/lib/empty-state/empty-state.component.html","../../projects/angular-components/empty-state/src/lib/empty-state/go-back/go-back.component.ts","../../projects/angular-components/empty-state/src/lib/empty-state/go-back/go-back.component.html","../../projects/angular-components/empty-state/src/lib/empty-state/empty-state.module.ts","../../projects/angular-components/empty-state/src/seniorsistemas-angular-components-empty-state.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { TieredMenuItemData } from '@seniorsistemas/angular-components/tiered-menu';\n\n/**\n * @description Componente de estado vazio exibido quando não há conteúdo para mostrar.\n * Apresenta um ícone, título, descrição e até duas ações configuráveis\n * (primária com suporte a tiered menu e secundária simples).\n *\n * @example\n * ```html\n * <s-empty-state\n * title=\"Nenhum resultado encontrado\"\n * description=\"Tente ajustar os filtros da busca.\"\n * primaryActionLabel=\"Criar novo\"\n * (primaryAction)=\"onCreate()\"\n * />\n * ```\n *\n * @category Feedback\n */\n@Component({\n selector: 's-empty-state',\n templateUrl: './empty-state.component.html',\n styleUrls: ['./empty-state.component.scss'],\n})\nexport class EmptyStateComponent {\n public static readonly nextIdSeed = 0;\n private static _nextId = EmptyStateComponent.nextIdSeed;\n\n public static getNextId(): number {\n return this._nextId++;\n }\n\n /**\n * @description Identificador único do componente. Gerado automaticamente se não informado.\n */\n @Input()\n public id = `s-empty-state-${EmptyStateComponent.getNextId()}`;\n\n /**\n * @description Título principal exibido no estado vazio. Campo obrigatório.\n */\n @Input({ required: true })\n public title!: string;\n\n /**\n * @description Classe CSS do ícone exibido no estado vazio.\n * Aceita classes de bibliotecas de ícones como Font Awesome.\n *\n * @default 'fa fa-inbox'\n */\n @Input()\n public iconClass = 'fa fa-inbox';\n\n /**\n * @description Texto descritivo exibido abaixo do título, explicando o motivo do estado vazio\n * ou orientando o usuário sobre as próximas ações.\n */\n @Input()\n public description?: string;\n\n /**\n * @description Controla a visibilidade do botão de ação primária.\n *\n * @default true\n */\n @Input()\n public showPrimaryAction = true;\n\n /**\n * @description Controla a visibilidade do botão de ação secundária.\n *\n * @default true\n */\n @Input()\n public showSecondaryAction = true;\n\n /**\n * @description Texto do botão de ação primária.\n * Quando `primaryModel` possui itens, o botão exibe um tiered menu ao clicar.\n */\n @Input()\n public primaryActionLabel?: string;\n\n /** @description Texto do botão de ação secundária. */\n @Input()\n public secondaryActionLabel?: string;\n\n /**\n * @description Lista de itens para o tiered menu da ação primária.\n * Quando informado com itens, o botão primário exibe um menu de opções\n * ao invés de emitir o evento `primaryAction` diretamente.\n */\n @Input()\n public primaryModel: TieredMenuItemData[] = [];\n\n /**\n * @description Emitido quando o usuário clica no botão de ação primária e `primaryModel` está vazio.\n */\n @Output()\n public primaryAction = new EventEmitter<void>();\n\n /**\n * @description Emitido quando o usuário clica no botão de ação secundária.\n */\n @Output()\n public secondaryAction = new EventEmitter<void>();\n}\n\n","<div\n [id]=\"id\"\n class=\"empty-state\"\n>\n <div\n [id]=\"id + '-icon'\"\n class=\"icon\"\n >\n <i\n [attr.class]=\"iconClass ? iconClass : 'fa fa-cogs'\"\n aria-hidden=\"true\"\n ></i>\n </div>\n <div\n [id]=\"id + '-title'\"\n class=\"title\"\n >\n {{ title }}\n </div>\n\n @if (description) {\n <div\n [id]=\"id + '-description'\"\n class=\"description\"\n >\n <p>{{ description }}</p>\n </div>\n }\n @if (showPrimaryAction && primaryActionLabel) {\n <div\n [id]=\"id + '-actions'\"\n class=\"actions\"\n >\n <s-button\n [id]=\"id + '-primary-action'\"\n type=\"button\"\n [label]=\"primaryActionLabel\"\n [menuOptions]=\"primaryModel\"\n (clicked)=\"primaryAction.next()\"\n ></s-button>\n @if (showSecondaryAction && secondaryActionLabel) {\n <s-button\n [id]=\"id + '-secondary-action'\"\n id=\"secondaryAction\"\n type=\"button\"\n [label]=\"secondaryActionLabel\"\n priority=\"link\"\n (clicked)=\"secondaryAction.next()\"\n ></s-button>\n }\n </div>\n }\n</div>\n","import { Component, Input } from '@angular/core';\n\nimport { CookieService } from 'ngx-cookie-service';\n\n@Component({\n selector: 's-empty-state-go-back',\n templateUrl: './go-back.component.html',\n styleUrls: [],\n})\nexport class EmptyStateGoBackComponent {\n @Input()\n public iconClass = 'fa fa-exclamation-triangle';\n\n @Input({ required: true })\n public title!: string;\n\n @Input()\n public description?: string;\n\n @Input()\n public primaryActionLabel?: string;\n\n constructor(private readonly _cookieService: CookieService) {}\n\n public goBack() {\n const portalUrl = this._cookieService.get('com.senior.portal.url');\n window.open(portalUrl, '_top');\n }\n}\n","<s-empty-state \n [iconClass]=\"iconClass\" \n [title]=\"title\" \n [description]=\"description\" \n (primaryAction)=\"goBack()\"\n [primaryActionLabel]=\"primaryActionLabel\">\n</s-empty-state>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { CookieService } from 'ngx-cookie-service';\n\nimport { EmptyStateComponent } from './empty-state.component';\nimport { EmptyStateGoBackComponent } from './go-back/go-back.component';\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\n\n@NgModule({\n imports: [CommonModule, ButtonModule],\n providers: [CookieService],\n declarations: [EmptyStateComponent, EmptyStateGoBackComponent],\n exports: [EmptyStateComponent, EmptyStateGoBackComponent],\n})\nexport class EmptyStateModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2.EmptyStateComponent"],"mappings":";;;;;;;;AAGA;;;;;;;;;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OAAA,EAAA,CAFnD,YAAY,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAG1B,mBAAmB,EAAE,yBAAyB,CAAA,EAAA,CAAA,CAAA;AAE/C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,aAJd,CAAC,aAAa,CAAC,EADhB,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAK3B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;oBACrC,SAAS,EAAE,CAAC,aAAa,CAAC;AAC1B,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;AAC9D,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;AAC5D,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -7,14 +7,34 @@ import { CommonModule } from '@angular/common';
|
|
|
7
7
|
import * as i2 from '@seniorsistemas/angular-components/interactive-content';
|
|
8
8
|
import { InteractiveContentDirective } from '@seniorsistemas/angular-components/interactive-content';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @description Componente de fieldset com legenda, ícone configurável e suporte a
|
|
12
|
+
* toggle (recolher/expandir) com animação. Suporta template personalizado para o
|
|
13
|
+
* cabeçalho via diretiva `TemplateDirective` com tipo `'header'`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <s-fieldset legend="Dados pessoais" [toggleable]="true">
|
|
18
|
+
* <p>Conteúdo do fieldset</p>
|
|
19
|
+
* </s-fieldset>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @category Inputs
|
|
23
|
+
*/
|
|
10
24
|
class FieldsetComponent {
|
|
25
|
+
/** @description Texto exibido como título do fieldset. @default '' */
|
|
11
26
|
legend = '';
|
|
27
|
+
/** @description Habilita o botão de toggle que permite recolher e expandir o conteúdo. @default false */
|
|
12
28
|
toggleable = false;
|
|
29
|
+
/** @description Classe de ícone exibida ao lado da legenda (ex.: `'fas fa-cog'`). @default '' */
|
|
13
30
|
icon = '';
|
|
31
|
+
/** @description Quando `true`, remove o conteúdo do DOM ao recolher o fieldset. @default true */
|
|
14
32
|
destroyOnHide = true;
|
|
15
33
|
templateDirectives;
|
|
16
34
|
headerTemplate;
|
|
35
|
+
/** @description Emitido imediatamente antes da animação de toggle iniciar, com o estado atual. */
|
|
17
36
|
beforeToggle = new EventEmitter();
|
|
37
|
+
/** @description Emitido após a animação de toggle concluir, com o novo estado. */
|
|
18
38
|
afterToggle = new EventEmitter();
|
|
19
39
|
active = true;
|
|
20
40
|
ngAfterViewInit() {
|
|
@@ -47,7 +67,7 @@ class FieldsetComponent {
|
|
|
47
67
|
}
|
|
48
68
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FieldsetComponent, decorators: [{
|
|
49
69
|
type: Component,
|
|
50
|
-
args: [{ selector:
|
|
70
|
+
args: [{ selector: 's-fieldset', animations: [
|
|
51
71
|
trigger('toggleAnimation', [
|
|
52
72
|
transition(':enter', [
|
|
53
73
|
style({ opacity: 0, height: 0 }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-fieldset.mjs","sources":["../../projects/angular-components/fieldset/src/lib/fieldset/fieldset.component.ts","../../projects/angular-components/fieldset/src/lib/fieldset/fieldset.component.html","../../projects/angular-components/fieldset/src/lib/fieldset/fieldset.module.ts","../../projects/angular-components/fieldset/src/seniorsistemas-angular-components-fieldset.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-fieldset.mjs","sources":["../../projects/angular-components/fieldset/src/lib/fieldset/fieldset.component.ts","../../projects/angular-components/fieldset/src/lib/fieldset/fieldset.component.html","../../projects/angular-components/fieldset/src/lib/fieldset/fieldset.module.ts","../../projects/angular-components/fieldset/src/seniorsistemas-angular-components-fieldset.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from '@angular/animations';\nimport {\n AfterViewInit,\n Component,\n ContentChildren,\n EventEmitter,\n Input,\n Output,\n QueryList,\n TemplateRef,\n} from '@angular/core';\n\nimport { TemplateDirective } from '@seniorsistemas/angular-components/template';\nimport { FieldSetToggle } from './fieldset.models';\n\n/**\n * @description Componente de fieldset com legenda, ícone configurável e suporte a\n * toggle (recolher/expandir) com animação. Suporta template personalizado para o\n * cabeçalho via diretiva `TemplateDirective` com tipo `'header'`.\n *\n * @example\n * ```html\n * <s-fieldset legend=\"Dados pessoais\" [toggleable]=\"true\">\n * <p>Conteúdo do fieldset</p>\n * </s-fieldset>\n * ```\n *\n * @category Inputs\n */\n@Component({\n selector: 's-fieldset',\n templateUrl: './fieldset.component.html',\n styleUrls: ['./fieldset.component.scss'],\n animations: [\n trigger('toggleAnimation', [\n transition(':enter', [\n style({ opacity: 0, height: 0 }),\n animate('300ms ease-out', style({ opacity: 1, height: '*' })),\n ]),\n transition(':leave', [\n style({ opacity: 1, height: '*' }),\n animate('300ms ease-in', style({ opacity: 0, height: 0 })),\n ]),\n state('open', style({ opacity: 1, height: '*' })),\n state('closed', style({ opacity: 0, height: 0 })),\n transition('open <=> closed', animate('300ms ease')),\n ]),\n ],\n})\nexport class FieldsetComponent implements AfterViewInit {\n /** @description Texto exibido como título do fieldset. @default '' */\n @Input() legend = '';\n /** @description Habilita o botão de toggle que permite recolher e expandir o conteúdo. @default false */\n @Input() toggleable = false;\n /** @description Classe de ícone exibida ao lado da legenda (ex.: `'fas fa-cog'`). @default '' */\n @Input() icon = '';\n /** @description Quando `true`, remove o conteúdo do DOM ao recolher o fieldset. @default true */\n @Input() destroyOnHide = true;\n @ContentChildren(TemplateDirective) readonly templateDirectives: QueryList<TemplateDirective> | undefined;\n headerTemplate: TemplateRef<any> | undefined;\n /** @description Emitido imediatamente antes da animação de toggle iniciar, com o estado atual. */\n @Output() beforeToggle = new EventEmitter<FieldSetToggle>();\n /** @description Emitido após a animação de toggle concluir, com o novo estado. */\n @Output() afterToggle = new EventEmitter<FieldSetToggle>();\n active = true;\n\n ngAfterViewInit(): void {\n this.headerTemplate = this.templateDirectives?.find((template) => template.type === 'header')?.template;\n }\n\n toggleActive(originalEvent: PointerEvent | KeyboardEvent) {\n if (!this.toggleable) {\n return;\n }\n this.beforeToggle.next({ collapsed: this.active, originalEvent });\n this.active = !this.active;\n this.afterToggle.next({ collapsed: this.active, originalEvent });\n }\n}\n\n","<fieldset\n class=\"fieldset\"\n [class.fieldset-togglable]=\"toggleable\"\n>\n <legend\n class=\"fieldset-title\"\n (sInteractiveContent)=\"toggleActive($event)\"\n >\n <ng-container *ngIf=\"toggleable\">\n @if (active) {\n <i class=\"fas fa-plus\"></i>\n } @else {\n <i class=\"fas fa-minus\"></i>\n }\n </ng-container>\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n } @else {\n <i\n *ngIf=\"icon\"\n [class]=\"icon\"\n ></i>\n {{ legend }}\n }\n </legend>\n @if (destroyOnHide ? (toggleable ? active : true) : true) {\n <div [@toggleAnimation]=\"destroyOnHide ? null : active ? 'open' : 'closed'\">\n <ng-content></ng-content>\n </div>\n }\n</fieldset>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { InteractiveContentDirective } from '@seniorsistemas/angular-components/interactive-content';\n\nimport { FieldsetComponent } from './fieldset.component';\n\n@NgModule({\n imports: [CommonModule, InteractiveContentDirective],\n declarations: [FieldsetComponent],\n exports: [FieldsetComponent],\n})\nexport class FieldsetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings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A,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,2BAA2B,CAAC;oBACpD,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC/B,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -36,6 +36,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
36
36
|
type: Injectable
|
|
37
37
|
}] });
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* @description Componente de upload de arquivos com suporte a seleção múltipla,
|
|
41
|
+
* validação de tipo/tamanho, controle de permissões (adicionar, ler, remover),
|
|
42
|
+
* download e cancelamento de uploads em andamento.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```html
|
|
46
|
+
* <s-file-picker
|
|
47
|
+
* [multiple]="true"
|
|
48
|
+
* accept="application/pdf"
|
|
49
|
+
* [maxFileSize]="5242880"
|
|
50
|
+
* [files]="arquivos"
|
|
51
|
+
* (uploadHandler)="onUpload($event)"
|
|
52
|
+
* (removeFile)="onRemove($event)" />
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @category Inputs
|
|
56
|
+
*/
|
|
39
57
|
class FilePickerComponent {
|
|
40
58
|
sanitizer;
|
|
41
59
|
filePickerService;
|
|
@@ -46,26 +64,50 @@ class FilePickerComponent {
|
|
|
46
64
|
REMOVE_PERMISSION = 'remove';
|
|
47
65
|
inputUpload = null;
|
|
48
66
|
anchor = null;
|
|
67
|
+
/** @description Identificador do componente no DOM. Gerado automaticamente se não informado. */
|
|
49
68
|
id = `s-file-picker-${FilePickerComponent.nextId++}`;
|
|
69
|
+
/** @description Rótulo do botão de seleção de arquivo. */
|
|
50
70
|
chooseLabel;
|
|
71
|
+
/** @description Rótulo do botão de remoção de arquivo. */
|
|
51
72
|
removeLabel;
|
|
73
|
+
/** @description Rótulo do botão de cancelamento de upload. */
|
|
52
74
|
cancelLabel;
|
|
75
|
+
/** @description Texto do tooltip exibido após upload bem-sucedido. */
|
|
53
76
|
successTooltip;
|
|
77
|
+
/** @description Permite selecionar múltiplos arquivos ao mesmo tempo. */
|
|
54
78
|
multiple;
|
|
79
|
+
/** @description Tipos MIME aceitos pelo seletor de arquivo (ex.: `'application/pdf,image/*'`). */
|
|
55
80
|
accept;
|
|
81
|
+
/** @description Lista de extensões de arquivo aceitas para validação (ex.: `['.pdf', '.docx']`). @default [] */
|
|
56
82
|
supportedExtensions = [];
|
|
83
|
+
/** @description Label ARIA para o nome do arquivo, para leitores de tela. */
|
|
57
84
|
ariaLabelFileName;
|
|
85
|
+
/** @description Tamanho máximo por arquivo em bytes. */
|
|
58
86
|
maxFileSize;
|
|
87
|
+
/** @description Tamanho máximo combinado de todos os arquivos em bytes. */
|
|
59
88
|
maxCombinedFileSize;
|
|
89
|
+
/** @description Número máximo de arquivos que podem ser selecionados. */
|
|
60
90
|
fileLimit;
|
|
91
|
+
/** @description Label ARIA para a barra de progresso do upload. */
|
|
61
92
|
ariaLabelProgress;
|
|
93
|
+
/** @description Label ARIA para o ícone de sucesso. */
|
|
62
94
|
ariaLabelSuccess;
|
|
95
|
+
/** @description Label ARIA para mensagens de erro de validação. */
|
|
63
96
|
ariaLabelError;
|
|
97
|
+
/** @description Label ARIA para o botão de remoção de arquivo. */
|
|
64
98
|
ariaLabelRemove;
|
|
99
|
+
/** @description FormControl externo vinculado ao componente para controle de estado. */
|
|
65
100
|
formControl;
|
|
101
|
+
/** @description Desabilita todas as interações do componente. @default false */
|
|
66
102
|
disabled = false;
|
|
103
|
+
/** @description Exibe a data de upload de cada arquivo. @default false */
|
|
67
104
|
showFileUploadDate = false;
|
|
105
|
+
/** @description Lista de permissões habilitadas no componente: `'add'`, `'read'`, `'remove'`. @default ALL_PERMISSIONS */
|
|
68
106
|
permissions = ALL_PERMISSIONS;
|
|
107
|
+
/**
|
|
108
|
+
* @description Lista de arquivos já enviados a serem exibidos no componente.
|
|
109
|
+
* Ao atribuir, os arquivos são processados e suas URLs são geradas para preview.
|
|
110
|
+
*/
|
|
69
111
|
set files(files) {
|
|
70
112
|
if (!files || files?.length === 0) {
|
|
71
113
|
this._files = [];
|
|
@@ -79,10 +121,15 @@ class FilePickerComponent {
|
|
|
79
121
|
return file;
|
|
80
122
|
});
|
|
81
123
|
}
|
|
124
|
+
/** @description Emitido quando o usuário seleciona arquivos válidos para upload. */
|
|
82
125
|
uploadHandler = new EventEmitter();
|
|
126
|
+
/** @description Emitido quando o usuário remove um arquivo da lista. */
|
|
83
127
|
removeFile = new EventEmitter();
|
|
128
|
+
/** @description Emitido quando o usuário cancela um upload em andamento. Emite o índice do arquivo cancelado. */
|
|
84
129
|
cancelUpload = new EventEmitter();
|
|
130
|
+
/** @description Emitido quando o usuário clica para baixar um arquivo. */
|
|
85
131
|
downloadFile = new EventEmitter();
|
|
132
|
+
/** @description Emitido quando um arquivo não passa na validação de tipo, tamanho ou limite. */
|
|
86
133
|
validateErrors = new EventEmitter();
|
|
87
134
|
_files = [];
|
|
88
135
|
ngUsubscribe = new Subject();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-file-picker.mjs","sources":["../../projects/angular-components/file-picker/src/lib/file-picker/models/file-picker-permissions.ts","../../projects/angular-components/file-picker/src/lib/file-picker/file-picker.service.ts","../../projects/angular-components/file-picker/src/lib/file-picker/file-picker.component.ts","../../projects/angular-components/file-picker/src/lib/file-picker/file-picker.component.html","../../projects/angular-components/file-picker/src/lib/file-picker/file-picker.module.ts","../../projects/angular-components/file-picker/src/seniorsistemas-angular-components-file-picker.ts"],"sourcesContent":["export type FilePickerPermissions = 'add' | 'read' | 'remove';\n\nexport const ALL_PERMISSIONS: FilePickerPermissions[] = ['add', 'read', 'remove'];\n","import { Injectable } from '@angular/core';\n\nimport { CustomHttpClient } from '@seniorsistemas/angular-components/common';\n\nimport { ListBlobMetadataRequest, ListBlobMetadataResponse } from './models/list-blob-metadata';\n\n@Injectable()\nexport class FilePickerService {\n private BASE_URL_FIELD_CUSTOMIZATION = 'platform/field_customization';\n private TOKEN = new AbortController();\n\n public async getMetadataCustomField<T>(request: ListBlobMetadataRequest): Promise<ListBlobMetadataResponse> {\n return CustomHttpClient.post(`${this.BASE_URL_FIELD_CUSTOMIZATION}/queries/getFileMetadata`, request, {\n signal: this.TOKEN.signal,\n });\n }\n}\n","import {\n AfterContentInit,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { DEPRECATED_CONFIG } from '@seniorsistemas/angular-components/common/deprecated-selector';\nimport { DeprecatedSelectorDirective } from '@seniorsistemas/angular-components/common/deprecated-selector';\nimport { Breakpoints, isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\nimport moment from 'moment';\nimport { Subject } from 'rxjs';\n\nimport { FilePickerService } from './file-picker.service';\nimport { FileDto } from './models/file-dto';\nimport { ALL_PERMISSIONS, FilePickerPermissions } from './models/file-picker-permissions';\nimport { ListBlobMetadataResponse } from './models/list-blob-metadata';\nimport { UploadError } from './models/uploadError';\n\n@Component({\n selector: 's-file-picker, s-file-upload',\n templateUrl: './file-picker.component.html',\n styleUrls: ['./file-picker.component.scss'],\n hostDirectives: [DeprecatedSelectorDirective],\n providers: [\n {\n provide: DEPRECATED_CONFIG,\n useValue: {\n oldSelector: 's-file-upload',\n newSelector: 's-file-picker',\n removalVersion: '20.0.0',\n },\n },\n ],\n})\nexport class FilePickerComponent implements OnInit, OnDestroy, AfterContentInit {\n public static nextId = 0;\n\n public ADD_PERMISSION: FilePickerPermissions = 'add';\n public READ_PERMISSION: FilePickerPermissions = 'read';\n public REMOVE_PERMISSION: FilePickerPermissions = 'remove';\n\n @ViewChild('inputUpload', { static: false })\n private readonly inputUpload: ElementRef | null = null;\n\n @ViewChild('anchor', { static: false })\n private readonly anchor: ElementRef | null = null;\n\n @Input()\n public id = `s-file-picker-${FilePickerComponent.nextId++}`;\n\n @Input()\n public chooseLabel?: string;\n\n @Input()\n public removeLabel?: string;\n\n @Input()\n public cancelLabel?: string;\n\n @Input()\n public successTooltip?: string;\n\n @Input()\n public multiple?: boolean;\n\n @Input()\n public accept?: string;\n\n @Input()\n public supportedExtensions: string[] = [];\n\n @Input()\n public ariaLabelFileName?: string;\n\n @Input()\n public maxFileSize?: number;\n\n @Input()\n public maxCombinedFileSize?: number;\n\n @Input()\n public fileLimit?: number;\n\n @Input()\n public ariaLabelProgress?: string;\n\n @Input()\n public ariaLabelSuccess?: string;\n\n @Input()\n public ariaLabelError?: string;\n\n @Input()\n public ariaLabelRemove?: string;\n\n @Input()\n public formControl?: FormControl;\n\n @Input()\n public disabled = false;\n\n @Input()\n public showFileUploadDate: boolean = false;\n\n @Input()\n public permissions: FilePickerPermissions[] = ALL_PERMISSIONS;\n\n @Input()\n public set files(files: FileDto[]) {\n if (!files || files?.length === 0) {\n this._files = [];\n return;\n }\n if (this.showFileUploadDate && files[0]?.objectId) {\n this.getUploadDate(files);\n }\n this._files = files.map((file) => {\n file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(file));\n return file;\n });\n }\n\n @Output()\n public uploadHandler: EventEmitter<{ files: FileDto[] }> = new EventEmitter();\n\n @Output()\n public removeFile: EventEmitter<{ file: File }> = new EventEmitter();\n\n @Output()\n public cancelUpload: EventEmitter<number> = new EventEmitter();\n\n @Output()\n public downloadFile: EventEmitter<{ index: number; anchor: ElementRef }> = new EventEmitter();\n\n @Output()\n public validateErrors: EventEmitter<UploadError> = new EventEmitter();\n\n private _files: FileDto[] = [];\n private readonly ngUsubscribe: Subject<void> = new Subject();\n public isSmallDevice = false;\n public inputValue = '';\n public modifiedDate?: string;\n\n constructor(\n private readonly sanitizer: DomSanitizer,\n private readonly filePickerService: FilePickerService,\n private readonly translate: TranslateService,\n ) {}\n\n public ngOnInit(): void {\n this.supportedExtensions = this.supportedExtensions.map((extension) =>\n extension.replace('.', '').toLowerCase(),\n );\n }\n\n public ngOnDestroy() {\n this.ngUsubscribe.next();\n this.ngUsubscribe.complete();\n }\n\n public ngAfterContentInit() {\n this.update();\n }\n\n @HostListener('window:resize')\n public onResize() {\n this.update();\n }\n\n public _onInputFileSelect($event: Event): void {\n const eventTargetFiles = ($event.target as HTMLInputElement)?.files as FileList;\n const dataTransferFiles = ($event as DragEvent).dataTransfer?.files as FileList;\n const files: FileDto[] = Array.from(dataTransferFiles ? dataTransferFiles : eventTargetFiles);\n this.onFileSelect(files);\n }\n\n public onFileSelect(files: FileDto[]): void {\n const newFiles: FileDto[] = [];\n\n if (!this.multiple) {\n this.files = [];\n }\n\n if (this.isFileLimitExceeded(files)) {\n this.validateErrors.emit({\n files,\n validation: 'maxFileLimit',\n });\n this.clearFileInput();\n return;\n }\n\n if (this.isFileCombinedSizeExceeded(files)) {\n this.validateErrors.emit({\n files: files,\n validation: 'maxCombinedFileSize',\n });\n this.clearFileInput();\n return;\n }\n\n for (const file of files) {\n if (this.isUnsupportedFileExtension(file)) {\n this.validateErrors.emit({\n files: [file],\n validation: 'unsupportedExtension',\n });\n continue;\n }\n\n if (this.isFileSizeExceeded(file)) {\n this.validateErrors.emit({\n files: [file],\n validation: 'maxFileSize',\n });\n continue;\n }\n\n newFiles.push(file);\n }\n\n if (newFiles.length) {\n this.files = this.files.concat(newFiles);\n this.uploadHandler.emit({\n files: newFiles,\n });\n }\n\n this.clearFileInput();\n }\n\n public onRemoveFile(file: FileDto): void {\n const fileIndex = this.files.indexOf(file);\n const removedFiles = this.files.splice(fileIndex, 1);\n\n if (removedFiles.length) {\n this.removeFile.emit({ file });\n }\n }\n\n public onCancelUpload(index: number) {\n const removedFiles = this.files.splice(index, 1);\n\n if (removedFiles.length) {\n this.cancelUpload.emit(index);\n }\n\n this.clearFileInput();\n }\n\n public onDowloadFile(index: number) {\n if (isNullOrUndefined(this.anchor)) return;\n\n this.downloadFile.emit({\n index,\n anchor: this.anchor,\n });\n }\n\n public get files(): FileDto[] {\n return this._files;\n }\n\n public formatFileSize(size: number): string {\n if (size === 0) {\n return '0 Bytes';\n }\n const k = 1024;\n const sizes = ['bytes', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(size) / Math.log(k));\n return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n\n private update() {\n const windowWidth = window.innerWidth;\n this.isSmallDevice = windowWidth <= Breakpoints.SM_MAX;\n }\n\n private isFileLimitExceeded(files: FileDto[]) {\n if (!this.fileLimit) {\n return false;\n }\n return this.files.length + files.length > this.fileLimit;\n }\n\n private isFileCombinedSizeExceeded(files: File[]): boolean {\n if (!this.maxCombinedFileSize) {\n return false;\n }\n\n const filesList = [...files, ...this.files];\n\n const combinedSize = filesList.reduce((combinedSize, file) => combinedSize + file.size, 0);\n\n return combinedSize > this.maxCombinedFileSize;\n }\n\n private isFileSizeExceeded(file: File): boolean {\n if (!this.maxFileSize) {\n return false;\n }\n return file.size > this.maxFileSize;\n }\n\n private isUnsupportedFileExtension(file: File) {\n if (this.supportedExtensions?.length) {\n const extension = file.name.split('.').pop()?.toLowerCase() ?? '';\n\n return !this.supportedExtensions.includes(extension);\n }\n return false;\n }\n\n private clearFileInput() {\n if (isNullOrUndefined(this.inputUpload?.nativeElement)) return;\n\n this.inputUpload.nativeElement.value = null;\n }\n\n private getUploadDate(blobFile: FileDto[]): void {\n if (!blobFile) {\n return;\n }\n\n this.filePickerService\n .getMetadataCustomField({ objectId: blobFile[0].objectId ?? '' })\n .then((metadata) => this.setModifiedDate(metadata));\n }\n\n private setModifiedDate(metadata: ListBlobMetadataResponse): void {\n const hour = moment(metadata.modified).format('HH');\n const minutes = moment(metadata.modified).format('mm');\n const day = moment(metadata.modified).format('DD');\n const month = moment(metadata.modified).format('MM');\n const fullYear = moment(metadata.modified).format('YYYY');\n\n this.modifiedDate = this.translate.instant('platform.angular_components.date_modified_custom_blob', {\n hour,\n minutes,\n day,\n month,\n fullYear,\n });\n }\n}\n\n","<div\n [id]=\"id\"\n class=\"file-picker\"\n>\n <div class=\"file-picker-choose\">\n <input\n #inputUpload\n [id]=\"id + 'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"_onInputFileSelect($event)\"\n />\n @if (permissions.includes(ADD_PERMISSION)) {\n <s-button\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (clicked)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formControl?.disabled || fileLimit === files.length\"\n [auxiliary]=\"false\"\n >\n </s-button>\n }\n </div>\n\n @if (files.length) {\n <section\n [id]=\"id + 'fileupload-list'\"\n class=\"file-picker-list\"\n role=\"grid\"\n >\n @for (file of files; track file; let i = $index) {\n <div\n class=\"file-picker-list-file\"\n role=\"row\"\n >\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"flex flex-grow items-center justify-between overflow-hidden text-ellipsis text-nowrap\"\n role=\"gridcell\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n (permissions.includes(READ_PERMISSION) && file.savedFile) || file.progress === 100\n ? descriptionUrl\n : description;\n context: {\n $implicit: file,\n index: i,\n }\n \"\n >\n </ng-container>\n\n <span>{{ formatFileSize(file.size) }}</span>\n\n @if (modifiedDate) {\n <span class=\"file-picker-list-file-name-date\">{{ modifiedDate }}</span>\n }\n </div>\n <div\n class=\"file-picker-list-file-status\"\n role=\"gridcell\"\n >\n @if (file.isUploading && !isSmallDevice) {\n <div class=\"w-64\">\n <s-progressbar\n [value]=\"file.progress ?? 0\"\n [showValue]=\"false\"\n activeColor=\"blue\"\n ></s-progressbar>\n </div>\n }\n\n @if (file.isUploading && isSmallDevice) {\n <span\n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"\n ariaLabelProgress || 'platform.angular_components.loading_file' | translate\n \"\n >\n </span>\n }\n\n @if (!file.isUploading && !file.error && file.progress === 100) {\n <span\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"\n ariaLabelSuccess ||\n successTooltip ||\n 'platform.angular_components.file_attached_successfully' | translate\n \"\n [pTooltip]=\"\n successTooltip || 'platform.angular_components.file_attached_successfully'\n | translate\n \"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\"\n >\n </span>\n }\n\n @if (file.error?.message) {\n <span\n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\"\n >\n </span>\n }\n </div>\n <div\n class=\"file-picker-list-file-actions\"\n role=\"gridcell\"\n >\n @if (file.isUploading) {\n <a\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"file-picker-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\"\n >\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n }\n\n @if (\n permissions.includes(REMOVE_PERMISSION) &&\n !file.isUploading &&\n !(disabled || !!formControl?.disabled)\n ) {\n <a\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"file-picker-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"\n ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\n \"\n >\n {{ removeLabel || 'platform.angular_components.remove' | translate }}\n </a>\n }\n </div>\n </div>\n }\n </section>\n }\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i=\"index\"\n>\n <div class=\"flex justify-between\">\n <div>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n class=\"break-words\"\n >{{ file.name }}\n </a>\n <a\n style=\"display: none\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor\n >\n </a>\n </div>\n </div>\n</ng-template>\n\n<ng-template\n #description\n let-file\n>\n <div class=\"flex justify-between\">\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n >\n {{ file.name }}\n </span>\n </div>\n</ng-template>\n\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { LocaleModule } from '@seniorsistemas/angular-components/locale';\nimport { ProgressBarModule } from '@seniorsistemas/angular-components/progressbar';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { FilePickerComponent } from './file-picker.component';\nimport { FilePickerService } from './file-picker.service';\n\n@NgModule({\n declarations: [FilePickerComponent],\n imports: [CommonModule, ButtonModule, TooltipModule, ProgressBarModule, TranslateModule, LocaleModule],\n providers: [FilePickerService],\n exports: [FilePickerComponent],\n})\nexport class FilePickerModule {}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.FilePickerService"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,eAAe,GAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC;;MCKpE,iBAAiB,CAAA;IAClB,4BAA4B,GAAG,8BAA8B,CAAC;AAC9D,IAAA,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;IAE/B,MAAM,sBAAsB,CAAI,OAAgC,EAAA;QACnE,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAA,EAAG,IAAI,CAAC,4BAA4B,CAAA,wBAAA,CAA0B,EAAE,OAAO,EAAE;AAClG,YAAA,MAAM,EAAE,IAAI,CAAC,KAAK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,gBAAgB,CAAA;wGAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EALV,YAAA,EAAA,CAAA,mBAAmB,CACxB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,aAE3F,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAEpB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAHd,SAAA,EAAA,CAAC,iBAAiB,CAAC,YADpB,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAI5F,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,CAAC;oBACtG,SAAS,EAAE,CAAC,iBAAiB,CAAC;oBAC9B,OAAO,EAAE,CAAC,mBAAmB,CAAC;AACjC,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-file-picker.mjs","sources":["../../projects/angular-components/file-picker/src/lib/file-picker/models/file-picker-permissions.ts","../../projects/angular-components/file-picker/src/lib/file-picker/file-picker.service.ts","../../projects/angular-components/file-picker/src/lib/file-picker/file-picker.component.ts","../../projects/angular-components/file-picker/src/lib/file-picker/file-picker.component.html","../../projects/angular-components/file-picker/src/lib/file-picker/file-picker.module.ts","../../projects/angular-components/file-picker/src/seniorsistemas-angular-components-file-picker.ts"],"sourcesContent":["export type FilePickerPermissions = 'add' | 'read' | 'remove';\n\nexport const ALL_PERMISSIONS: FilePickerPermissions[] = ['add', 'read', 'remove'];\n","import { Injectable } from '@angular/core';\n\nimport { CustomHttpClient } from '@seniorsistemas/angular-components/common';\n\nimport { ListBlobMetadataRequest, ListBlobMetadataResponse } from './models/list-blob-metadata';\n\n@Injectable()\nexport class FilePickerService {\n private BASE_URL_FIELD_CUSTOMIZATION = 'platform/field_customization';\n private TOKEN = new AbortController();\n\n public async getMetadataCustomField<T>(request: ListBlobMetadataRequest): Promise<ListBlobMetadataResponse> {\n return CustomHttpClient.post(`${this.BASE_URL_FIELD_CUSTOMIZATION}/queries/getFileMetadata`, request, {\n signal: this.TOKEN.signal,\n });\n }\n}\n","import {\n AfterContentInit,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { DEPRECATED_CONFIG } from '@seniorsistemas/angular-components/common/deprecated-selector';\nimport { DeprecatedSelectorDirective } from '@seniorsistemas/angular-components/common/deprecated-selector';\nimport { Breakpoints, isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\nimport moment from 'moment';\nimport { Subject } from 'rxjs';\n\nimport { FilePickerService } from './file-picker.service';\nimport { FileDto } from './models/file-dto';\nimport { ALL_PERMISSIONS, FilePickerPermissions } from './models/file-picker-permissions';\nimport { ListBlobMetadataResponse } from './models/list-blob-metadata';\nimport { UploadError } from './models/uploadError';\n\n/**\n * @description Componente de upload de arquivos com suporte a seleção múltipla,\n * validação de tipo/tamanho, controle de permissões (adicionar, ler, remover),\n * download e cancelamento de uploads em andamento.\n *\n * @example\n * ```html\n * <s-file-picker\n * [multiple]=\"true\"\n * accept=\"application/pdf\"\n * [maxFileSize]=\"5242880\"\n * [files]=\"arquivos\"\n * (uploadHandler)=\"onUpload($event)\"\n * (removeFile)=\"onRemove($event)\" />\n * ```\n *\n * @category Inputs\n */\n@Component({\n selector: 's-file-picker, s-file-upload',\n templateUrl: './file-picker.component.html',\n styleUrls: ['./file-picker.component.scss'],\n hostDirectives: [DeprecatedSelectorDirective],\n providers: [\n {\n provide: DEPRECATED_CONFIG,\n useValue: {\n oldSelector: 's-file-upload',\n newSelector: 's-file-picker',\n removalVersion: '20.0.0',\n },\n },\n ],\n})\nexport class FilePickerComponent implements OnInit, OnDestroy, AfterContentInit {\n public static nextId = 0;\n\n public ADD_PERMISSION: FilePickerPermissions = 'add';\n public READ_PERMISSION: FilePickerPermissions = 'read';\n public REMOVE_PERMISSION: FilePickerPermissions = 'remove';\n\n @ViewChild('inputUpload', { static: false })\n private readonly inputUpload: ElementRef | null = null;\n\n @ViewChild('anchor', { static: false })\n private readonly anchor: ElementRef | null = null;\n\n /** @description Identificador do componente no DOM. Gerado automaticamente se não informado. */\n @Input()\n public id = `s-file-picker-${FilePickerComponent.nextId++}`;\n\n /** @description Rótulo do botão de seleção de arquivo. */\n @Input()\n public chooseLabel?: string;\n\n /** @description Rótulo do botão de remoção de arquivo. */\n @Input()\n public removeLabel?: string;\n\n /** @description Rótulo do botão de cancelamento de upload. */\n @Input()\n public cancelLabel?: string;\n\n /** @description Texto do tooltip exibido após upload bem-sucedido. */\n @Input()\n public successTooltip?: string;\n\n /** @description Permite selecionar múltiplos arquivos ao mesmo tempo. */\n @Input()\n public multiple?: boolean;\n\n /** @description Tipos MIME aceitos pelo seletor de arquivo (ex.: `'application/pdf,image/*'`). */\n @Input()\n public accept?: string;\n\n /** @description Lista de extensões de arquivo aceitas para validação (ex.: `['.pdf', '.docx']`). @default [] */\n @Input()\n public supportedExtensions: string[] = [];\n\n /** @description Label ARIA para o nome do arquivo, para leitores de tela. */\n @Input()\n public ariaLabelFileName?: string;\n\n /** @description Tamanho máximo por arquivo em bytes. */\n @Input()\n public maxFileSize?: number;\n\n /** @description Tamanho máximo combinado de todos os arquivos em bytes. */\n @Input()\n public maxCombinedFileSize?: number;\n\n /** @description Número máximo de arquivos que podem ser selecionados. */\n @Input()\n public fileLimit?: number;\n\n /** @description Label ARIA para a barra de progresso do upload. */\n @Input()\n public ariaLabelProgress?: string;\n\n /** @description Label ARIA para o ícone de sucesso. */\n @Input()\n public ariaLabelSuccess?: string;\n\n /** @description Label ARIA para mensagens de erro de validação. */\n @Input()\n public ariaLabelError?: string;\n\n /** @description Label ARIA para o botão de remoção de arquivo. */\n @Input()\n public ariaLabelRemove?: string;\n\n /** @description FormControl externo vinculado ao componente para controle de estado. */\n @Input()\n public formControl?: FormControl;\n\n /** @description Desabilita todas as interações do componente. @default false */\n @Input()\n public disabled = false;\n\n /** @description Exibe a data de upload de cada arquivo. @default false */\n @Input()\n public showFileUploadDate: boolean = false;\n\n /** @description Lista de permissões habilitadas no componente: `'add'`, `'read'`, `'remove'`. @default ALL_PERMISSIONS */\n @Input()\n public permissions: FilePickerPermissions[] = ALL_PERMISSIONS;\n\n /**\n * @description Lista de arquivos já enviados a serem exibidos no componente.\n * Ao atribuir, os arquivos são processados e suas URLs são geradas para preview.\n */\n @Input()\n public set files(files: FileDto[]) {\n if (!files || files?.length === 0) {\n this._files = [];\n return;\n }\n if (this.showFileUploadDate && files[0]?.objectId) {\n this.getUploadDate(files);\n }\n this._files = files.map((file) => {\n file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(file));\n return file;\n });\n }\n\n /** @description Emitido quando o usuário seleciona arquivos válidos para upload. */\n @Output()\n public uploadHandler: EventEmitter<{ files: FileDto[] }> = new EventEmitter();\n\n /** @description Emitido quando o usuário remove um arquivo da lista. */\n @Output()\n public removeFile: EventEmitter<{ file: File }> = new EventEmitter();\n\n /** @description Emitido quando o usuário cancela um upload em andamento. Emite o índice do arquivo cancelado. */\n @Output()\n public cancelUpload: EventEmitter<number> = new EventEmitter();\n\n /** @description Emitido quando o usuário clica para baixar um arquivo. */\n @Output()\n public downloadFile: EventEmitter<{ index: number; anchor: ElementRef }> = new EventEmitter();\n\n /** @description Emitido quando um arquivo não passa na validação de tipo, tamanho ou limite. */\n @Output()\n public validateErrors: EventEmitter<UploadError> = new EventEmitter();\n\n private _files: FileDto[] = [];\n private readonly ngUsubscribe: Subject<void> = new Subject();\n public isSmallDevice = false;\n public inputValue = '';\n public modifiedDate?: string;\n\n constructor(\n private readonly sanitizer: DomSanitizer,\n private readonly filePickerService: FilePickerService,\n private readonly translate: TranslateService,\n ) {}\n\n public ngOnInit(): void {\n this.supportedExtensions = this.supportedExtensions.map((extension) =>\n extension.replace('.', '').toLowerCase(),\n );\n }\n\n public ngOnDestroy() {\n this.ngUsubscribe.next();\n this.ngUsubscribe.complete();\n }\n\n public ngAfterContentInit() {\n this.update();\n }\n\n @HostListener('window:resize')\n public onResize() {\n this.update();\n }\n\n public _onInputFileSelect($event: Event): void {\n const eventTargetFiles = ($event.target as HTMLInputElement)?.files as FileList;\n const dataTransferFiles = ($event as DragEvent).dataTransfer?.files as FileList;\n const files: FileDto[] = Array.from(dataTransferFiles ? dataTransferFiles : eventTargetFiles);\n this.onFileSelect(files);\n }\n\n public onFileSelect(files: FileDto[]): void {\n const newFiles: FileDto[] = [];\n\n if (!this.multiple) {\n this.files = [];\n }\n\n if (this.isFileLimitExceeded(files)) {\n this.validateErrors.emit({\n files,\n validation: 'maxFileLimit',\n });\n this.clearFileInput();\n return;\n }\n\n if (this.isFileCombinedSizeExceeded(files)) {\n this.validateErrors.emit({\n files: files,\n validation: 'maxCombinedFileSize',\n });\n this.clearFileInput();\n return;\n }\n\n for (const file of files) {\n if (this.isUnsupportedFileExtension(file)) {\n this.validateErrors.emit({\n files: [file],\n validation: 'unsupportedExtension',\n });\n continue;\n }\n\n if (this.isFileSizeExceeded(file)) {\n this.validateErrors.emit({\n files: [file],\n validation: 'maxFileSize',\n });\n continue;\n }\n\n newFiles.push(file);\n }\n\n if (newFiles.length) {\n this.files = this.files.concat(newFiles);\n this.uploadHandler.emit({\n files: newFiles,\n });\n }\n\n this.clearFileInput();\n }\n\n public onRemoveFile(file: FileDto): void {\n const fileIndex = this.files.indexOf(file);\n const removedFiles = this.files.splice(fileIndex, 1);\n\n if (removedFiles.length) {\n this.removeFile.emit({ file });\n }\n }\n\n public onCancelUpload(index: number) {\n const removedFiles = this.files.splice(index, 1);\n\n if (removedFiles.length) {\n this.cancelUpload.emit(index);\n }\n\n this.clearFileInput();\n }\n\n public onDowloadFile(index: number) {\n if (isNullOrUndefined(this.anchor)) return;\n\n this.downloadFile.emit({\n index,\n anchor: this.anchor,\n });\n }\n\n public get files(): FileDto[] {\n return this._files;\n }\n\n public formatFileSize(size: number): string {\n if (size === 0) {\n return '0 Bytes';\n }\n const k = 1024;\n const sizes = ['bytes', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(size) / Math.log(k));\n return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n\n private update() {\n const windowWidth = window.innerWidth;\n this.isSmallDevice = windowWidth <= Breakpoints.SM_MAX;\n }\n\n private isFileLimitExceeded(files: FileDto[]) {\n if (!this.fileLimit) {\n return false;\n }\n return this.files.length + files.length > this.fileLimit;\n }\n\n private isFileCombinedSizeExceeded(files: File[]): boolean {\n if (!this.maxCombinedFileSize) {\n return false;\n }\n\n const filesList = [...files, ...this.files];\n\n const combinedSize = filesList.reduce((combinedSize, file) => combinedSize + file.size, 0);\n\n return combinedSize > this.maxCombinedFileSize;\n }\n\n private isFileSizeExceeded(file: File): boolean {\n if (!this.maxFileSize) {\n return false;\n }\n return file.size > this.maxFileSize;\n }\n\n private isUnsupportedFileExtension(file: File) {\n if (this.supportedExtensions?.length) {\n const extension = file.name.split('.').pop()?.toLowerCase() ?? '';\n\n return !this.supportedExtensions.includes(extension);\n }\n return false;\n }\n\n private clearFileInput() {\n if (isNullOrUndefined(this.inputUpload?.nativeElement)) return;\n\n this.inputUpload.nativeElement.value = null;\n }\n\n private getUploadDate(blobFile: FileDto[]): void {\n if (!blobFile) {\n return;\n }\n\n this.filePickerService\n .getMetadataCustomField({ objectId: blobFile[0].objectId ?? '' })\n .then((metadata) => this.setModifiedDate(metadata));\n }\n\n private setModifiedDate(metadata: ListBlobMetadataResponse): void {\n const hour = moment(metadata.modified).format('HH');\n const minutes = moment(metadata.modified).format('mm');\n const day = moment(metadata.modified).format('DD');\n const month = moment(metadata.modified).format('MM');\n const fullYear = moment(metadata.modified).format('YYYY');\n\n this.modifiedDate = this.translate.instant('platform.angular_components.date_modified_custom_blob', {\n hour,\n minutes,\n day,\n month,\n fullYear,\n });\n }\n}\n\n","<div\n [id]=\"id\"\n class=\"file-picker\"\n>\n <div class=\"file-picker-choose\">\n <input\n #inputUpload\n [id]=\"id + 'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"_onInputFileSelect($event)\"\n />\n @if (permissions.includes(ADD_PERMISSION)) {\n <s-button\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (clicked)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formControl?.disabled || fileLimit === files.length\"\n [auxiliary]=\"false\"\n >\n </s-button>\n }\n </div>\n\n @if (files.length) {\n <section\n [id]=\"id + 'fileupload-list'\"\n class=\"file-picker-list\"\n role=\"grid\"\n >\n @for (file of files; track file; let i = $index) {\n <div\n class=\"file-picker-list-file\"\n role=\"row\"\n >\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"flex flex-grow items-center justify-between overflow-hidden text-ellipsis text-nowrap\"\n role=\"gridcell\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n (permissions.includes(READ_PERMISSION) && file.savedFile) || file.progress === 100\n ? descriptionUrl\n : description;\n context: {\n $implicit: file,\n index: i,\n }\n \"\n >\n </ng-container>\n\n <span>{{ formatFileSize(file.size) }}</span>\n\n @if (modifiedDate) {\n <span class=\"file-picker-list-file-name-date\">{{ modifiedDate }}</span>\n }\n </div>\n <div\n class=\"file-picker-list-file-status\"\n role=\"gridcell\"\n >\n @if (file.isUploading && !isSmallDevice) {\n <div class=\"w-64\">\n <s-progressbar\n [value]=\"file.progress ?? 0\"\n [showValue]=\"false\"\n activeColor=\"blue\"\n ></s-progressbar>\n </div>\n }\n\n @if (file.isUploading && isSmallDevice) {\n <span\n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"\n ariaLabelProgress || 'platform.angular_components.loading_file' | translate\n \"\n >\n </span>\n }\n\n @if (!file.isUploading && !file.error && file.progress === 100) {\n <span\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"\n ariaLabelSuccess ||\n successTooltip ||\n 'platform.angular_components.file_attached_successfully' | translate\n \"\n [pTooltip]=\"\n successTooltip || 'platform.angular_components.file_attached_successfully'\n | translate\n \"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\"\n >\n </span>\n }\n\n @if (file.error?.message) {\n <span\n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\"\n >\n </span>\n }\n </div>\n <div\n class=\"file-picker-list-file-actions\"\n role=\"gridcell\"\n >\n @if (file.isUploading) {\n <a\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"file-picker-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\"\n >\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n }\n\n @if (\n permissions.includes(REMOVE_PERMISSION) &&\n !file.isUploading &&\n !(disabled || !!formControl?.disabled)\n ) {\n <a\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"file-picker-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"\n ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\n \"\n >\n {{ removeLabel || 'platform.angular_components.remove' | translate }}\n </a>\n }\n </div>\n </div>\n }\n </section>\n }\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i=\"index\"\n>\n <div class=\"flex justify-between\">\n <div>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n class=\"break-words\"\n >{{ file.name }}\n </a>\n <a\n style=\"display: none\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor\n >\n </a>\n </div>\n </div>\n</ng-template>\n\n<ng-template\n #description\n let-file\n>\n <div class=\"flex justify-between\">\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n >\n {{ file.name }}\n </span>\n </div>\n</ng-template>\n\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { LocaleModule } from '@seniorsistemas/angular-components/locale';\nimport { ProgressBarModule } from '@seniorsistemas/angular-components/progressbar';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { FilePickerComponent } from './file-picker.component';\nimport { FilePickerService } from './file-picker.service';\n\n@NgModule({\n declarations: [FilePickerComponent],\n imports: [CommonModule, ButtonModule, TooltipModule, ProgressBarModule, TranslateModule, LocaleModule],\n providers: [FilePickerService],\n exports: [FilePickerComponent],\n})\nexport class FilePickerModule {}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names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I5F,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,CAAC;oBACtG,SAAS,EAAE,CAAC,iBAAiB,CAAC;oBAC9B,OAAO,EAAE,CAAC,mBAAmB,CAAC;AACjC,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -1582,22 +1582,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1582
1582
|
type: Input
|
|
1583
1583
|
}] } });
|
|
1584
1584
|
|
|
1585
|
+
/**
|
|
1586
|
+
* @description Componente de diagrama de Gantt para visualização e manipulação de tarefas
|
|
1587
|
+
* em linha do tempo. Suporta diferentes modos de visualização (dia, semana, mês),
|
|
1588
|
+
* movimentação de tarefas via drag e popup de detalhes ao clicar.
|
|
1589
|
+
*
|
|
1590
|
+
* @example
|
|
1591
|
+
* ```html
|
|
1592
|
+
* <s-gantt
|
|
1593
|
+
* [tasks]="gruposDeTarefas"
|
|
1594
|
+
* [viewMode]="viewMode"
|
|
1595
|
+
* (taskClicked)="onTaskClicada($event)" />
|
|
1596
|
+
* ```
|
|
1597
|
+
*
|
|
1598
|
+
* @category Data
|
|
1599
|
+
*/
|
|
1585
1600
|
class GanttComponent {
|
|
1601
|
+
/** @description Título da coluna lateral de identificação das tarefas. */
|
|
1586
1602
|
columnTitle;
|
|
1603
|
+
/** @description Permite renderizar múltiplas tarefas na mesma linha. @default false */
|
|
1587
1604
|
multipleTaskPerLine = false;
|
|
1605
|
+
/** @description Exibe a tabela lateral com os nomes das tarefas. @default true */
|
|
1588
1606
|
showSideTable = true;
|
|
1607
|
+
/** @description Modo de visualização do gantt (dia, semana, mês, etc.). @default ViewMode.Day */
|
|
1589
1608
|
viewMode = ViewMode.Day;
|
|
1609
|
+
/** @description Lista de grupos de tarefas a serem renderizados. Campo obrigatório. */
|
|
1590
1610
|
tasks;
|
|
1611
|
+
/** @description Margem em dias antes do início da primeira tarefa. */
|
|
1591
1612
|
marginBeforeStart;
|
|
1613
|
+
/** @description Margem em dias após o fim da última tarefa. */
|
|
1592
1614
|
marginAfterEnd;
|
|
1615
|
+
/** @description Habilita o arrastar de tarefas para alterar datas. @default true */
|
|
1593
1616
|
allowMovement = true;
|
|
1617
|
+
/** @description Exibe popup com detalhes ao clicar em uma tarefa. @default true */
|
|
1594
1618
|
hasPopup = true;
|
|
1619
|
+
/** @description Largura do container em pixels. Se omitido, usa a largura natural. */
|
|
1595
1620
|
containerWidth;
|
|
1621
|
+
/** @description Faz o gantt ocupar 100% da largura disponível. @default false */
|
|
1596
1622
|
fullWidth = false;
|
|
1623
|
+
/** @description Exibe apenas horas na linha do tempo (ignora dias). @default false */
|
|
1597
1624
|
showOnlyHours = false;
|
|
1625
|
+
/** @description Exibe apenas dias na linha do tempo (ignora horas). @default false */
|
|
1598
1626
|
showOnlyDays = false;
|
|
1627
|
+
/** @description Emitido quando o usuário clica em uma tarefa. */
|
|
1599
1628
|
taskClicked = new EventEmitter();
|
|
1629
|
+
/** @description Emitido quando o usuário arrasta e modifica as datas de uma tarefa. */
|
|
1600
1630
|
taskDateChanged = new EventEmitter();
|
|
1631
|
+
/** @description Emitido quando o modo de visualização é alterado. */
|
|
1601
1632
|
viewChanged = new EventEmitter();
|
|
1602
1633
|
outer = null;
|
|
1603
1634
|
side = null;
|