@seniorsistemas/angular-components 19.3.0 → 19.3.2
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/breadcrumb/lib/dynamic-breadcrumb/dynamic-breadcrumb.component.d.ts +1 -2
- package/calendar-mask/lib/calendar-mask/calendar-mask.directive.d.ts +0 -1
- package/chips/lib/chips/chips/chips.component.d.ts +1 -2
- package/code-editor/lib/code-editor/code-editor.component.d.ts +0 -2
- package/code-editor/lib/code-editor/infra/utils/custom-translations/custom-translations.module.d.ts +1 -3
- package/common/lib/svg-factory/svg-factory.directive.d.ts +1 -2
- package/content-generator/lib/content-generator/content-generator.component.d.ts +1 -6
- package/content-generator/lib/services/IAssist/iassist.service.d.ts +0 -3
- package/country-phone-picker/lib/country-phone-picker/country-phone-picker.component.d.ts +0 -3
- package/country-phone-picker/lib/country-phone-picker/country-phone-picker.service.d.ts +0 -2
- package/currency/lib/currency.service.d.ts +0 -2
- package/custom-fields/lib/custom-fields/custom-fields.component.d.ts +3 -7
- package/custom-fields/lib/custom-fields/custom-fields.service.d.ts +0 -2
- package/dynamic-form/dynamic-form/components/lookup/lookup.component.d.ts +0 -2
- package/dynamic-form/dynamic-form/form-field/fields/autocomplete/autocomplete-field.component.d.ts +1 -2
- package/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.d.ts +1 -3
- package/dynamic-form/dynamic-form/form-field/fields/calendar/calendar-field.component.d.ts +1 -2
- package/dynamic-form/dynamic-form/form-field/fields/chips/chips-field.component.d.ts +1 -3
- package/dynamic-form/dynamic-form/form-field/fields/country-phone-picker/country-phone-picker-field.component.d.ts +1 -2
- package/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.d.ts +1 -3
- package/dynamic-form/dynamic-form/form-field/fields/file-picker/file-picker-field.component.d.ts +1 -2
- package/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.d.ts +1 -3
- package/dynamic-form/dynamic-form/form-field/fields/password/password-field.component.d.ts +1 -2
- package/dynamic-form/dynamic-form/form-field/fields/text/text-field.component.d.ts +1 -2
- package/dynamic-form/dynamic-form/form-field/fields/text-area/text-area-field.component.d.ts +1 -2
- package/empty-state/lib/empty-state/go-back/go-back.component.d.ts +0 -2
- package/esm2022/badge/lib/badge/badge.component.mjs +3 -3
- package/esm2022/breadcrumb/lib/dynamic-breadcrumb/dynamic-breadcrumb.component.mjs +10 -13
- package/esm2022/calendar-mask/lib/calendar-mask/calendar-mask.directive.mjs +7 -11
- package/esm2022/chips/lib/chips/chips/chips.component.mjs +5 -8
- package/esm2022/code-editor/lib/code-editor/code-editor.component.mjs +6 -9
- package/esm2022/code-editor/lib/code-editor/infra/utils/custom-translations/custom-translations.module.mjs +8 -13
- package/esm2022/common/lib/svg-factory/svg-factory.directive.mjs +6 -10
- package/esm2022/content-generator/lib/content-generator/content-generator.component.mjs +24 -30
- package/esm2022/content-generator/lib/services/IAssist/iassist.service.mjs +9 -12
- package/esm2022/country-phone-picker/lib/country-phone-picker/country-phone-picker.component.mjs +15 -23
- package/esm2022/country-phone-picker/lib/country-phone-picker/country-phone-picker.service.mjs +6 -9
- package/esm2022/currency/lib/currency.service.mjs +6 -9
- package/esm2022/custom-fields/lib/custom-fields/custom-fields.component.mjs +17 -25
- package/esm2022/custom-fields/lib/custom-fields/custom-fields.service.mjs +6 -9
- package/esm2022/dynamic-form/dynamic-form/components/lookup/lookup.component.mjs +22 -28
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/autocomplete/autocomplete-field.component.mjs +6 -10
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.mjs +12 -17
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/calendar/calendar-field.component.mjs +5 -8
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/chips/chips-field.component.mjs +12 -17
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/country-phone-picker/country-phone-picker-field.component.mjs +5 -8
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.mjs +13 -19
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/file-picker/file-picker-field.component.mjs +6 -10
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.mjs +14 -19
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/password/password-field.component.mjs +5 -8
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/text/text-field.component.mjs +5 -8
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/text-area/text-area-field.component.mjs +5 -8
- package/esm2022/empty-state/lib/empty-state/go-back/go-back.component.mjs +8 -11
- package/esm2022/file-picker/lib/file-picker/file-picker.component.mjs +17 -21
- package/esm2022/gantt/lib/gantt/components/gantt/gantt.mjs +6 -2
- package/esm2022/gantt/lib/gantt/gantt.component.mjs +8 -4
- package/esm2022/global-search/lib/global-search/global-search.component.mjs +5 -8
- package/esm2022/image-cropper/lib/image-cropper/image-cropper.service.mjs +7 -12
- package/esm2022/infinite-scroll/lib/infinite-scroll/infinite-scroll.directive.mjs +5 -8
- package/esm2022/info-sign/lib/info-sign/info-sign.directive.mjs +6 -10
- package/esm2022/inline-edit/lib/inline-edit/components/fields/inline-edit-calendar/inline-edit-calendar.component.mjs +9 -12
- package/esm2022/inline-edit/lib/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.mjs +14 -17
- package/esm2022/inline-edit/lib/inline-edit/components/inline-edit-item/inline-edit-item.component.mjs +12 -15
- package/esm2022/insights/lib/insights/components/insights-card/insights-card.component.mjs +15 -19
- package/esm2022/interactive-content/lib/interactive-content/interactive-content.directive.mjs +5 -8
- package/esm2022/kanban/lib/kanban/components/kanban-column/kanban-column.component.mjs +10 -13
- package/esm2022/kanban/lib/kanban/components/kanban-item/kanban-item.component.mjs +10 -13
- package/esm2022/kanban/lib/kanban/kanban.component.mjs +23 -17
- package/esm2022/loading-state/lib/loading-state/loading-state.directive.mjs +10 -16
- package/esm2022/locale/lib/locale/locale.service.mjs +8 -12
- package/esm2022/locale/lib/locale/pipes/localized-bignumber.pipe.mjs +6 -9
- package/esm2022/locale/lib/locale/pipes/localized-currency.pipe.mjs +6 -9
- package/esm2022/locale/lib/locale/pipes/localized-date.pipe.mjs +6 -9
- package/esm2022/locale/lib/locale/pipes/localized-number.pipe.mjs +6 -9
- package/esm2022/locale/lib/locale/pipes/localized-time.pipe.mjs +6 -9
- package/esm2022/localized-number-input/lib/localized-number-input/localized-number-input.directive.mjs +6 -9
- package/esm2022/navigation-button/lib/navigation-button/navigation-button.component.mjs +5 -8
- package/esm2022/numeric/lib/numeric.pipe.mjs +8 -12
- package/esm2022/numeric/lib/numeric.service.mjs +6 -9
- package/esm2022/password-strength/lib/password-strength/password-strength.component.mjs +8 -11
- package/esm2022/password-strength/lib/password-strength/password-strength.directive.mjs +10 -16
- package/esm2022/picklist/lib/picklist/picklist.component.mjs +5 -8
- package/esm2022/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.component.mjs +15 -19
- package/esm2022/progressbar/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.mjs +8 -11
- package/esm2022/progressbar/lib/progressbar/progressbar.module.mjs +5 -4
- package/esm2022/select-button/lib/select-button/select-button.component.mjs +3 -3
- package/esm2022/shared/lib/accessibility/paginator-accessibility.directive.mjs +8 -13
- package/esm2022/shared/lib/accessibility/table-checkbox-accessibility.directive.mjs +5 -8
- package/esm2022/slide-in-bar/lib/slide-in-bar/slide-in-bar.component.mjs +9 -12
- package/esm2022/speech-recognition/lib/speech-recognition/speech-recognition/speech-recognition.component.mjs +12 -16
- package/esm2022/speech-recognition/lib/speech-recognition/speech-recognition.service.mjs +12 -16
- package/esm2022/speech-recognition/lib/speech-recognition/text-to-speech.service.mjs +8 -10
- package/esm2022/split-button/lib/split-button/split-button.component.mjs +5 -8
- package/esm2022/table/lib/table/row-toggler/row-toggler.directive.mjs +7 -7
- package/esm2022/table/lib/table/table-column/table-columns.component.mjs +20 -29
- package/esm2022/table/lib/table/table-paging/table-paging.component.mjs +9 -16
- package/esm2022/table-header/lib/table-header/table-header-checkbox.component.mjs +11 -13
- package/esm2022/text-area/lib/text-area/text-area.component.mjs +5 -8
- package/esm2022/thumbnail/lib/thumbnail/thumbnail.component.mjs +8 -11
- package/esm2022/tiered-menu/lib/tiered-menu/components/tiered-menu/tiered-menu.component.mjs +16 -24
- package/esm2022/tiered-menu/lib/tiered-menu/components/tiered-menu-item/tiered-menu-item.component.mjs +8 -11
- package/esm2022/tiered-menu/lib/tiered-menu/components/tiered-menu-nested/tiered-menu-nested.component.mjs +12 -16
- package/esm2022/tiered-menu/lib/tiered-menu/tiered-menu.directive.mjs +13 -25
- package/esm2022/toast/lib/toast/toast.service.mjs +7 -12
- package/esm2022/tree/lib/tree/components/tree-node-item/tree-node-item.component.mjs +10 -14
- package/esm2022/workspace-switch/lib/workspace-switch/workspace-switch.component.mjs +6 -10
- package/fesm2022/seniorsistemas-angular-components-badge.mjs +2 -2
- package/fesm2022/seniorsistemas-angular-components-badge.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs +10 -12
- package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs +6 -10
- package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-chips.mjs +4 -7
- package/fesm2022/seniorsistemas-angular-components-chips.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-code-editor.mjs +10 -18
- package/fesm2022/seniorsistemas-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-common.mjs +5 -9
- package/fesm2022/seniorsistemas-angular-components-common.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-content-generator.mjs +29 -40
- package/fesm2022/seniorsistemas-angular-components-content-generator.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs +16 -28
- package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-currency.mjs +5 -8
- package/fesm2022/seniorsistemas-angular-components-currency.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs +45 -59
- package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +108 -157
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-empty-state.mjs +4 -8
- package/fesm2022/seniorsistemas-angular-components-empty-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-file-picker.mjs +17 -22
- package/fesm2022/seniorsistemas-angular-components-file-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-gantt.mjs +12 -4
- package/fesm2022/seniorsistemas-angular-components-gantt.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-global-search.mjs +4 -7
- package/fesm2022/seniorsistemas-angular-components-global-search.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs +6 -11
- package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs +4 -7
- package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-info-sign.mjs +5 -9
- package/fesm2022/seniorsistemas-angular-components-info-sign.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs +29 -38
- package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-insights.mjs +17 -22
- package/fesm2022/seniorsistemas-angular-components-insights.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs +4 -7
- package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-kanban.mjs +30 -30
- package/fesm2022/seniorsistemas-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-loading-state.mjs +7 -15
- package/fesm2022/seniorsistemas-angular-components-loading-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-locale.mjs +22 -41
- package/fesm2022/seniorsistemas-angular-components-locale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs +5 -8
- package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs +4 -7
- package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-numeric.mjs +9 -16
- package/fesm2022/seniorsistemas-angular-components-numeric.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-password-strength.mjs +13 -24
- package/fesm2022/seniorsistemas-angular-components-password-strength.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-picklist.mjs +4 -7
- package/fesm2022/seniorsistemas-angular-components-picklist.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs +14 -21
- package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-progressbar.mjs +11 -14
- package/fesm2022/seniorsistemas-angular-components-progressbar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-select-button.mjs +2 -2
- package/fesm2022/seniorsistemas-angular-components-select-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-shared.mjs +10 -18
- package/fesm2022/seniorsistemas-angular-components-shared.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs +7 -10
- package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs +23 -34
- package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-split-button.mjs +4 -7
- package/fesm2022/seniorsistemas-angular-components-split-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-table-header.mjs +10 -12
- package/fesm2022/seniorsistemas-angular-components-table-header.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-table.mjs +30 -47
- package/fesm2022/seniorsistemas-angular-components-table.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-text-area.mjs +4 -7
- package/fesm2022/seniorsistemas-angular-components-text-area.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs +6 -9
- package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs +30 -55
- package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-toast.mjs +6 -11
- package/fesm2022/seniorsistemas-angular-components-toast.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tree.mjs +9 -14
- package/fesm2022/seniorsistemas-angular-components-tree.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs +5 -9
- package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs.map +1 -1
- package/file-picker/lib/file-picker/file-picker.component.d.ts +0 -4
- package/file-upload/README.md +9 -37
- package/gantt/lib/gantt/gantt.component.d.ts +1 -0
- package/global-search/lib/global-search/global-search.component.d.ts +1 -2
- package/ia-insight/README.md +17 -0
- package/image-cropper/lib/image-cropper/image-cropper.service.d.ts +1 -2
- package/infinite-scroll/lib/infinite-scroll/infinite-scroll.directive.d.ts +1 -2
- package/info-sign/lib/info-sign/info-sign.directive.d.ts +1 -2
- package/inline-edit/lib/inline-edit/components/fields/inline-edit-calendar/inline-edit-calendar.component.d.ts +1 -2
- package/inline-edit/lib/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.d.ts +0 -2
- package/inline-edit/lib/inline-edit/components/inline-edit-item/inline-edit-item.component.d.ts +0 -2
- package/insights/lib/insights/components/insights-card/insights-card.component.d.ts +0 -4
- package/interactive-content/lib/interactive-content/interactive-content.directive.d.ts +1 -2
- package/kanban/lib/kanban/components/kanban-column/kanban-column.component.d.ts +0 -2
- package/kanban/lib/kanban/components/kanban-item/kanban-item.component.d.ts +0 -2
- package/kanban/lib/kanban/kanban.component.d.ts +2 -2
- package/loading-state/lib/loading-state/loading-state.directive.d.ts +1 -2
- package/locale/lib/locale/locale.service.d.ts +0 -3
- package/locale/lib/locale/pipes/localized-bignumber.pipe.d.ts +0 -2
- package/locale/lib/locale/pipes/localized-currency.pipe.d.ts +0 -2
- package/locale/lib/locale/pipes/localized-date.pipe.d.ts +0 -2
- package/locale/lib/locale/pipes/localized-number.pipe.d.ts +0 -2
- package/locale/lib/locale/pipes/localized-time.pipe.d.ts +0 -2
- package/localized-number-input/lib/localized-number-input/localized-number-input.directive.d.ts +0 -2
- package/navigation-button/lib/navigation-button/navigation-button.component.d.ts +1 -2
- package/numeric/lib/numeric.pipe.d.ts +0 -3
- package/numeric/lib/numeric.service.d.ts +0 -2
- package/package.json +12 -12
- package/password-strength/lib/password-strength/password-strength.component.d.ts +0 -2
- package/password-strength/lib/password-strength/password-strength.directive.d.ts +1 -2
- package/picklist/lib/picklist/picklist.component.d.ts +1 -2
- package/product-header/README.md +17 -0
- package/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.component.d.ts +0 -4
- package/progressbar/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.d.ts +0 -2
- package/progressbar/lib/progressbar/progressbar.module.d.ts +2 -1
- package/shared/lib/accessibility/paginator-accessibility.directive.d.ts +1 -3
- package/shared/lib/accessibility/table-checkbox-accessibility.directive.d.ts +1 -2
- package/slide-in-bar/lib/slide-in-bar/slide-in-bar.component.d.ts +0 -2
- package/speech-recognition/lib/speech-recognition/speech-recognition/speech-recognition.component.d.ts +0 -4
- package/speech-recognition/lib/speech-recognition/speech-recognition.service.d.ts +1 -5
- package/speech-recognition/lib/speech-recognition/text-to-speech.service.d.ts +1 -3
- package/split-button/lib/split-button/split-button.component.d.ts +1 -2
- package/table/lib/table/row-toggler/row-toggler.directive.d.ts +1 -1
- package/table/lib/table/table-column/table-columns.component.d.ts +2 -6
- package/table/lib/table/table-paging/table-paging.component.d.ts +0 -3
- package/table-header/lib/table-header/table-header-checkbox.component.d.ts +1 -1
- package/text-area/lib/text-area/text-area.component.d.ts +1 -2
- package/text-area-ia/README.md +17 -0
- package/thumbnail/lib/thumbnail/thumbnail.component.d.ts +0 -2
- package/tiered-menu/lib/tiered-menu/components/tiered-menu/tiered-menu.component.d.ts +1 -3
- package/tiered-menu/lib/tiered-menu/components/tiered-menu-item/tiered-menu-item.component.d.ts +0 -2
- package/tiered-menu/lib/tiered-menu/components/tiered-menu-nested/tiered-menu-nested.component.d.ts +0 -2
- package/tiered-menu/lib/tiered-menu/tiered-menu.directive.d.ts +1 -5
- package/toast/lib/toast/toast.service.d.ts +0 -2
- package/tree/lib/tree/components/tree-node-item/tree-node-item.component.d.ts +1 -3
- package/workspace-switch/lib/workspace-switch/workspace-switch.component.d.ts +1 -2
- package/confirm-dialog/README.md +0 -226
- package/numeric-mask/README.md +0 -395
- package/pin-code-field/README.md +0 -366
- package/spotlight/README.md +0 -311
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, inject, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import * as i1$1 from 'ngx-cookie-service';
|
|
5
4
|
import { CookieService } from 'ngx-cookie-service';
|
|
6
5
|
import * as i1 from '@seniorsistemas/angular-components/button';
|
|
7
6
|
import { ButtonModule } from '@seniorsistemas/angular-components/button';
|
|
@@ -114,25 +113,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
114
113
|
}] } });
|
|
115
114
|
|
|
116
115
|
class EmptyStateGoBackComponent {
|
|
117
|
-
_cookieService;
|
|
116
|
+
_cookieService = inject(CookieService);
|
|
118
117
|
iconClass = 'fa fa-exclamation-triangle';
|
|
119
118
|
title;
|
|
120
119
|
description;
|
|
121
120
|
primaryActionLabel;
|
|
122
|
-
constructor(_cookieService) {
|
|
123
|
-
this._cookieService = _cookieService;
|
|
124
|
-
}
|
|
125
121
|
goBack() {
|
|
126
122
|
const portalUrl = this._cookieService.get('com.senior.portal.url');
|
|
127
123
|
window.open(portalUrl, '_top');
|
|
128
124
|
}
|
|
129
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EmptyStateGoBackComponent, deps: [
|
|
125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EmptyStateGoBackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
130
126
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EmptyStateGoBackComponent, selector: "s-empty-state-go-back", inputs: { iconClass: "iconClass", title: "title", description: "description", primaryActionLabel: "primaryActionLabel" }, ngImport: i0, template: "<s-empty-state \n [iconClass]=\"iconClass\" \n [title]=\"title\" \n [description]=\"description\" \n (primaryAction)=\"goBack()\"\n [primaryActionLabel]=\"primaryActionLabel\">\n</s-empty-state>", dependencies: [{ kind: "component", type: EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }] });
|
|
131
127
|
}
|
|
132
128
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EmptyStateGoBackComponent, decorators: [{
|
|
133
129
|
type: Component,
|
|
134
130
|
args: [{ selector: 's-empty-state-go-back', template: "<s-empty-state \n [iconClass]=\"iconClass\" \n [title]=\"title\" \n [description]=\"description\" \n (primaryAction)=\"goBack()\"\n [primaryActionLabel]=\"primaryActionLabel\">\n</s-empty-state>" }]
|
|
135
|
-
}],
|
|
131
|
+
}], propDecorators: { iconClass: [{
|
|
136
132
|
type: Input
|
|
137
133
|
}], title: [{
|
|
138
134
|
type: Input,
|
|
@@ -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/**\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;;;;;;;;;;;;;;;;AAgBG;MAMU,mBAAmB,CAAA;AACrB,IAAA,OAAgB,UAAU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,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;;;;"}
|
|
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, inject } 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 private readonly _cookieService = inject(CookieService);\n\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 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.EmptyStateComponent"],"mappings":";;;;;;;AAGA;;;;;;;;;;;;;;;;AAgBG;MAMU,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;AAED;;AAEG;AAEI,IAAA,EAAE,GAAG,CAAiB,cAAA,EAAA,mBAAmB,CAAC,SAAS,EAAE,EAAE,CAAC;AAE/D;;AAEG;AAEI,IAAA,KAAK,CAAU;AAEtB;;;;;AAKG;IAEI,SAAS,GAAG,aAAa,CAAC;AAEjC;;;AAGG;AAEI,IAAA,WAAW,CAAU;AAE5B;;;;AAIG;IAEI,iBAAiB,GAAG,IAAI,CAAC;AAEhC;;;;AAIG;IAEI,mBAAmB,GAAG,IAAI,CAAC;AAElC;;;AAGG;AAEI,IAAA,kBAAkB,CAAU;;AAI5B,IAAA,oBAAoB,CAAU;AAErC;;;;AAIG;IAEI,YAAY,GAAyB,EAAE,CAAC;AAE/C;;AAEG;AAEI,IAAA,aAAa,GAAG,IAAI,YAAY,EAAQ,CAAC;AAEhD;;AAEG;AAEI,IAAA,eAAe,GAAG,IAAI,YAAY,EAAQ,CAAC;wGAjFzC,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,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AAkB,EAAA,CAAA;sBADxB,KAAK;;;MENG,gBAAgB,CAAA;wGAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAhB,gBAAgB,EAAA,YAAA,EAAA,CAHV,mBAAmB,EAAE,yBAAyB,CAAA,EAAA,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;;;;"}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Component, ViewChild, Input, Output, HostListener, NgModule } from '@angular/core';
|
|
3
|
-
import
|
|
2
|
+
import { Injectable, inject, EventEmitter, Component, ViewChild, Input, Output, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
+
import * as i6 from '@ngx-translate/core';
|
|
5
|
+
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
6
|
+
import * as i1 from '@seniorsistemas/angular-components/common/deprecated-selector';
|
|
4
7
|
import { DEPRECATED_CONFIG, DeprecatedSelectorDirective } from '@seniorsistemas/angular-components/common/deprecated-selector';
|
|
5
8
|
import { isNullOrUndefined, Breakpoints } from '@seniorsistemas/angular-components/utils';
|
|
6
9
|
import moment from 'moment';
|
|
7
10
|
import { Subject } from 'rxjs';
|
|
8
|
-
import * as i1 from '@angular/platform-browser';
|
|
9
11
|
import { CustomHttpClient } from '@seniorsistemas/angular-components/common';
|
|
10
|
-
import * as
|
|
11
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
12
|
-
import * as i5 from '@angular/common';
|
|
12
|
+
import * as i2 from '@angular/common';
|
|
13
13
|
import { CommonModule } from '@angular/common';
|
|
14
|
-
import * as
|
|
14
|
+
import * as i3 from '@seniorsistemas/angular-components/button';
|
|
15
15
|
import { ButtonModule } from '@seniorsistemas/angular-components/button';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i4 from 'primeng/tooltip';
|
|
17
17
|
import { TooltipModule } from 'primeng/tooltip';
|
|
18
|
-
import * as
|
|
18
|
+
import * as i5 from '@seniorsistemas/angular-components/progressbar';
|
|
19
19
|
import { ProgressBarModule } from '@seniorsistemas/angular-components/progressbar';
|
|
20
20
|
import { LocaleModule } from '@seniorsistemas/angular-components/locale';
|
|
21
21
|
|
|
22
|
-
const ALL_PERMISSIONS = ['add', 'read', 'remove'];
|
|
23
|
-
|
|
24
22
|
class FilePickerService {
|
|
25
23
|
BASE_URL_FIELD_CUSTOMIZATION = 'platform/field_customization';
|
|
26
24
|
TOKEN = new AbortController();
|
|
@@ -36,6 +34,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
36
34
|
type: Injectable
|
|
37
35
|
}] });
|
|
38
36
|
|
|
37
|
+
const ALL_PERMISSIONS = ['add', 'read', 'remove'];
|
|
38
|
+
|
|
39
39
|
/**
|
|
40
40
|
* @description Componente de upload de arquivos com suporte a seleção múltipla,
|
|
41
41
|
* validação de tipo/tamanho, controle de permissões (adicionar, ler, remover),
|
|
@@ -55,9 +55,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
55
55
|
* @category Inputs
|
|
56
56
|
*/
|
|
57
57
|
class FilePickerComponent {
|
|
58
|
-
sanitizer;
|
|
59
|
-
filePickerService;
|
|
60
|
-
translate;
|
|
58
|
+
sanitizer = inject(DomSanitizer);
|
|
59
|
+
filePickerService = inject(FilePickerService);
|
|
60
|
+
translate = inject(TranslateService);
|
|
61
61
|
static nextId = 0;
|
|
62
62
|
ADD_PERMISSION = 'add';
|
|
63
63
|
READ_PERMISSION = 'read';
|
|
@@ -136,11 +136,6 @@ class FilePickerComponent {
|
|
|
136
136
|
isSmallDevice = false;
|
|
137
137
|
inputValue = '';
|
|
138
138
|
modifiedDate;
|
|
139
|
-
constructor(sanitizer, filePickerService, translate) {
|
|
140
|
-
this.sanitizer = sanitizer;
|
|
141
|
-
this.filePickerService = filePickerService;
|
|
142
|
-
this.translate = translate;
|
|
143
|
-
}
|
|
144
139
|
ngOnInit() {
|
|
145
140
|
this.supportedExtensions = this.supportedExtensions.map((extension) => extension.replace('.', '').toLowerCase());
|
|
146
141
|
}
|
|
@@ -298,7 +293,7 @@ class FilePickerComponent {
|
|
|
298
293
|
fullYear,
|
|
299
294
|
});
|
|
300
295
|
}
|
|
301
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FilePickerComponent, deps: [
|
|
296
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FilePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
302
297
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: FilePickerComponent, selector: "s-file-picker, s-file-upload", inputs: { id: "id", chooseLabel: "chooseLabel", removeLabel: "removeLabel", cancelLabel: "cancelLabel", successTooltip: "successTooltip", multiple: "multiple", accept: "accept", supportedExtensions: "supportedExtensions", ariaLabelFileName: "ariaLabelFileName", maxFileSize: "maxFileSize", maxCombinedFileSize: "maxCombinedFileSize", fileLimit: "fileLimit", ariaLabelProgress: "ariaLabelProgress", ariaLabelSuccess: "ariaLabelSuccess", ariaLabelError: "ariaLabelError", ariaLabelRemove: "ariaLabelRemove", formControl: "formControl", disabled: "disabled", showFileUploadDate: "showFileUploadDate", permissions: "permissions", files: "files" }, outputs: { uploadHandler: "uploadHandler", removeFile: "removeFile", cancelUpload: "cancelUpload", downloadFile: "downloadFile", validateErrors: "validateErrors" }, host: { listeners: { "window:resize": "onResize()" } }, providers: [
|
|
303
298
|
{
|
|
304
299
|
provide: DEPRECATED_CONFIG,
|
|
@@ -308,7 +303,7 @@ class FilePickerComponent {
|
|
|
308
303
|
removalVersion: '20.0.0',
|
|
309
304
|
},
|
|
310
305
|
},
|
|
311
|
-
], viewQueries: [{ propertyName: "inputUpload", first: true, predicate: ["inputUpload"], descendants: true }, { propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }], hostDirectives: [{ directive: i4.DeprecatedSelectorDirective }], ngImport: i0, template: "<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", styles: [".file-picker .file-picker-choose{position:relative;margin:15px 0;width:max-content}.file-picker input[type=file]{display:none}.file-picker-list{border:1px solid #ccc}.file-picker-list-file:not(:first-child){border-top:1px solid #ccc}.file-picker-list .file-picker-list-file{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:15px}.file-picker-list .file-picker-list-file .file-picker-list-file-name{display:flex;flex-direction:column;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.file-picker-list .file-picker-list-file .file-picker-list-file-name .file-picker-list-file-name-date{font-size:.75rem;color:#999}.file-picker-list .file-picker-list-file .file-picker-list-file-name>a{cursor:pointer;text-decoration:none}.file-picker-list .file-picker-list-file .file-picker-list-file-status{align-self:center}.file-picker-list .file-picker-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.file-picker-list .file-picker-list-file .fas.fa-check{color:#0c9348;font-size:12px}.file-picker-list .file-picker-list-file .fas.fa-times{color:#c13018;font-size:12px}.file-picker-list .file-picker-list-file .file-picker-list-file-actions{margin-top:15px;align-self:center;width:100%}.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action{text-decoration:none;color:#428bca}.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action:hover,.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action :focus,.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action :visited{text-decoration:none}@media (min-width: 768px){.file-picker-list .file-picker-list-file{flex-wrap:nowrap}.file-picker-list .file-picker-list-file .file-picker-list-file-name{width:auto;flex-grow:2}.file-picker-list .file-picker-list-file .file-picker-list-file-status{margin:0 15px}.file-picker-list .file-picker-list-file .file-picker-list-file-actions{margin:0;width:auto}}\n"], dependencies: [{ kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "directive", type: i7.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i8.ProgressBarComponent, selector: "s-progressbar", inputs: ["value", "activeColor", "numberFormatOptions", "targetValue", "label", "targetLabel", "showValue", "mode"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
306
|
+
], viewQueries: [{ propertyName: "inputUpload", first: true, predicate: ["inputUpload"], descendants: true }, { propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }], hostDirectives: [{ directive: i1.DeprecatedSelectorDirective }], ngImport: i0, template: "<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", styles: [".file-picker .file-picker-choose{position:relative;margin:15px 0;width:max-content}.file-picker input[type=file]{display:none}.file-picker-list{border:1px solid #ccc}.file-picker-list-file:not(:first-child){border-top:1px solid #ccc}.file-picker-list .file-picker-list-file{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:15px}.file-picker-list .file-picker-list-file .file-picker-list-file-name{display:flex;flex-direction:column;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.file-picker-list .file-picker-list-file .file-picker-list-file-name .file-picker-list-file-name-date{font-size:.75rem;color:#999}.file-picker-list .file-picker-list-file .file-picker-list-file-name>a{cursor:pointer;text-decoration:none}.file-picker-list .file-picker-list-file .file-picker-list-file-status{align-self:center}.file-picker-list .file-picker-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.file-picker-list .file-picker-list-file .fas.fa-check{color:#0c9348;font-size:12px}.file-picker-list .file-picker-list-file .fas.fa-times{color:#c13018;font-size:12px}.file-picker-list .file-picker-list-file .file-picker-list-file-actions{margin-top:15px;align-self:center;width:100%}.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action{text-decoration:none;color:#428bca}.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action:hover,.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action :focus,.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action :visited{text-decoration:none}@media (min-width: 768px){.file-picker-list .file-picker-list-file{flex-wrap:nowrap}.file-picker-list .file-picker-list-file .file-picker-list-file-name{width:auto;flex-grow:2}.file-picker-list .file-picker-list-file .file-picker-list-file-status{margin:0 15px}.file-picker-list .file-picker-list-file .file-picker-list-file-actions{margin:0;width:auto}}\n"], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i5.ProgressBarComponent, selector: "s-progressbar", inputs: ["value", "activeColor", "numberFormatOptions", "targetValue", "label", "targetLabel", "showValue", "mode"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
312
307
|
}
|
|
313
308
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FilePickerComponent, decorators: [{
|
|
314
309
|
type: Component,
|
|
@@ -322,7 +317,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
322
317
|
},
|
|
323
318
|
},
|
|
324
319
|
], template: "<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", styles: [".file-picker .file-picker-choose{position:relative;margin:15px 0;width:max-content}.file-picker input[type=file]{display:none}.file-picker-list{border:1px solid #ccc}.file-picker-list-file:not(:first-child){border-top:1px solid #ccc}.file-picker-list .file-picker-list-file{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:15px}.file-picker-list .file-picker-list-file .file-picker-list-file-name{display:flex;flex-direction:column;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.file-picker-list .file-picker-list-file .file-picker-list-file-name .file-picker-list-file-name-date{font-size:.75rem;color:#999}.file-picker-list .file-picker-list-file .file-picker-list-file-name>a{cursor:pointer;text-decoration:none}.file-picker-list .file-picker-list-file .file-picker-list-file-status{align-self:center}.file-picker-list .file-picker-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.file-picker-list .file-picker-list-file .fas.fa-check{color:#0c9348;font-size:12px}.file-picker-list .file-picker-list-file .fas.fa-times{color:#c13018;font-size:12px}.file-picker-list .file-picker-list-file .file-picker-list-file-actions{margin-top:15px;align-self:center;width:100%}.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action{text-decoration:none;color:#428bca}.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action:hover,.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action :focus,.file-picker-list .file-picker-list-file .file-picker-list-file-actions a.file-picker-list-file-actions-action :visited{text-decoration:none}@media (min-width: 768px){.file-picker-list .file-picker-list-file{flex-wrap:nowrap}.file-picker-list .file-picker-list-file .file-picker-list-file-name{width:auto;flex-grow:2}.file-picker-list .file-picker-list-file .file-picker-list-file-status{margin:0 15px}.file-picker-list .file-picker-list-file .file-picker-list-file-actions{margin:0;width:auto}}\n"] }]
|
|
325
|
-
}],
|
|
320
|
+
}], propDecorators: { inputUpload: [{
|
|
326
321
|
type: ViewChild,
|
|
327
322
|
args: ['inputUpload', { static: false }]
|
|
328
323
|
}], anchor: [{
|
|
@@ -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/**\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":["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,CAAC,MAAM;AAC5B,SAAA,CAAC,CAAC;KACN;wGARQ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,UAAU;;;ACsBX;;;;;;;;;;;;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,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/file-picker.service.ts","../../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.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":["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","export type FilePickerPermissions = 'add' | 'read' | 'remove';\n\nexport const ALL_PERMISSIONS: FilePickerPermissions[] = ['add', 'read', 'remove'];\n","import { AfterContentInit, Component, ElementRef, EventEmitter, HostListener, Input, OnDestroy, OnInit, Output, ViewChild, inject } 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 private readonly sanitizer = inject(DomSanitizer);\n private readonly filePickerService = inject(FilePickerService);\n private readonly translate = inject(TranslateService);\n\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 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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;MAOa,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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;ME9LpB,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;;;;"}
|
|
@@ -922,8 +922,12 @@ class Gantt {
|
|
|
922
922
|
if (typeof element === 'string') {
|
|
923
923
|
element = document.querySelector(element);
|
|
924
924
|
}
|
|
925
|
+
else if (element instanceof SVGElement) {
|
|
926
|
+
// Se já for SVGElement direto, usar como tal
|
|
927
|
+
svgElement = element;
|
|
928
|
+
}
|
|
925
929
|
// get the SVGElement
|
|
926
|
-
if (element instanceof HTMLElement) {
|
|
930
|
+
if (!svgElement && element instanceof HTMLElement) {
|
|
927
931
|
wrapperElement = element;
|
|
928
932
|
svgElement = element.querySelector('svg');
|
|
929
933
|
}
|
|
@@ -1632,6 +1636,7 @@ class GanttComponent {
|
|
|
1632
1636
|
viewChanged = new EventEmitter();
|
|
1633
1637
|
outer = null;
|
|
1634
1638
|
side = null;
|
|
1639
|
+
ganttSvg = null;
|
|
1635
1640
|
_gantt;
|
|
1636
1641
|
ngOnInit() {
|
|
1637
1642
|
this._validateViewMode();
|
|
@@ -1641,7 +1646,7 @@ class GanttComponent {
|
|
|
1641
1646
|
if (this.fullWidth) {
|
|
1642
1647
|
this.containerWidth = this.outer?.nativeElement.offsetWidth - this.side?.nativeElement.offsetWidth;
|
|
1643
1648
|
}
|
|
1644
|
-
this._gantt = new Gantt(
|
|
1649
|
+
this._gantt = new Gantt(this.ganttSvg.nativeElement, this._filterTask(this.tasks), {
|
|
1645
1650
|
viewMode: this.viewMode,
|
|
1646
1651
|
marginBeforeStart: this.marginBeforeStart,
|
|
1647
1652
|
marginAfterEnd: this.marginAfterEnd,
|
|
@@ -1707,11 +1712,11 @@ class GanttComponent {
|
|
|
1707
1712
|
});
|
|
1708
1713
|
}
|
|
1709
1714
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1710
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: GanttComponent, selector: "s-gantt", inputs: { columnTitle: "columnTitle", multipleTaskPerLine: "multipleTaskPerLine", showSideTable: "showSideTable", viewMode: "viewMode", tasks: "tasks", marginBeforeStart: "marginBeforeStart", marginAfterEnd: "marginAfterEnd", allowMovement: "allowMovement", hasPopup: "hasPopup", containerWidth: "containerWidth", fullWidth: "fullWidth", showOnlyHours: "showOnlyHours", showOnlyDays: "showOnlyDays" }, outputs: { taskClicked: "taskClicked", taskDateChanged: "taskDateChanged", viewChanged: "viewChanged" }, viewQueries: [{ propertyName: "outer", first: true, predicate: ["outer"], descendants: true }, { propertyName: "side", first: true, predicate: ["side"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"outer\" #outer>\n <div #side>\n @if(showSideTable) {\n <gantt-side-table\n [tasks]=\"tasks\"\n [columnTitle]=\"columnTitle ?? ''\"\n [multipleTaskPerLine]=\"multipleTaskPerLine\">\n </gantt-side-table>\n }\n </div>\n <svg
|
|
1715
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: GanttComponent, selector: "s-gantt", inputs: { columnTitle: "columnTitle", multipleTaskPerLine: "multipleTaskPerLine", showSideTable: "showSideTable", viewMode: "viewMode", tasks: "tasks", marginBeforeStart: "marginBeforeStart", marginAfterEnd: "marginAfterEnd", allowMovement: "allowMovement", hasPopup: "hasPopup", containerWidth: "containerWidth", fullWidth: "fullWidth", showOnlyHours: "showOnlyHours", showOnlyDays: "showOnlyDays" }, outputs: { taskClicked: "taskClicked", taskDateChanged: "taskDateChanged", viewChanged: "viewChanged" }, viewQueries: [{ propertyName: "outer", first: true, predicate: ["outer"], descendants: true }, { propertyName: "side", first: true, predicate: ["side"], descendants: true }, { propertyName: "ganttSvg", first: true, predicate: ["ganttSvg"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"outer\" #outer>\n <div #side>\n @if(showSideTable) {\n <gantt-side-table\n [tasks]=\"tasks\"\n [columnTitle]=\"columnTitle ?? ''\"\n [multipleTaskPerLine]=\"multipleTaskPerLine\">\n </gantt-side-table>\n }\n </div>\n <svg #ganttSvg></svg>\n</div>\n", styles: [".outer{display:flex;justify-content:center;align-items:flex-start;align-content:center;flex-wrap:nowrap;flex-direction:row}\n", ".gantt{border:1px solid #e0e0e0}.gantt .weekend-highlight{fill:#b8c2cc;opacity:.5;stroke:#ebeff2;stroke-width:1}.gantt .grid-background{fill:none}.gantt .grid-header,.gantt .grid-row{fill:#fff}.gantt .grid-row:nth-child(2n){fill:#f5f5f5}.gantt .row-line{stroke:#ebeff2}.gantt .tick{stroke:#e0e0e0;stroke-width:.4}.gantt .tick.thick{stroke:#428bca;stroke-width:2}.gantt .today-highlight{fill:#ffe979;opacity:.5}.gantt .arrow{fill:none;stroke:#666;stroke-width:1.4}.gantt .bar{opacity:.8;stroke:#8d99a6;stroke-width:0;transition:stroke-width .3s ease;-webkit-user-select:none;user-select:none}.gantt .bar-invalid{fill:transparent;stroke:#8d99a6;stroke-dasharray:5;stroke-width:1}.gantt .bar-invalid~.bar-label{fill:#555}.gantt .bar-label{fill:#fff;text-anchor:middle;font-size:12px;font-weight:lighter}.gantt .bar-label.big{fill:#555;text-anchor:start}.gantt .bar-wrapper{cursor:pointer;outline:none}.gantt .bar-wrapper:hover .bar,.gantt .bar-wrapper.active .bar{opacity:1}.gantt .bar-wrapper.active .bar{stroke:#212533;stroke-width:2}.gantt .lower-text,.gantt .upper-text{font-size:12px;text-anchor:middle}.gantt .upper-text{fill:#555}.gantt .lower-text{fill:#333}.gantt .hide{display:none}.gantt-container{border-left:1px solid #e0e0e0;font-size:12px;overflow:auto;position:relative}.gantt-container .title-1{fill:#999;font-size:12px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .title-2{fill:#333;font-size:14px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .popup-wrapper{left:0;position:absolute;top:0}.gantt-container .popup-wrapper .popup{background:#0e1119;border-radius:2px;color:#fff;padding:8px;font-family:\"Open Sans\" sans-serif;line-height:150%;font-weight:400}.gantt-container .popup-wrapper .popup .wrp-title{border-bottom:1px solid #525966;padding-bottom:10px}.gantt-container .popup-wrapper .popup .wrp-title .title{font-size:14px}.gantt-container .popup-wrapper .popup .wrp-subtitle{color:#dfe2e5;padding-top:10px;display:flex;align-items:center}.gantt-container .popup-wrapper .popup .wrp-subtitle .icon{margin-right:10px}.gantt-container .popup-wrapper .popup .wrp-subtitle .subtitle{font-size:12px}.gantt-container .popup-wrapper .popup .pointer{border:6px solid transparent;border-top-color:#0e1119;height:6px;margin-left:-4px;position:absolute}\n"], dependencies: [{ kind: "component", type: SideTableComponent, selector: "gantt-side-table", inputs: ["columnTitle", "tasks", "multipleTaskPerLine"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1711
1716
|
}
|
|
1712
1717
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttComponent, decorators: [{
|
|
1713
1718
|
type: Component,
|
|
1714
|
-
args: [{ selector: 's-gantt', encapsulation: ViewEncapsulation.None, template: "<div class=\"outer\" #outer>\n <div #side>\n @if(showSideTable) {\n <gantt-side-table\n [tasks]=\"tasks\"\n [columnTitle]=\"columnTitle ?? ''\"\n [multipleTaskPerLine]=\"multipleTaskPerLine\">\n </gantt-side-table>\n }\n </div>\n <svg
|
|
1719
|
+
args: [{ selector: 's-gantt', encapsulation: ViewEncapsulation.None, template: "<div class=\"outer\" #outer>\n <div #side>\n @if(showSideTable) {\n <gantt-side-table\n [tasks]=\"tasks\"\n [columnTitle]=\"columnTitle ?? ''\"\n [multipleTaskPerLine]=\"multipleTaskPerLine\">\n </gantt-side-table>\n }\n </div>\n <svg #ganttSvg></svg>\n</div>\n", styles: [".outer{display:flex;justify-content:center;align-items:flex-start;align-content:center;flex-wrap:nowrap;flex-direction:row}\n", ".gantt{border:1px solid #e0e0e0}.gantt .weekend-highlight{fill:#b8c2cc;opacity:.5;stroke:#ebeff2;stroke-width:1}.gantt .grid-background{fill:none}.gantt .grid-header,.gantt .grid-row{fill:#fff}.gantt .grid-row:nth-child(2n){fill:#f5f5f5}.gantt .row-line{stroke:#ebeff2}.gantt .tick{stroke:#e0e0e0;stroke-width:.4}.gantt .tick.thick{stroke:#428bca;stroke-width:2}.gantt .today-highlight{fill:#ffe979;opacity:.5}.gantt .arrow{fill:none;stroke:#666;stroke-width:1.4}.gantt .bar{opacity:.8;stroke:#8d99a6;stroke-width:0;transition:stroke-width .3s ease;-webkit-user-select:none;user-select:none}.gantt .bar-invalid{fill:transparent;stroke:#8d99a6;stroke-dasharray:5;stroke-width:1}.gantt .bar-invalid~.bar-label{fill:#555}.gantt .bar-label{fill:#fff;text-anchor:middle;font-size:12px;font-weight:lighter}.gantt .bar-label.big{fill:#555;text-anchor:start}.gantt .bar-wrapper{cursor:pointer;outline:none}.gantt .bar-wrapper:hover .bar,.gantt .bar-wrapper.active .bar{opacity:1}.gantt .bar-wrapper.active .bar{stroke:#212533;stroke-width:2}.gantt .lower-text,.gantt .upper-text{font-size:12px;text-anchor:middle}.gantt .upper-text{fill:#555}.gantt .lower-text{fill:#333}.gantt .hide{display:none}.gantt-container{border-left:1px solid #e0e0e0;font-size:12px;overflow:auto;position:relative}.gantt-container .title-1{fill:#999;font-size:12px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .title-2{fill:#333;font-size:14px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .popup-wrapper{left:0;position:absolute;top:0}.gantt-container .popup-wrapper .popup{background:#0e1119;border-radius:2px;color:#fff;padding:8px;font-family:\"Open Sans\" sans-serif;line-height:150%;font-weight:400}.gantt-container .popup-wrapper .popup .wrp-title{border-bottom:1px solid #525966;padding-bottom:10px}.gantt-container .popup-wrapper .popup .wrp-title .title{font-size:14px}.gantt-container .popup-wrapper .popup .wrp-subtitle{color:#dfe2e5;padding-top:10px;display:flex;align-items:center}.gantt-container .popup-wrapper .popup .wrp-subtitle .icon{margin-right:10px}.gantt-container .popup-wrapper .popup .wrp-subtitle .subtitle{font-size:12px}.gantt-container .popup-wrapper .popup .pointer{border:6px solid transparent;border-top-color:#0e1119;height:6px;margin-left:-4px;position:absolute}\n"] }]
|
|
1715
1720
|
}], propDecorators: { columnTitle: [{
|
|
1716
1721
|
type: Input
|
|
1717
1722
|
}], multipleTaskPerLine: [{
|
|
@@ -1751,6 +1756,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1751
1756
|
}], side: [{
|
|
1752
1757
|
type: ViewChild,
|
|
1753
1758
|
args: ['side']
|
|
1759
|
+
}], ganttSvg: [{
|
|
1760
|
+
type: ViewChild,
|
|
1761
|
+
args: ['ganttSvg']
|
|
1754
1762
|
}] } });
|
|
1755
1763
|
|
|
1756
1764
|
class GanttModule {
|