@seniorsistemas/angular-components 19.3.1 → 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 +19 -28
- 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 +29 -46
- 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 +13 -13
- 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,7 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, TemplateRef, Component, Input, Output, ContentChild, ViewChild, ContentChildren, NgModule } from '@angular/core';
|
|
4
|
+
import { EventEmitter, TemplateRef, Component, Input, Output, ContentChild, ViewChild, inject, ChangeDetectorRef, ContentChildren, NgModule } from '@angular/core';
|
|
5
5
|
import * as i3$1 from '@angular/forms';
|
|
6
6
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import * as i2$1 from 'primeng/inputtext';
|
|
@@ -102,7 +102,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
102
102
|
* @category Structure
|
|
103
103
|
*/
|
|
104
104
|
class GlobalSearchComponent {
|
|
105
|
-
_cdr;
|
|
105
|
+
_cdr = inject(ChangeDetectorRef);
|
|
106
106
|
static nextId = 0;
|
|
107
107
|
globalSearch = null;
|
|
108
108
|
/** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */
|
|
@@ -138,9 +138,6 @@ class GlobalSearchComponent {
|
|
|
138
138
|
wasSearched = false;
|
|
139
139
|
isModalLoading = false;
|
|
140
140
|
expanded = true;
|
|
141
|
-
constructor(_cdr) {
|
|
142
|
-
this._cdr = _cdr;
|
|
143
|
-
}
|
|
144
141
|
onChange() {
|
|
145
142
|
const search = this.search;
|
|
146
143
|
setTimeout(() => {
|
|
@@ -184,7 +181,7 @@ class GlobalSearchComponent {
|
|
|
184
181
|
}
|
|
185
182
|
this._cdr.detectChanges();
|
|
186
183
|
}
|
|
187
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GlobalSearchComponent, deps: [
|
|
184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GlobalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
188
185
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: GlobalSearchComponent, selector: "s-global-search", inputs: { id: "id", delay: "delay", totalItensLabel: "totalItensLabel", showMoreLabel: "showMoreLabel", placeholder: "placeholder", isLoading: "isLoading", totalElements: "totalElements", emptyTitle: "emptyTitle", emptyDescription: "emptyDescription", emptyIcon: "emptyIcon", showFooter: "showFooter" }, outputs: { searched: "searched", focused: "focused", moreShown: "moreShown" }, queries: [{ propertyName: "dropdownItens", predicate: GlobalSearchDropdownItemComponent }], viewQueries: [{ propertyName: "globalSearch", first: true, predicate: ["globalSearch"], descendants: true }], ngImport: i0, template: "<div class=\"p-inputGroup\">\n <input\n #globalSearch\n class=\"global-search__input\"\n [(ngModel)]=\"search\"\n (ngModelChange)=\"onChange()\"\n pInputText\n [placeholder]=\"placeholder\"\n (focus)=\"focusIn()\"\n (blur)=\"focusOut()\"\n />\n <span class=\"p-inputGroup-addon global-search__span\">\n <em class=\"fas fa-search\"></em>\n </span>\n\n @if (wasSearched) {\n <div class=\"global-search__modal\">\n <div\n *sLoadingState=\"isLoading && !isModalLoading\"\n class=\"global-search__loader\"\n >\n @if ((dropdownItens && dropdownItens.length > 0) || isLoading) {\n <div class=\"global-search__container\">\n @if (dropdownItens && dropdownItens.length > 0) {\n <div>\n <div class=\"global-search__modal--total-itens-title\">\n <span class=\"ui-grid-col-11 no-space\">{{ totalItensLabel }}</span>\n <span\n class=\"ui-grid-col-1 no-space global-search__modal--total-itens-title-icon\"\n (click)=\"close()\"\n >\n <em class=\"fas fa-times\"></em>\n </span>\n </div>\n <div\n class=\"no-space global-search__dropdown--itens\"\n [@expandableContent]=\"expanded\"\n >\n @for (item of dropdownItens; track item.id) {\n <div class=\"s-object-card-field no-space global-search__dropdown--itens-container\">\n <ng-container *ngTemplateOutlet=\"item.content\"></ng-container>\n </div>\n }\n </div>\n\n @if (showFooter) {\n <div class=\"ui-grid-col-12 global-search__modal--footer\">\n <s-button\n class=\"global-search__show-more\"\n (click)=\"showMore()\"\n priority=\"link\"\n >\n {{ showMoreLabel }}\n </s-button>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if ((!dropdownItens || !dropdownItens.length) && !isLoading) {\n <s-empty-state\n [title]=\"emptyTitle ?? ''\"\n [description]=\"emptyDescription\"\n ngClass=\"global-search__empty-state--icon\"\n [iconClass]=\"emptyIcon ? emptyIcon : 'fas fa-search'\"\n >\n </s-empty-state>\n }\n </div>\n </div>\n }\n\n @if (wasSearched) {\n <div\n class=\"global-search__background\"\n (click)=\"close()\"\n ></div>\n }\n</div>\n", styles: [".p-inputGroup{display:flex;max-width:100%}.global-search__input{border-radius:20px 0 0 20px;border-right:none;cursor:pointer;height:25px;min-height:25px;padding:0 0 0 15px;transition:all .3s;width:136px}.global-search__input:active,.global-search__input:focus,.global-search__input-active{border-bottom:solid 1px #428bca;border-left:solid 1px #428bca;border-top:solid 1px #428bca;cursor:default;transition:all .3s;width:466px}.global-search__input:active,.global-search__input:focus+.global-search__span{border-bottom:solid 1px #428bca;border-left:none;border-right:solid 1px #428bca;border-top:solid 1px #428bca;transition:all .3s}.global-search__span{align-items:center;background:transparent;border:1px solid #ccc;border-left:none;border-radius:0 20px 20px 0;display:flex;height:25px;justify-content:center;padding:0 8px;transition:all .3s}.global-search__modal{background:#fff;border-radius:5px;box-shadow:0 2px 8px #0006;margin-top:60px;min-height:50px;position:absolute;width:500px;z-index:6}.global-search__modal--total-itens-title{border-bottom:solid 1px #ccc;color:#333;font-weight:600;height:50px;padding:15px}.global-search__modal--footer{border-top:solid 1px #ccc;height:50px}.global-search__modal--total-itens-title-icon{cursor:pointer;text-align:right}.global-search__container{min-height:50px;width:100%}.global-search__dropdown--itens{max-height:510px;overflow:auto}.global-search__dropdown--itens-container:hover{background:#dbe0e4}.global-search__background{background:#0006;cursor:pointer;height:calc(100vh - 70px);left:0;margin-top:50px;position:absolute;width:100%;z-index:5}.no-space{margin:0;padding:0}.global-search__show-more{display:flex;flex-direction:column}.global-search__show-more--button{color:#428bca!important}.modal{height:calc(100vh - 90px);left:1%;position:absolute;width:98%}.global-search__empty-state--icon{margin:42px 134px}::ng-deep s-global-search{width:100%}::ng-deep s-global-search .global-search__loader{border-radius:5px!important;width:100%}::ng-deep s-global-search .global-search__empty-state--icon .empty-state .icon{font-size:40px}::ng-deep s-global-search .s-button-priority-link{color:#428bca}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.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: i5.LoadingStateDirective, selector: "[sLoadingState]", inputs: ["sLoadingState"] }, { kind: "component", type: i6.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }], animations: [
|
|
189
186
|
trigger('expandableContent', [
|
|
190
187
|
state('*', style({ height: '0' })),
|
|
@@ -206,7 +203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
206
203
|
transition('false <=> true', animate('200ms ease-out')),
|
|
207
204
|
]),
|
|
208
205
|
], template: "<div class=\"p-inputGroup\">\n <input\n #globalSearch\n class=\"global-search__input\"\n [(ngModel)]=\"search\"\n (ngModelChange)=\"onChange()\"\n pInputText\n [placeholder]=\"placeholder\"\n (focus)=\"focusIn()\"\n (blur)=\"focusOut()\"\n />\n <span class=\"p-inputGroup-addon global-search__span\">\n <em class=\"fas fa-search\"></em>\n </span>\n\n @if (wasSearched) {\n <div class=\"global-search__modal\">\n <div\n *sLoadingState=\"isLoading && !isModalLoading\"\n class=\"global-search__loader\"\n >\n @if ((dropdownItens && dropdownItens.length > 0) || isLoading) {\n <div class=\"global-search__container\">\n @if (dropdownItens && dropdownItens.length > 0) {\n <div>\n <div class=\"global-search__modal--total-itens-title\">\n <span class=\"ui-grid-col-11 no-space\">{{ totalItensLabel }}</span>\n <span\n class=\"ui-grid-col-1 no-space global-search__modal--total-itens-title-icon\"\n (click)=\"close()\"\n >\n <em class=\"fas fa-times\"></em>\n </span>\n </div>\n <div\n class=\"no-space global-search__dropdown--itens\"\n [@expandableContent]=\"expanded\"\n >\n @for (item of dropdownItens; track item.id) {\n <div class=\"s-object-card-field no-space global-search__dropdown--itens-container\">\n <ng-container *ngTemplateOutlet=\"item.content\"></ng-container>\n </div>\n }\n </div>\n\n @if (showFooter) {\n <div class=\"ui-grid-col-12 global-search__modal--footer\">\n <s-button\n class=\"global-search__show-more\"\n (click)=\"showMore()\"\n priority=\"link\"\n >\n {{ showMoreLabel }}\n </s-button>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if ((!dropdownItens || !dropdownItens.length) && !isLoading) {\n <s-empty-state\n [title]=\"emptyTitle ?? ''\"\n [description]=\"emptyDescription\"\n ngClass=\"global-search__empty-state--icon\"\n [iconClass]=\"emptyIcon ? emptyIcon : 'fas fa-search'\"\n >\n </s-empty-state>\n }\n </div>\n </div>\n }\n\n @if (wasSearched) {\n <div\n class=\"global-search__background\"\n (click)=\"close()\"\n ></div>\n }\n</div>\n", styles: [".p-inputGroup{display:flex;max-width:100%}.global-search__input{border-radius:20px 0 0 20px;border-right:none;cursor:pointer;height:25px;min-height:25px;padding:0 0 0 15px;transition:all .3s;width:136px}.global-search__input:active,.global-search__input:focus,.global-search__input-active{border-bottom:solid 1px #428bca;border-left:solid 1px #428bca;border-top:solid 1px #428bca;cursor:default;transition:all .3s;width:466px}.global-search__input:active,.global-search__input:focus+.global-search__span{border-bottom:solid 1px #428bca;border-left:none;border-right:solid 1px #428bca;border-top:solid 1px #428bca;transition:all .3s}.global-search__span{align-items:center;background:transparent;border:1px solid #ccc;border-left:none;border-radius:0 20px 20px 0;display:flex;height:25px;justify-content:center;padding:0 8px;transition:all .3s}.global-search__modal{background:#fff;border-radius:5px;box-shadow:0 2px 8px #0006;margin-top:60px;min-height:50px;position:absolute;width:500px;z-index:6}.global-search__modal--total-itens-title{border-bottom:solid 1px #ccc;color:#333;font-weight:600;height:50px;padding:15px}.global-search__modal--footer{border-top:solid 1px #ccc;height:50px}.global-search__modal--total-itens-title-icon{cursor:pointer;text-align:right}.global-search__container{min-height:50px;width:100%}.global-search__dropdown--itens{max-height:510px;overflow:auto}.global-search__dropdown--itens-container:hover{background:#dbe0e4}.global-search__background{background:#0006;cursor:pointer;height:calc(100vh - 70px);left:0;margin-top:50px;position:absolute;width:100%;z-index:5}.no-space{margin:0;padding:0}.global-search__show-more{display:flex;flex-direction:column}.global-search__show-more--button{color:#428bca!important}.modal{height:calc(100vh - 90px);left:1%;position:absolute;width:98%}.global-search__empty-state--icon{margin:42px 134px}::ng-deep s-global-search{width:100%}::ng-deep s-global-search .global-search__loader{border-radius:5px!important;width:100%}::ng-deep s-global-search .global-search__empty-state--icon .empty-state .icon{font-size:40px}::ng-deep s-global-search .s-button-priority-link{color:#428bca}\n"] }]
|
|
209
|
-
}],
|
|
206
|
+
}], propDecorators: { globalSearch: [{
|
|
210
207
|
type: ViewChild,
|
|
211
208
|
args: ['globalSearch', { static: false }]
|
|
212
209
|
}], id: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-global-search.mjs","sources":["../../projects/angular-components/global-search/src/lib/global-search/components/dropdown/global-search-dropdown-item.component.ts","../../projects/angular-components/global-search/src/lib/global-search/components/dropdown/global-search-dropdown-item.component.html","../../projects/angular-components/global-search/src/lib/global-search/global-search.component.ts","../../projects/angular-components/global-search/src/lib/global-search/global-search.component.html","../../projects/angular-components/global-search/src/lib/global-search/global-search.module.ts","../../projects/angular-components/global-search/src/seniorsistemas-angular-components-global-search.ts"],"sourcesContent":["import { Component, ContentChild, EventEmitter, Input, Output, TemplateRef, ViewChild } from '@angular/core';\n\nimport { GlobalSearchSizeEnum } from '../../types/global-search-size.enum';\nimport { ThumbnailComponent } from '@seniorsistemas/angular-components/thumbnail';\n\n@Component({\n selector: 's-global-search-dropdown-item',\n templateUrl: './global-search-dropdown-item.component.html',\n styleUrls: ['./global-search-dropdown-item.component.scss'],\n})\nexport class GlobalSearchDropdownItemComponent {\n public static nextId = 0;\n\n @Input()\n public id = `s-global-search-dropdown-item-${GlobalSearchDropdownItemComponent.nextId++}`;\n\n @Input()\n public primaryLabel?: string;\n\n @Input()\n public secondaryEmptyLabel?: string;\n\n @Input()\n public tertiaryEmptyLabel?: string;\n\n @Input()\n public imageSource?: string;\n\n @Input()\n public imageAlt?: string;\n\n @Input()\n public iconClass?: string;\n\n @Input()\n public secondaryLabel?: string;\n\n @Input()\n public tertiaryLabel?: string;\n\n @Input()\n public size: GlobalSearchSizeEnum = 'standart';\n\n @Input()\n public template: TemplateRef<any> | null = null;\n\n @Output()\n public buttonClick = new EventEmitter<void>();\n\n @ContentChild(ThumbnailComponent, { static: true })\n public thumbnailComponent: ThumbnailComponent | null = null;\n\n @ViewChild(TemplateRef, { static: true })\n public content: TemplateRef<any> | null = null;\n\n public isMediumSize(): boolean {\n return this.size === 'medium';\n }\n\n public isSmallSize(): boolean {\n return this.size === 'small';\n }\n\n public getImageSize(): 'medium' | 'small' {\n return this._isStandardSize() ? 'medium' : 'small';\n }\n\n private _isStandardSize(): boolean {\n return this.size === 'standart';\n }\n}\n","<ng-template>\n <div class=\"global-search-dropdown-item\" [class.ui-grid]=\"isSmallSize()\">\n <ng-content select=\"s-thumbnail\"></ng-content>\n\n @if (!thumbnailComponent && (imageSource || iconClass) && !isSmallSize()) {\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n [imageSource]=\"imageSource\"\n [imageAlt]=\"imageAlt || primaryLabel\"\n [iconClass]=\"iconClass ?? ''\"\n [size]=\"getImageSize()\"\n ></s-thumbnail>\n }\n\n <div class=\"global-search-item__container {{ !isSmallSize() ? 'global-search-item__container--width-60' : '' }}\">\n <div #titleTemplate>\n <ng-content select=\"[titleTemplate]\"></ng-content>\n </div>\n @if (!titleTemplate.children.length) {\n <s-button\n styleClass=\"no-padding\"\n class=\"{{ isSmallSize() ? 'ui-grid-col-6 no-padding' : '' }}\"\n [id]=\"id + '-title'\"\n priority=\"link\"\n [pTooltip]=\"primaryLabel\"\n [label]=\"primaryLabel\"\n size=\"small\"\n (clicked)=\"buttonClick.emit()\"\n >\n </s-button>\n }\n\n <div #labelTemplate>\n <ng-content select=\"[labelTemplate]\"></ng-content>\n </div>\n\n @if (!labelTemplate.children.length) {\n <span\n [id]=\"id + '-label'\"\n [ngClass]=\"{\n 'ui-grid-col-6 global-search-item__text-align--right': isSmallSize(),\n 'global-search-item__italic': !secondaryLabel,\n }\"\n class=\"label\"\n [pTooltip]=\"secondaryLabel\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ secondaryLabel ? secondaryLabel : secondaryEmptyLabel }}</span\n >\n }\n\n <div #descriptionTemplate>\n <ng-content select=\"[descriptionTemplate]\"></ng-content>\n </div>\n\n @if (!descriptionTemplate.children.length && !isMediumSize() && !isSmallSize()) {\n <span\n [id]=\"id + '-description'\"\n class=\"description\"\n [ngClass]=\"{ 'global-search-item__italic': !secondaryLabel }\"\n [pTooltip]=\"tertiaryLabel\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n {{ tertiaryLabel ? tertiaryLabel : tertiaryEmptyLabel }}\n </span>\n }\n </div>\n @if (!isSmallSize()) {\n <div class=\"global-search-item__container--width-40 global-search__dropdown--template\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n }\n </div>\n</ng-template>\n","import { animate, state, style, transition, trigger } from '@angular/animations';\nimport {\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\n\nimport { GlobalSearchDropdownItemComponent } from './components/dropdown/global-search-dropdown-item.component';\nimport { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\n\n/**\n * @description Componente de busca global com input, dropdown de resultados, estado\n * de carregamento, empty state e suporte a itens customizáveis via `GlobalSearchDropdownItemComponent`.\n *\n * @example\n * ```html\n * <s-global-search\n * totalItensLabel=\"resultados\"\n * showMoreLabel=\"Ver mais\"\n * [totalElements]=\"total\"\n * (search)=\"onBusca($event)\" />\n * ```\n *\n * @category Structure\n */\n@Component({\n selector: 's-global-search',\n templateUrl: './global-search.component.html',\n styleUrls: ['./global-search.component.scss'],\n animations: [\n trigger('expandableContent', [\n state('*', style({ height: '0' })),\n state('false', style({ height: '0' })),\n state('true', style({ height: '*' })),\n transition('* => true', animate('200ms ease-out')),\n transition('false <=> true', animate('200ms ease-out')),\n ]),\n ],\n})\nexport class GlobalSearchComponent {\n public static nextId = 0;\n\n @ViewChild('globalSearch', { static: false })\n public globalSearch: ElementRef | null = null;\n\n /** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */\n @Input()\n public id = `s-global-search-${GlobalSearchDropdownItemComponent.nextId++}`;\n\n /** @description Tempo de debounce em ms antes de emitir o evento de busca. @default 500 */\n @Input()\n public delay = 500;\n\n /** @description Label que acompanha o total de resultados. Campo obrigatório. */\n @Input({ required: true })\n public totalItensLabel!: string;\n\n /** @description Rótulo do link para exibir mais resultados. Campo obrigatório. */\n @Input({ required: true })\n public showMoreLabel!: string;\n\n /** @description Placeholder do input de busca. */\n @Input()\n public placeholder?: string;\n\n /** @description Exibe indicador de carregamento no dropdown. @default false */\n @Input()\n public isLoading = false;\n\n /** @description Número total de resultados encontrados. */\n @Input()\n public totalElements?: number;\n\n /** @description Título do empty state quando não há resultados. */\n @Input()\n public emptyTitle?: string;\n\n /** @description Descrição do empty state exibida abaixo do título. */\n @Input()\n public emptyDescription?: string;\n\n /** @description Classe do ícone exibido no empty state. */\n @Input()\n public emptyIcon?: string;\n\n /** @description Exibe o rodapé com o link \"ver mais\" e contagem de resultados. @default true */\n @Input() showFooter = true;\n\n @ContentChildren(GlobalSearchDropdownItemComponent)\n public dropdownItens: QueryList<GlobalSearchDropdownItemComponent> | null = null;\n\n /** @description Emitido ao digitar no campo de busca, com o valor atual da pesquisa. */\n @Output()\n public searched = new EventEmitter<string>();\n\n /** @description Emitido quando o campo de busca ganha ou perde foco (`true` = focado). */\n @Output()\n public focused = new EventEmitter<boolean>();\n\n /** @description Emitido ao clicar no link para exibir mais resultados. */\n @Output()\n public moreShown = new EventEmitter<void>();\n\n public search: string | null = null;\n public wasSearched = false;\n public isModalLoading = false;\n public expanded = true;\n\n constructor(private readonly _cdr: ChangeDetectorRef) {}\n\n public onChange() {\n const search = this.search;\n setTimeout(() => {\n if (this.search === search) {\n this._canShowGlobalSearchActive();\n this.searched.emit(this.search ?? '');\n }\n }, this.delay);\n }\n\n public focusIn() {\n this.focused.emit(true);\n }\n\n public focusOut() {\n this.focused.emit(false);\n }\n\n public showMore() {\n this.moreShown.emit();\n }\n\n public close() {\n this.search = null;\n this.wasSearched = false;\n this.dropdownItens = null;\n this.isModalLoading = false;\n this._removeActiveClassByGlobalSearch();\n }\n\n private _removeActiveClassByGlobalSearch() {\n if (isNullOrUndefined(this.globalSearch)) return;\n\n this.globalSearch.nativeElement.classList.remove('global-search__input-active');\n }\n\n private _canShowGlobalSearchActive() {\n this.wasSearched = !!this.search;\n if (this.search) {\n if (isNullOrUndefined(this.globalSearch)) return;\n\n this.globalSearch.nativeElement.classList.add('global-search__input-active');\n } else {\n this._removeActiveClassByGlobalSearch();\n this.close();\n }\n this._cdr.detectChanges();\n }\n}\n\n","<div class=\"p-inputGroup\">\n <input\n #globalSearch\n class=\"global-search__input\"\n [(ngModel)]=\"search\"\n (ngModelChange)=\"onChange()\"\n pInputText\n [placeholder]=\"placeholder\"\n (focus)=\"focusIn()\"\n (blur)=\"focusOut()\"\n />\n <span class=\"p-inputGroup-addon global-search__span\">\n <em class=\"fas fa-search\"></em>\n </span>\n\n @if (wasSearched) {\n <div class=\"global-search__modal\">\n <div\n *sLoadingState=\"isLoading && !isModalLoading\"\n class=\"global-search__loader\"\n >\n @if ((dropdownItens && dropdownItens.length > 0) || isLoading) {\n <div class=\"global-search__container\">\n @if (dropdownItens && dropdownItens.length > 0) {\n <div>\n <div class=\"global-search__modal--total-itens-title\">\n <span class=\"ui-grid-col-11 no-space\">{{ totalItensLabel }}</span>\n <span\n class=\"ui-grid-col-1 no-space global-search__modal--total-itens-title-icon\"\n (click)=\"close()\"\n >\n <em class=\"fas fa-times\"></em>\n </span>\n </div>\n <div\n class=\"no-space global-search__dropdown--itens\"\n [@expandableContent]=\"expanded\"\n >\n @for (item of dropdownItens; track item.id) {\n <div class=\"s-object-card-field no-space global-search__dropdown--itens-container\">\n <ng-container *ngTemplateOutlet=\"item.content\"></ng-container>\n </div>\n }\n </div>\n\n @if (showFooter) {\n <div class=\"ui-grid-col-12 global-search__modal--footer\">\n <s-button\n class=\"global-search__show-more\"\n (click)=\"showMore()\"\n priority=\"link\"\n >\n {{ showMoreLabel }}\n </s-button>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if ((!dropdownItens || !dropdownItens.length) && !isLoading) {\n <s-empty-state\n [title]=\"emptyTitle ?? ''\"\n [description]=\"emptyDescription\"\n ngClass=\"global-search__empty-state--icon\"\n [iconClass]=\"emptyIcon ? emptyIcon : 'fas fa-search'\"\n >\n </s-empty-state>\n }\n </div>\n </div>\n }\n\n @if (wasSearched) {\n <div\n class=\"global-search__background\"\n (click)=\"close()\"\n ></div>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { EmptyStateModule } from \"@seniorsistemas/angular-components/empty-state\";\nimport { InfiniteScrollModule } from '@seniorsistemas/angular-components/infinite-scroll';\nimport { LoadingStateModule } from '@seniorsistemas/angular-components/loading-state';\nimport { ThumbnailModule } from '@seniorsistemas/angular-components/thumbnail';\nimport { GlobalSearchDropdownItemComponent } from './components/dropdown/global-search-dropdown-item.component';\nimport { GlobalSearchComponent } from './global-search.component';\n\n@NgModule({\n declarations: [\n GlobalSearchComponent,\n GlobalSearchDropdownItemComponent\n ],\n imports: [\n CommonModule,\n InputTextModule,\n FormsModule,\n ReactiveFormsModule,\n TooltipModule,\n ThumbnailModule,\n ButtonModule,\n LoadingStateModule,\n InfiniteScrollModule,\n EmptyStateModule\n ],\n exports: [\n GlobalSearchComponent,\n GlobalSearchDropdownItemComponent,\n TooltipModule,\n ThumbnailModule,\n ButtonModule,\n LoadingStateModule,\n EmptyStateModule\n ]\n})\nexport class GlobalSearchModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAUa,iCAAiC,CAAA;AACnC,IAAA,OAAO,MAAM,GAAG,CAAC,CAAC;AAGlB,IAAA,EAAE,GAAG,CAAiC,8BAAA,EAAA,iCAAiC,CAAC,MAAM,EAAE,EAAE,CAAC;AAGnF,IAAA,YAAY,CAAU;AAGtB,IAAA,mBAAmB,CAAU;AAG7B,IAAA,kBAAkB,CAAU;AAG5B,IAAA,WAAW,CAAU;AAGrB,IAAA,QAAQ,CAAU;AAGlB,IAAA,SAAS,CAAU;AAGnB,IAAA,cAAc,CAAU;AAGxB,IAAA,aAAa,CAAU;IAGvB,IAAI,GAAyB,UAAU,CAAC;IAGxC,QAAQ,GAA4B,IAAI,CAAC;AAGzC,IAAA,WAAW,GAAG,IAAI,YAAY,EAAQ,CAAC;IAGvC,kBAAkB,GAA8B,IAAI,CAAC;IAGrD,OAAO,GAA4B,IA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b,eAAe;YACf,YAAY;YACZ,kBAAkB;YAClB,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAGX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YArBvB,YAAY;YACZ,eAAe;YACf,WAAW;YACX,mBAAmB;YACnB,aAAa;YACb,eAAe;YACf,YAAY;YACZ,kBAAkB;YAClB,oBAAoB;AACpB,YAAA,gBAAgB,EAKhB,aAAa;YACb,eAAe;YACf,YAAY;YACZ,kBAAkB;YAClB,gBAAgB,CAAA,EAAA,CAAA,CAAA;;4FAGX,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBA3B9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,qBAAqB;wBACrB,iCAAiC;AACpC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,WAAW;wBACX,mBAAmB;wBACnB,aAAa;wBACb,eAAe;wBACf,YAAY;wBACZ,kBAAkB;wBAClB,oBAAoB;wBACpB,gBAAgB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,qBAAqB;wBACrB,iCAAiC;wBACjC,aAAa;wBACb,eAAe;wBACf,YAAY;wBACZ,kBAAkB;wBAClB,gBAAgB;AACnB,qBAAA;AACJ,iBAAA,CAAA;;;ACzCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-global-search.mjs","sources":["../../projects/angular-components/global-search/src/lib/global-search/components/dropdown/global-search-dropdown-item.component.ts","../../projects/angular-components/global-search/src/lib/global-search/components/dropdown/global-search-dropdown-item.component.html","../../projects/angular-components/global-search/src/lib/global-search/global-search.component.ts","../../projects/angular-components/global-search/src/lib/global-search/global-search.component.html","../../projects/angular-components/global-search/src/lib/global-search/global-search.module.ts","../../projects/angular-components/global-search/src/seniorsistemas-angular-components-global-search.ts"],"sourcesContent":["import { Component, ContentChild, EventEmitter, Input, Output, TemplateRef, ViewChild } from '@angular/core';\n\nimport { GlobalSearchSizeEnum } from '../../types/global-search-size.enum';\nimport { ThumbnailComponent } from '@seniorsistemas/angular-components/thumbnail';\n\n@Component({\n selector: 's-global-search-dropdown-item',\n templateUrl: './global-search-dropdown-item.component.html',\n styleUrls: ['./global-search-dropdown-item.component.scss'],\n})\nexport class GlobalSearchDropdownItemComponent {\n public static nextId = 0;\n\n @Input()\n public id = `s-global-search-dropdown-item-${GlobalSearchDropdownItemComponent.nextId++}`;\n\n @Input()\n public primaryLabel?: string;\n\n @Input()\n public secondaryEmptyLabel?: string;\n\n @Input()\n public tertiaryEmptyLabel?: string;\n\n @Input()\n public imageSource?: string;\n\n @Input()\n public imageAlt?: string;\n\n @Input()\n public iconClass?: string;\n\n @Input()\n public secondaryLabel?: string;\n\n @Input()\n public tertiaryLabel?: string;\n\n @Input()\n public size: GlobalSearchSizeEnum = 'standart';\n\n @Input()\n public template: TemplateRef<any> | null = null;\n\n @Output()\n public buttonClick = new EventEmitter<void>();\n\n @ContentChild(ThumbnailComponent, { static: true })\n public thumbnailComponent: ThumbnailComponent | null = null;\n\n @ViewChild(TemplateRef, { static: true })\n public content: TemplateRef<any> | null = null;\n\n public isMediumSize(): boolean {\n return this.size === 'medium';\n }\n\n public isSmallSize(): boolean {\n return this.size === 'small';\n }\n\n public getImageSize(): 'medium' | 'small' {\n return this._isStandardSize() ? 'medium' : 'small';\n }\n\n private _isStandardSize(): boolean {\n return this.size === 'standart';\n }\n}\n","<ng-template>\n <div class=\"global-search-dropdown-item\" [class.ui-grid]=\"isSmallSize()\">\n <ng-content select=\"s-thumbnail\"></ng-content>\n\n @if (!thumbnailComponent && (imageSource || iconClass) && !isSmallSize()) {\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n [imageSource]=\"imageSource\"\n [imageAlt]=\"imageAlt || primaryLabel\"\n [iconClass]=\"iconClass ?? ''\"\n [size]=\"getImageSize()\"\n ></s-thumbnail>\n }\n\n <div class=\"global-search-item__container {{ !isSmallSize() ? 'global-search-item__container--width-60' : '' }}\">\n <div #titleTemplate>\n <ng-content select=\"[titleTemplate]\"></ng-content>\n </div>\n @if (!titleTemplate.children.length) {\n <s-button\n styleClass=\"no-padding\"\n class=\"{{ isSmallSize() ? 'ui-grid-col-6 no-padding' : '' }}\"\n [id]=\"id + '-title'\"\n priority=\"link\"\n [pTooltip]=\"primaryLabel\"\n [label]=\"primaryLabel\"\n size=\"small\"\n (clicked)=\"buttonClick.emit()\"\n >\n </s-button>\n }\n\n <div #labelTemplate>\n <ng-content select=\"[labelTemplate]\"></ng-content>\n </div>\n\n @if (!labelTemplate.children.length) {\n <span\n [id]=\"id + '-label'\"\n [ngClass]=\"{\n 'ui-grid-col-6 global-search-item__text-align--right': isSmallSize(),\n 'global-search-item__italic': !secondaryLabel,\n }\"\n class=\"label\"\n [pTooltip]=\"secondaryLabel\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ secondaryLabel ? secondaryLabel : secondaryEmptyLabel }}</span\n >\n }\n\n <div #descriptionTemplate>\n <ng-content select=\"[descriptionTemplate]\"></ng-content>\n </div>\n\n @if (!descriptionTemplate.children.length && !isMediumSize() && !isSmallSize()) {\n <span\n [id]=\"id + '-description'\"\n class=\"description\"\n [ngClass]=\"{ 'global-search-item__italic': !secondaryLabel }\"\n [pTooltip]=\"tertiaryLabel\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n {{ tertiaryLabel ? tertiaryLabel : tertiaryEmptyLabel }}\n </span>\n }\n </div>\n @if (!isSmallSize()) {\n <div class=\"global-search-item__container--width-40 global-search__dropdown--template\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n }\n </div>\n</ng-template>\n","import { animate, state, style, transition, trigger } from '@angular/animations';\nimport { ChangeDetectorRef, Component, ContentChildren, ElementRef, EventEmitter, Input, Output, QueryList, ViewChild, inject } from '@angular/core';\n\nimport { GlobalSearchDropdownItemComponent } from './components/dropdown/global-search-dropdown-item.component';\nimport { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\n\n/**\n * @description Componente de busca global com input, dropdown de resultados, estado\n * de carregamento, empty state e suporte a itens customizáveis via `GlobalSearchDropdownItemComponent`.\n *\n * @example\n * ```html\n * <s-global-search\n * totalItensLabel=\"resultados\"\n * showMoreLabel=\"Ver mais\"\n * [totalElements]=\"total\"\n * (search)=\"onBusca($event)\" />\n * ```\n *\n * @category Structure\n */\n@Component({\n selector: 's-global-search',\n templateUrl: './global-search.component.html',\n styleUrls: ['./global-search.component.scss'],\n animations: [\n trigger('expandableContent', [\n state('*', style({ height: '0' })),\n state('false', style({ height: '0' })),\n state('true', style({ height: '*' })),\n transition('* => true', animate('200ms ease-out')),\n transition('false <=> true', animate('200ms ease-out')),\n ]),\n ],\n})\nexport class GlobalSearchComponent {\n private readonly _cdr = inject(ChangeDetectorRef);\n\n public static nextId = 0;\n\n @ViewChild('globalSearch', { static: false })\n public globalSearch: ElementRef | null = null;\n\n /** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */\n @Input()\n public id = `s-global-search-${GlobalSearchDropdownItemComponent.nextId++}`;\n\n /** @description Tempo de debounce em ms antes de emitir o evento de busca. @default 500 */\n @Input()\n public delay = 500;\n\n /** @description Label que acompanha o total de resultados. Campo obrigatório. */\n @Input({ required: true })\n public totalItensLabel!: string;\n\n /** @description Rótulo do link para exibir mais resultados. Campo obrigatório. */\n @Input({ required: true })\n public showMoreLabel!: string;\n\n /** @description Placeholder do input de busca. */\n @Input()\n public placeholder?: string;\n\n /** @description Exibe indicador de carregamento no dropdown. @default false */\n @Input()\n public isLoading = false;\n\n /** @description Número total de resultados encontrados. */\n @Input()\n public totalElements?: number;\n\n /** @description Título do empty state quando não há resultados. */\n @Input()\n public emptyTitle?: string;\n\n /** @description Descrição do empty state exibida abaixo do título. */\n @Input()\n public emptyDescription?: string;\n\n /** @description Classe do ícone exibido no empty state. */\n @Input()\n public emptyIcon?: string;\n\n /** @description Exibe o rodapé com o link \"ver mais\" e contagem de resultados. @default true */\n @Input() showFooter = true;\n\n @ContentChildren(GlobalSearchDropdownItemComponent)\n public dropdownItens: QueryList<GlobalSearchDropdownItemComponent> | null = null;\n\n /** @description Emitido ao digitar no campo de busca, com o valor atual da pesquisa. */\n @Output()\n public searched = new EventEmitter<string>();\n\n /** @description Emitido quando o campo de busca ganha ou perde foco (`true` = focado). */\n @Output()\n public focused = new EventEmitter<boolean>();\n\n /** @description Emitido ao clicar no link para exibir mais resultados. */\n @Output()\n public moreShown = new EventEmitter<void>();\n\n public search: string | null = null;\n public wasSearched = false;\n public isModalLoading = false;\n public expanded = true;\n\n public onChange() {\n const search = this.search;\n setTimeout(() => {\n if (this.search === search) {\n this._canShowGlobalSearchActive();\n this.searched.emit(this.search ?? '');\n }\n }, this.delay);\n }\n\n public focusIn() {\n this.focused.emit(true);\n }\n\n public focusOut() {\n this.focused.emit(false);\n }\n\n public showMore() {\n this.moreShown.emit();\n }\n\n public close() {\n this.search = null;\n this.wasSearched = false;\n this.dropdownItens = null;\n this.isModalLoading = false;\n this._removeActiveClassByGlobalSearch();\n }\n\n private _removeActiveClassByGlobalSearch() {\n if (isNullOrUndefined(this.globalSearch)) return;\n\n this.globalSearch.nativeElement.classList.remove('global-search__input-active');\n }\n\n private _canShowGlobalSearchActive() {\n this.wasSearched = !!this.search;\n if (this.search) {\n if (isNullOrUndefined(this.globalSearch)) return;\n\n this.globalSearch.nativeElement.classList.add('global-search__input-active');\n } else {\n this._removeActiveClassByGlobalSearch();\n this.close();\n }\n this._cdr.detectChanges();\n }\n}\n\n","<div class=\"p-inputGroup\">\n <input\n #globalSearch\n class=\"global-search__input\"\n [(ngModel)]=\"search\"\n (ngModelChange)=\"onChange()\"\n pInputText\n [placeholder]=\"placeholder\"\n (focus)=\"focusIn()\"\n (blur)=\"focusOut()\"\n />\n <span class=\"p-inputGroup-addon global-search__span\">\n <em class=\"fas fa-search\"></em>\n </span>\n\n @if (wasSearched) {\n <div class=\"global-search__modal\">\n <div\n *sLoadingState=\"isLoading && !isModalLoading\"\n class=\"global-search__loader\"\n >\n @if ((dropdownItens && dropdownItens.length > 0) || isLoading) {\n <div class=\"global-search__container\">\n @if (dropdownItens && dropdownItens.length > 0) {\n <div>\n <div class=\"global-search__modal--total-itens-title\">\n <span class=\"ui-grid-col-11 no-space\">{{ totalItensLabel }}</span>\n <span\n class=\"ui-grid-col-1 no-space global-search__modal--total-itens-title-icon\"\n (click)=\"close()\"\n >\n <em class=\"fas fa-times\"></em>\n </span>\n </div>\n <div\n class=\"no-space global-search__dropdown--itens\"\n [@expandableContent]=\"expanded\"\n >\n @for (item of dropdownItens; track item.id) {\n <div class=\"s-object-card-field no-space global-search__dropdown--itens-container\">\n <ng-container *ngTemplateOutlet=\"item.content\"></ng-container>\n </div>\n }\n </div>\n\n @if (showFooter) {\n <div class=\"ui-grid-col-12 global-search__modal--footer\">\n <s-button\n class=\"global-search__show-more\"\n (click)=\"showMore()\"\n priority=\"link\"\n >\n {{ showMoreLabel }}\n </s-button>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if ((!dropdownItens || !dropdownItens.length) && !isLoading) {\n <s-empty-state\n [title]=\"emptyTitle ?? ''\"\n [description]=\"emptyDescription\"\n ngClass=\"global-search__empty-state--icon\"\n [iconClass]=\"emptyIcon ? emptyIcon : 'fas fa-search'\"\n >\n </s-empty-state>\n }\n </div>\n </div>\n }\n\n @if (wasSearched) {\n <div\n class=\"global-search__background\"\n (click)=\"close()\"\n ></div>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { EmptyStateModule } from \"@seniorsistemas/angular-components/empty-state\";\nimport { InfiniteScrollModule } from '@seniorsistemas/angular-components/infinite-scroll';\nimport { LoadingStateModule } from '@seniorsistemas/angular-components/loading-state';\nimport { ThumbnailModule } from '@seniorsistemas/angular-components/thumbnail';\nimport { GlobalSearchDropdownItemComponent } from './components/dropdown/global-search-dropdown-item.component';\nimport { GlobalSearchComponent } from './global-search.component';\n\n@NgModule({\n declarations: [\n GlobalSearchComponent,\n GlobalSearchDropdownItemComponent\n ],\n imports: [\n CommonModule,\n InputTextModule,\n FormsModule,\n ReactiveFormsModule,\n TooltipModule,\n ThumbnailModule,\n ButtonModule,\n LoadingStateModule,\n InfiniteScrollModule,\n EmptyStateModule\n ],\n exports: [\n GlobalSearchComponent,\n GlobalSearchDropdownItemComponent,\n TooltipModule,\n ThumbnailModule,\n ButtonModule,\n LoadingStateModule,\n EmptyStateModule\n ]\n})\nexport class GlobalSearchModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAUa,iCAAiC,CAAA;AACnC,IAAA,OAAO,MAAM,GAAG,CAAC,CAAC;AAGlB,IAAA,EAAE,GAAG,CAAiC,8BAAA,EAAA,iCAAiC,CAAC,MAAM,EAAE,EAAE,CAAC;AAGnF,IAAA,YAAY,CAAU;AAGtB,IAAA,mBAAmB,CAAU;AAG7B,IAAA,kBAAkB,CAAU;AAG5B,IAAA,WAAW,CAAU;AAGrB,IAAA,QAAQ,CAAU;AAGlB,IAAA,SAAS,CAAU;AAGnB,IAAA,cAAc,CAAU;AAGxB,IAAA,aAAa,CAAU;IAGvB,IAAI,GAAyB,UAAU,CAAC;IAGxC,QAAQ,GAA4B,IAAI,CAAC;AAGzC,IAAA,WAAW,GAAG,IAAI,YAAY,EAAQ,CAAC;IAGvC,kBAAkB,GAA8B,IAAI,CAAC;IAGrD,OAAO,GAA4B,IAAI,CAAC;IAExC,YAAY,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,IAA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AAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YArBvB,YAAY;YACZ,eAAe;YACf,WAAW;YACX,mBAAmB;YACnB,aAAa;YACb,eAAe;YACf,YAAY;YACZ,kBAAkB;YAClB,oBAAoB;AACpB,YAAA,gBAAgB,EAKhB,aAAa;YACb,eAAe;YACf,YAAY;YACZ,kBAAkB;YAClB,gBAAgB,CAAA,EAAA,CAAA,CAAA;;4FAGX,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBA3B9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,qBAAqB;wBACrB,iCAAiC;AACpC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,WAAW;wBACX,mBAAmB;wBACnB,aAAa;wBACb,eAAe;wBACf,YAAY;wBACZ,kBAAkB;wBAClB,oBAAoB;wBACpB,gBAAgB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,qBAAqB;wBACrB,iCAAiC;wBACjC,aAAa;wBACb,eAAe;wBACf,YAAY;wBACZ,kBAAkB;wBAClB,gBAAgB;AACnB,qBAAA;AACJ,iBAAA,CAAA;;;ACzCD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, EventEmitter, Component, ViewEncapsulation, Input, Output, ViewChild, ContentChild, NgModule, Injectable } from '@angular/core';
|
|
3
|
+
import { inject, EventEmitter, Component, ViewEncapsulation, Input, Output, ViewChild, ContentChild, NgModule, ComponentFactoryResolver, ApplicationRef, Injector, Injectable } from '@angular/core';
|
|
4
4
|
import Cropper from 'cropperjs';
|
|
5
5
|
import { HeaderComponent, FooterComponent, StructureModule } from '@seniorsistemas/angular-components/structure';
|
|
6
6
|
import { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';
|
|
@@ -236,15 +236,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
236
236
|
}] });
|
|
237
237
|
|
|
238
238
|
class ImageCropperService {
|
|
239
|
-
_componentFactoryResolver;
|
|
240
|
-
_appRef;
|
|
241
|
-
_injector;
|
|
239
|
+
_componentFactoryResolver = inject(ComponentFactoryResolver);
|
|
240
|
+
_appRef = inject(ApplicationRef);
|
|
241
|
+
_injector = inject(Injector);
|
|
242
242
|
activeCropper;
|
|
243
|
-
constructor(_componentFactoryResolver, _appRef, _injector) {
|
|
244
|
-
this._componentFactoryResolver = _componentFactoryResolver;
|
|
245
|
-
this._appRef = _appRef;
|
|
246
|
-
this._injector = _injector;
|
|
247
|
-
}
|
|
248
243
|
show(config) {
|
|
249
244
|
if (this.activeCropper)
|
|
250
245
|
this._destroy(this.activeCropper);
|
|
@@ -295,12 +290,12 @@ class ImageCropperService {
|
|
|
295
290
|
this._appRef.detachView(activeCropper.componentRef.hostView);
|
|
296
291
|
activeCropper.componentRef.destroy();
|
|
297
292
|
}
|
|
298
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageCropperService, deps: [
|
|
293
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageCropperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
299
294
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageCropperService });
|
|
300
295
|
}
|
|
301
296
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageCropperService, decorators: [{
|
|
302
297
|
type: Injectable
|
|
303
|
-
}]
|
|
298
|
+
}] });
|
|
304
299
|
|
|
305
300
|
/**
|
|
306
301
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-image-cropper.mjs","sources":["../../projects/angular-components/image-cropper/src/lib/image-cropper/image-cropper.component.ts","../../projects/angular-components/image-cropper/src/lib/image-cropper/image-cropper.component.html","../../projects/angular-components/image-cropper/src/lib/image-cropper/image-cropper.module.ts","../../projects/angular-components/image-cropper/src/lib/image-cropper/image-cropper.service.ts","../../projects/angular-components/image-cropper/src/seniorsistemas-angular-components-image-cropper.ts"],"sourcesContent":["import {\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport Cropper from 'cropperjs';\nimport { FooterComponent, HeaderComponent } from '@seniorsistemas/angular-components/structure';\nimport { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\nimport { ActiveDialog } from '@seniorsistemas/angular-components/dialog';\n\n/**\n * @description Componente de recorte de imagem que integra a biblioteca `cropperjs`.\n * Exibe um dialog com uma área interativa para selecionar, recortar e remover imagens,\n * suportando razão de aspecto configurável, formato circular e templates de cabeçalho/rodapé.\n *\n * @example\n * ```html\n * <s-image-cropper\n * [(visible)]=\"dialogAberto\"\n * [imageSource]=\"urlDaImagem\"\n * [aspectRatio]=\"1\"\n * (croppedImage)=\"onCroppedImage($event)\" />\n * ```\n *\n * @category Inputs\n */\n@Component({\n selector: 's-image-cropper',\n templateUrl: './image-cropper.component.html',\n styleUrls: ['./image-cropper.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ImageCropperComponent implements OnInit, OnChanges {\n activeDialog = inject(ActiveDialog, { optional: true });\n public static nextId = 0;\n\n /** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */\n @Input()\n public id = `s-image-cropper-${ImageCropperComponent.nextId++}`;\n\n /** @description Controla a visibilidade do dialog de corte. @default false */\n @Input()\n public visible = false;\n\n /** @description Título exibido no cabeçalho do dialog. @default 'Recortar imagem' */\n @Input()\n public header = 'Recortar imagem';\n\n /** @description Rótulo do botão de confirmar o corte. @default 'Recortar' */\n @Input()\n public cropLabel = 'Recortar';\n\n /** @description Rótulo do botão de trocar a imagem. @default 'Trocar' */\n @Input()\n public selectAnotherLabel = 'Trocar';\n\n /** @description Rótulo do botão de remover a imagem. @default 'Remover' */\n @Input()\n public removeLabel = 'Remover';\n\n /** @description Rótulo do botão de cancelar. @default 'Cancelar' */\n @Input()\n public cancelLabel = 'Cancelar';\n\n /** @description Título do empty state quando nenhuma imagem foi selecionada. */\n @Input()\n public emptyStateTitle = 'Selecione uma foto, em seguida você poderá ajustá-la';\n\n /** @description Rótulo do botão de ação do empty state. @default 'Escolher imagem' */\n @Input()\n public emptyStateActionLabel = 'Escolher imagem';\n\n /** @description Classe do ícone exibido no empty state. @default 'fa fa-picture-o' */\n @Input()\n public emptyStateIconClass = 'fa fa-picture-o';\n\n /** @description Razão de aspecto para o recorte (ex.: `1` para quadrado, `16/9`). @default NaN (livre) */\n @Input()\n public aspectRatio = NaN;\n\n /** @description Quando `true`, exibe a área de recorte no formato circular. @default false */\n @Input()\n public rounded = false;\n\n /** @description Exibe o botão para trocar a imagem selecionada. @default true */\n @Input()\n public allowSelectAnother = true;\n\n /** @description Exibe o botão para remover a imagem. @default true */\n @Input()\n public allowRemove = true;\n\n /** @description Exibe o botão para cancelar o recorte. @default true */\n @Input()\n public allowCancel = true;\n\n /** @description URL ou base64 da imagem a ser carregada no cropper. */\n @Input()\n public imageSource?: string;\n\n /** @description Emitido quando o valor de `visible` muda, habilitando two-way binding com `[(visible)]`. */\n @Output()\n public visibleChange = new EventEmitter<boolean>();\n\n /** @description Emitido quando o usuário troca a imagem selecionada. */\n @Output()\n public changeImage = new EventEmitter();\n\n /** @description Emitido com a imagem recortada em formato base64 string. */\n @Output()\n public croppedImage = new EventEmitter<string>();\n\n /** @description Emitido com o `HTMLCanvasElement` resultante do recorte. */\n @Output()\n public croppedCanvas = new EventEmitter<HTMLCanvasElement>();\n\n /** @description Emitido quando o usuário confirma a remoção da imagem. */\n @Output()\n public removedImage = new EventEmitter();\n\n /** @description Emitido quando o usuário cancela o recorte. */\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-native\n public cancel = new EventEmitter();\n\n @ViewChild('image', { static: true })\n public image: ElementRef<HTMLImageElement> | null = null;\n\n @ContentChild(HeaderComponent, { static: true })\n public headerSection: HeaderComponent | null = null;\n\n @ContentChild(FooterComponent, { static: true })\n public footerSection: FooterComponent | null = null;\n\n public cropper: Cropper | null = null;\n\n public ngOnInit() {\n if (this.imageSource) this.initCropper();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes['imageSource'] && changes['imageSource'].currentValue) {\n this.initCropper();\n }\n }\n\n private initCropper() {\n if (isNullOrUndefined(this.image)) {\n return;\n }\n if (this.cropper) {\n this.cropper.destroy();\n }\n this.image.nativeElement.src = this.imageSource as string;\n this.cropper = new Cropper(this.image.nativeElement, {\n aspectRatio: this.rounded ? 1 : this.aspectRatio,\n guides: false,\n dragMode: 'move' as Cropper.DragMode,\n minCropBoxHeight: 2,\n minCropBoxWidth: 2,\n toggleDragModeOnDblclick: false,\n });\n }\n\n public getRoundedCanvas(sourceCanvas: HTMLCanvasElement): HTMLCanvasElement | null {\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n\n if (isNullOrUndefined(context)) return null;\n\n const width = sourceCanvas.width;\n const height = sourceCanvas.height;\n\n canvas.width = width;\n canvas.height = height;\n\n context.imageSmoothingEnabled = true;\n context.drawImage(sourceCanvas, 0, 0, width, height);\n context.globalCompositeOperation = 'destination-in';\n context.beginPath();\n context.arc(width / 2, height / 2, Math.min(width, height) / 2, 0, 2 * Math.PI, true);\n context.fill();\n\n return canvas;\n }\n\n public onCropImage() {\n if (!this.imageSource) {\n this.croppedImage.emit();\n this.croppedCanvas.emit();\n } else {\n const cropperCanvas = this.cropper?.getCroppedCanvas();\n if (cropperCanvas) {\n const canvas = this.rounded ? this.getRoundedCanvas(cropperCanvas) : cropperCanvas;\n if (canvas) {\n this.croppedCanvas.emit(canvas);\n this.croppedImage.emit(canvas.toDataURL());\n }\n }\n }\n this.visible = false;\n this.visibleChange.emit(false);\n }\n\n public onChangeImage() {\n this.changeImage.emit();\n }\n\n public onRemoveImage() {\n this.imageSource = undefined;\n this.removedImage.emit();\n }\n\n public onCancel() {\n this.visible = false;\n this.visibleChange.emit(false);\n this.cancel.emit();\n }\n\n public onModalVisibleChange(visible: boolean) {\n if (!visible) this.onCancel();\n this.visibleChange.emit(visible);\n }\n}\n\n","<div [id]=\"id\">\n @let roundedClass = rounded ? 's-image-cropper--rounded' : '';\n <s-dialog\n size=\"lg\"\n [contentClassName]=\"'s-image-cropper ' + roundedClass\"\n [header]=\"headerSection ? '' : header\"\n [(visible)]=\"visible\"\n (visibleChange)=\"onModalVisibleChange($event!)\"\n [draggable]=\"false\"\n >\n @if (headerSection) {\n <ng-template sTemplate=\"header\">\n <ng-content select=\"s-header\"></ng-content>\n </ng-template>\n }\n @if (!imageSource) {\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n [title]=\"emptyStateTitle\"\n [iconClass]=\"emptyStateIconClass\"\n [primaryActionLabel]=\"emptyStateActionLabel\"\n (primaryAction)=\"onChangeImage()\"\n >\n </s-empty-state>\n }\n <div\n [attr.data-hidden]=\"!imageSource\"\n class=\"image-container\"\n >\n <img\n [id]=\"id + '-cropper'\"\n #image\n [src]=\"imageSource || ''\"\n alt=\"cropped image\"\n />\n </div>\n <ng-template sTemplate=\"footer\">\n @if (!footerSection) {\n <div class=\"button-container\">\n @if (allowCancel) {\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (clicked)=\"onCancel()\"\n >\n </s-button>\n }\n\n <div>\n @if (imageSource && allowRemove) {\n <s-button\n [id]=\"id + '-remove-button'\"\n type=\"button\"\n priority=\"secondary\"\n [label]=\"removeLabel\"\n (clicked)=\"onRemoveImage()\"\n >\n </s-button>\n }\n @if (imageSource && allowSelectAnother) {\n <s-button\n [id]=\"id + '-select-another-button'\"\n type=\"button\"\n priority=\"secondary\"\n [label]=\"selectAnotherLabel\"\n (clicked)=\"onChangeImage()\"\n >\n </s-button>\n }\n <s-button\n [id]=\"id + '-crop-button'\"\n type=\"button\"\n [label]=\"cropLabel\"\n (clicked)=\"onCropImage()\"\n >\n </s-button>\n </div>\n </div>\n }\n @if (footerSection) {\n <ng-content select=\"s-footer\"> </ng-content>\n }\n </ng-template>\n </s-dialog>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\n\nimport { ImageCropperComponent } from './image-cropper.component';\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { StructureModule } from '@seniorsistemas/angular-components/structure';\nimport { EmptyStateModule } from '@seniorsistemas/angular-components/empty-state';\nimport { DialogComponent } from '@seniorsistemas/angular-components/dialog';\nimport { TemplateDirective, TemplateModule } from '@seniorsistemas/angular-components/template';\n\n@NgModule({\n imports: [CommonModule, ButtonModule, EmptyStateModule, StructureModule, DialogComponent, TemplateModule],\n declarations: [ImageCropperComponent],\n exports: [ImageCropperComponent, StructureModule],\n})\nexport class ImageCropperModule { }\n","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n EmbeddedViewRef,\n Injectable,\n Injector,\n} from '@angular/core';\n\nimport { Subject } from 'rxjs';\nimport { delay, takeUntil } from 'rxjs/operators';\n\nimport { ImageCropperComponent } from './image-cropper.component';\nimport { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n@Injectable()\nexport class ImageCropperService {\n public activeCropper?: ActiveCropper;\n\n constructor(\n private readonly _componentFactoryResolver: ComponentFactoryResolver,\n private readonly _appRef: ApplicationRef,\n private readonly _injector: Injector,\n ) { }\n\n public show(config?: ImageCropperConfig): void {\n if (this.activeCropper) this._destroy(this.activeCropper);\n\n const activeCropper: ActiveCropper = {\n componentRef: this._componentFactoryResolver\n .resolveComponentFactory(ImageCropperComponent)\n .create(this._injector),\n ngUnsubscribe: new Subject<void>(),\n };\n\n this.activeCropper = activeCropper;\n\n if (isNullOrUndefined(activeCropper.componentRef)) return;\n\n this._appRef.attachView(activeCropper.componentRef.hostView);\n const domElem = (activeCropper.componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n\n this._configureInstance(activeCropper, config);\n activeCropper.componentRef.instance.visible = true;\n\n activeCropper.componentRef.instance.visibleChange\n .pipe(takeUntil(this.activeCropper.ngUnsubscribe!), delay(1000))\n .subscribe((visible) => {\n if (!visible) this._destroy(activeCropper);\n });\n }\n\n private _configureInstance(activeCropper: ActiveCropper, config?: ImageCropperConfig): void {\n const instance: any = activeCropper.componentRef?.instance;\n\n if (config) {\n Object.keys(config).forEach((key) => {\n const value = (config as any)[key];\n if (typeof value !== 'function') instance[key] = value;\n else if (typeof value === 'function') {\n instance[key]\n .pipe(takeUntil(activeCropper.ngUnsubscribe!))\n .subscribe((...param: any[]) => (config as any)[key](...param));\n }\n });\n }\n\n instance.visibleChange\n .pipe(takeUntil(activeCropper.ngUnsubscribe!))\n .subscribe((visible: any) => (instance.visible = visible));\n }\n\n private _destroy(activeCropper: ActiveCropper): void {\n activeCropper.ngUnsubscribe!.next();\n activeCropper.ngUnsubscribe!.complete();\n\n if (isNullOrUndefined(activeCropper.componentRef)) return;\n\n this._appRef.detachView(activeCropper.componentRef.hostView);\n activeCropper.componentRef.destroy();\n }\n}\n\nexport interface ActiveCropper {\n componentRef?: ComponentRef<ImageCropperComponent>;\n ngUnsubscribe?: Subject<void>;\n}\n\nexport interface ImageCropperConfig {\n id?: any;\n header?: string;\n cropLabel?: string;\n selectAnotherLabel?: string;\n removeLabel?: string;\n cancelLabel?: string;\n emptyStateTitle?: string;\n emptyStateActionLabel?: string;\n emptyStateIconClass?: string;\n aspectRatio?: number;\n rounded?: boolean;\n allowSelectAnother?: boolean;\n allowRemove?: boolean;\n allowCancel?: boolean;\n imageSource?: string;\n\n cancel?: () => any;\n changeImage?: () => any;\n removedImage?: () => any;\n croppedImage?: (imageSource: string) => any;\n croppedCanvas?: (imageSource: HTMLCanvasElement) => any;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAmBA;;;;;;;;;;;;;;;AAeG;MAOU,qBAAqB,CAAA;IAC9B,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACjD,IAAA,OAAO,MAAM,GAAG,CAAC,CAAC;;AAIlB,IAAA,EAAE,GAAG,CAAmB,gBAAA,EAAA,qBAAqB,CAAC,MAAM,EAAE,EAAE,CAAC;;IAIzD,OAAO,GAAG,KAAK,CAAC;;IAIhB,MAAM,GAAG,iBAAiB,CAAC;;IAI3B,SAAS,GAAG,UAAU,CAAC;;IAIvB,kBAAkB,GAAG,QAAQ,CAAC;;IAI9B,WAAW,GAAG,SAAS,CAAC;;IAIxB,WAAW,GAAG,UAAU,CAAC;;IAIzB,eAAe,GAAG,sDAAsD,CAAC;;IAIzE,qBAAqB,GAAG,iBAAiB,CAAC;;IAI1C,mBAAmB,GAAG,iBAAiB,CAAC;;IAIxC,WAAW,GAAG,GAAG,CAAC;;IAIlB,OAAO,GAAG,KAAK,CAAC;;IAIhB,kBAAkB,GAAG,IAAI,CAAC;;IAI1B,WAAW,GAAG,IAAI,CAAC;;IAInB,WAAW,GAAG,IAAI,CAAC;;AAInB,IAAA,WAAW,CAAU;;AAIrB,IAAA,aAAa,GAAG,IAAI,YAAY,EAAW,CAAC;;AAI5C,IAAA,WAAW,GAAG,IAAI,YAAY,EAAE,CAAC;;AAIjC,IAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;;AAI1C,IAAA,aAAa,GAAG,IAAI,YAAY,EAAqB,CAAC;;AAItD,IAAA,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;;AAKlC,IAAA,MAAM,G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AA,CAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,UAAU;;;AChBX;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-image-cropper.mjs","sources":["../../projects/angular-components/image-cropper/src/lib/image-cropper/image-cropper.component.ts","../../projects/angular-components/image-cropper/src/lib/image-cropper/image-cropper.component.html","../../projects/angular-components/image-cropper/src/lib/image-cropper/image-cropper.module.ts","../../projects/angular-components/image-cropper/src/lib/image-cropper/image-cropper.service.ts","../../projects/angular-components/image-cropper/src/seniorsistemas-angular-components-image-cropper.ts"],"sourcesContent":["import {\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport Cropper from 'cropperjs';\nimport { FooterComponent, HeaderComponent } from '@seniorsistemas/angular-components/structure';\nimport { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\nimport { ActiveDialog } from '@seniorsistemas/angular-components/dialog';\n\n/**\n * @description Componente de recorte de imagem que integra a biblioteca `cropperjs`.\n * Exibe um dialog com uma área interativa para selecionar, recortar e remover imagens,\n * suportando razão de aspecto configurável, formato circular e templates de cabeçalho/rodapé.\n *\n * @example\n * ```html\n * <s-image-cropper\n * [(visible)]=\"dialogAberto\"\n * [imageSource]=\"urlDaImagem\"\n * [aspectRatio]=\"1\"\n * (croppedImage)=\"onCroppedImage($event)\" />\n * ```\n *\n * @category Inputs\n */\n@Component({\n selector: 's-image-cropper',\n templateUrl: './image-cropper.component.html',\n styleUrls: ['./image-cropper.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ImageCropperComponent implements OnInit, OnChanges {\n activeDialog = inject(ActiveDialog, { optional: true });\n public static nextId = 0;\n\n /** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */\n @Input()\n public id = `s-image-cropper-${ImageCropperComponent.nextId++}`;\n\n /** @description Controla a visibilidade do dialog de corte. @default false */\n @Input()\n public visible = false;\n\n /** @description Título exibido no cabeçalho do dialog. @default 'Recortar imagem' */\n @Input()\n public header = 'Recortar imagem';\n\n /** @description Rótulo do botão de confirmar o corte. @default 'Recortar' */\n @Input()\n public cropLabel = 'Recortar';\n\n /** @description Rótulo do botão de trocar a imagem. @default 'Trocar' */\n @Input()\n public selectAnotherLabel = 'Trocar';\n\n /** @description Rótulo do botão de remover a imagem. @default 'Remover' */\n @Input()\n public removeLabel = 'Remover';\n\n /** @description Rótulo do botão de cancelar. @default 'Cancelar' */\n @Input()\n public cancelLabel = 'Cancelar';\n\n /** @description Título do empty state quando nenhuma imagem foi selecionada. */\n @Input()\n public emptyStateTitle = 'Selecione uma foto, em seguida você poderá ajustá-la';\n\n /** @description Rótulo do botão de ação do empty state. @default 'Escolher imagem' */\n @Input()\n public emptyStateActionLabel = 'Escolher imagem';\n\n /** @description Classe do ícone exibido no empty state. @default 'fa fa-picture-o' */\n @Input()\n public emptyStateIconClass = 'fa fa-picture-o';\n\n /** @description Razão de aspecto para o recorte (ex.: `1` para quadrado, `16/9`). @default NaN (livre) */\n @Input()\n public aspectRatio = NaN;\n\n /** @description Quando `true`, exibe a área de recorte no formato circular. @default false */\n @Input()\n public rounded = false;\n\n /** @description Exibe o botão para trocar a imagem selecionada. @default true */\n @Input()\n public allowSelectAnother = true;\n\n /** @description Exibe o botão para remover a imagem. @default true */\n @Input()\n public allowRemove = true;\n\n /** @description Exibe o botão para cancelar o recorte. @default true */\n @Input()\n public allowCancel = true;\n\n /** @description URL ou base64 da imagem a ser carregada no cropper. */\n @Input()\n public imageSource?: string;\n\n /** @description Emitido quando o valor de `visible` muda, habilitando two-way binding com `[(visible)]`. */\n @Output()\n public visibleChange = new EventEmitter<boolean>();\n\n /** @description Emitido quando o usuário troca a imagem selecionada. */\n @Output()\n public changeImage = new EventEmitter();\n\n /** @description Emitido com a imagem recortada em formato base64 string. */\n @Output()\n public croppedImage = new EventEmitter<string>();\n\n /** @description Emitido com o `HTMLCanvasElement` resultante do recorte. */\n @Output()\n public croppedCanvas = new EventEmitter<HTMLCanvasElement>();\n\n /** @description Emitido quando o usuário confirma a remoção da imagem. */\n @Output()\n public removedImage = new EventEmitter();\n\n /** @description Emitido quando o usuário cancela o recorte. */\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-native\n public cancel = new EventEmitter();\n\n @ViewChild('image', { static: true })\n public image: ElementRef<HTMLImageElement> | null = null;\n\n @ContentChild(HeaderComponent, { static: true })\n public headerSection: HeaderComponent | null = null;\n\n @ContentChild(FooterComponent, { static: true })\n public footerSection: FooterComponent | null = null;\n\n public cropper: Cropper | null = null;\n\n public ngOnInit() {\n if (this.imageSource) this.initCropper();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes['imageSource'] && changes['imageSource'].currentValue) {\n this.initCropper();\n }\n }\n\n private initCropper() {\n if (isNullOrUndefined(this.image)) {\n return;\n }\n if (this.cropper) {\n this.cropper.destroy();\n }\n this.image.nativeElement.src = this.imageSource as string;\n this.cropper = new Cropper(this.image.nativeElement, {\n aspectRatio: this.rounded ? 1 : this.aspectRatio,\n guides: false,\n dragMode: 'move' as Cropper.DragMode,\n minCropBoxHeight: 2,\n minCropBoxWidth: 2,\n toggleDragModeOnDblclick: false,\n });\n }\n\n public getRoundedCanvas(sourceCanvas: HTMLCanvasElement): HTMLCanvasElement | null {\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n\n if (isNullOrUndefined(context)) return null;\n\n const width = sourceCanvas.width;\n const height = sourceCanvas.height;\n\n canvas.width = width;\n canvas.height = height;\n\n context.imageSmoothingEnabled = true;\n context.drawImage(sourceCanvas, 0, 0, width, height);\n context.globalCompositeOperation = 'destination-in';\n context.beginPath();\n context.arc(width / 2, height / 2, Math.min(width, height) / 2, 0, 2 * Math.PI, true);\n context.fill();\n\n return canvas;\n }\n\n public onCropImage() {\n if (!this.imageSource) {\n this.croppedImage.emit();\n this.croppedCanvas.emit();\n } else {\n const cropperCanvas = this.cropper?.getCroppedCanvas();\n if (cropperCanvas) {\n const canvas = this.rounded ? this.getRoundedCanvas(cropperCanvas) : cropperCanvas;\n if (canvas) {\n this.croppedCanvas.emit(canvas);\n this.croppedImage.emit(canvas.toDataURL());\n }\n }\n }\n this.visible = false;\n this.visibleChange.emit(false);\n }\n\n public onChangeImage() {\n this.changeImage.emit();\n }\n\n public onRemoveImage() {\n this.imageSource = undefined;\n this.removedImage.emit();\n }\n\n public onCancel() {\n this.visible = false;\n this.visibleChange.emit(false);\n this.cancel.emit();\n }\n\n public onModalVisibleChange(visible: boolean) {\n if (!visible) this.onCancel();\n this.visibleChange.emit(visible);\n }\n}\n\n","<div [id]=\"id\">\n @let roundedClass = rounded ? 's-image-cropper--rounded' : '';\n <s-dialog\n size=\"lg\"\n [contentClassName]=\"'s-image-cropper ' + roundedClass\"\n [header]=\"headerSection ? '' : header\"\n [(visible)]=\"visible\"\n (visibleChange)=\"onModalVisibleChange($event!)\"\n [draggable]=\"false\"\n >\n @if (headerSection) {\n <ng-template sTemplate=\"header\">\n <ng-content select=\"s-header\"></ng-content>\n </ng-template>\n }\n @if (!imageSource) {\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n [title]=\"emptyStateTitle\"\n [iconClass]=\"emptyStateIconClass\"\n [primaryActionLabel]=\"emptyStateActionLabel\"\n (primaryAction)=\"onChangeImage()\"\n >\n </s-empty-state>\n }\n <div\n [attr.data-hidden]=\"!imageSource\"\n class=\"image-container\"\n >\n <img\n [id]=\"id + '-cropper'\"\n #image\n [src]=\"imageSource || ''\"\n alt=\"cropped image\"\n />\n </div>\n <ng-template sTemplate=\"footer\">\n @if (!footerSection) {\n <div class=\"button-container\">\n @if (allowCancel) {\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (clicked)=\"onCancel()\"\n >\n </s-button>\n }\n\n <div>\n @if (imageSource && allowRemove) {\n <s-button\n [id]=\"id + '-remove-button'\"\n type=\"button\"\n priority=\"secondary\"\n [label]=\"removeLabel\"\n (clicked)=\"onRemoveImage()\"\n >\n </s-button>\n }\n @if (imageSource && allowSelectAnother) {\n <s-button\n [id]=\"id + '-select-another-button'\"\n type=\"button\"\n priority=\"secondary\"\n [label]=\"selectAnotherLabel\"\n (clicked)=\"onChangeImage()\"\n >\n </s-button>\n }\n <s-button\n [id]=\"id + '-crop-button'\"\n type=\"button\"\n [label]=\"cropLabel\"\n (clicked)=\"onCropImage()\"\n >\n </s-button>\n </div>\n </div>\n }\n @if (footerSection) {\n <ng-content select=\"s-footer\"> </ng-content>\n }\n </ng-template>\n </s-dialog>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\n\nimport { ImageCropperComponent } from './image-cropper.component';\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { StructureModule } from '@seniorsistemas/angular-components/structure';\nimport { EmptyStateModule } from '@seniorsistemas/angular-components/empty-state';\nimport { DialogComponent } from '@seniorsistemas/angular-components/dialog';\nimport { TemplateDirective, TemplateModule } from '@seniorsistemas/angular-components/template';\n\n@NgModule({\n imports: [CommonModule, ButtonModule, EmptyStateModule, StructureModule, DialogComponent, TemplateModule],\n declarations: [ImageCropperComponent],\n exports: [ImageCropperComponent, StructureModule],\n})\nexport class ImageCropperModule { }\n","import { ApplicationRef, ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, Injectable, Injector, inject } from '@angular/core';\n\nimport { Subject } from 'rxjs';\nimport { delay, takeUntil } from 'rxjs/operators';\n\nimport { ImageCropperComponent } from './image-cropper.component';\nimport { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n@Injectable()\nexport class ImageCropperService {\n private readonly _componentFactoryResolver = inject(ComponentFactoryResolver);\n private readonly _appRef = inject(ApplicationRef);\n private readonly _injector = inject(Injector);\n\n public activeCropper?: ActiveCropper;\n\n public show(config?: ImageCropperConfig): void {\n if (this.activeCropper) this._destroy(this.activeCropper);\n\n const activeCropper: ActiveCropper = {\n componentRef: this._componentFactoryResolver\n .resolveComponentFactory(ImageCropperComponent)\n .create(this._injector),\n ngUnsubscribe: new Subject<void>(),\n };\n\n this.activeCropper = activeCropper;\n\n if (isNullOrUndefined(activeCropper.componentRef)) return;\n\n this._appRef.attachView(activeCropper.componentRef.hostView);\n const domElem = (activeCropper.componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n\n this._configureInstance(activeCropper, config);\n activeCropper.componentRef.instance.visible = true;\n\n activeCropper.componentRef.instance.visibleChange\n .pipe(takeUntil(this.activeCropper.ngUnsubscribe!), delay(1000))\n .subscribe((visible) => {\n if (!visible) this._destroy(activeCropper);\n });\n }\n\n private _configureInstance(activeCropper: ActiveCropper, config?: ImageCropperConfig): void {\n const instance: any = activeCropper.componentRef?.instance;\n\n if (config) {\n Object.keys(config).forEach((key) => {\n const value = (config as any)[key];\n if (typeof value !== 'function') instance[key] = value;\n else if (typeof value === 'function') {\n instance[key]\n .pipe(takeUntil(activeCropper.ngUnsubscribe!))\n .subscribe((...param: any[]) => (config as any)[key](...param));\n }\n });\n }\n\n instance.visibleChange\n .pipe(takeUntil(activeCropper.ngUnsubscribe!))\n .subscribe((visible: any) => (instance.visible = visible));\n }\n\n private _destroy(activeCropper: ActiveCropper): void {\n activeCropper.ngUnsubscribe!.next();\n activeCropper.ngUnsubscribe!.complete();\n\n if (isNullOrUndefined(activeCropper.componentRef)) return;\n\n this._appRef.detachView(activeCropper.componentRef.hostView);\n activeCropper.componentRef.destroy();\n }\n}\n\nexport interface ActiveCropper {\n componentRef?: ComponentRef<ImageCropperComponent>;\n ngUnsubscribe?: Subject<void>;\n}\n\nexport interface ImageCropperConfig {\n id?: any;\n header?: string;\n cropLabel?: string;\n selectAnotherLabel?: string;\n removeLabel?: string;\n cancelLabel?: string;\n emptyStateTitle?: string;\n emptyStateActionLabel?: string;\n emptyStateIconClass?: string;\n aspectRatio?: number;\n rounded?: boolean;\n allowSelectAnother?: boolean;\n allowRemove?: boolean;\n allowCancel?: boolean;\n imageSource?: string;\n\n cancel?: () => any;\n changeImage?: () => any;\n removedImage?: () => any;\n croppedImage?: (imageSource: string) => any;\n croppedCanvas?: (imageSource: HTMLCanvasElement) => any;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAmBA;;;;;;;;;;;;;;;AAeG;MAOU,qBAAqB,CAAA;IAC9B,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACjD,IAAA,OAAO,MAAM,GAAG,CAAC,CAAC;;AAIlB,IAAA,EAAE,GAAG,CAAmB,gBAAA,EAAA,qBAAqB,CAAC,MAAM,EAAE,EAAE,CAAC;;IAIzD,OAAO,GAAG,KAAK,CAAC;;IAIhB,MAAM,GAAG,iBAAiB,CAAC;;IAI3B,SAAS,GAAG,UAAU,CAAC;;IAIvB,kBAAkB,GAAG,QAAQ,CAAC;;IAI9B,WAAW,GAAG,SAAS,CAAC;;IAIxB,WAAW,GAAG,UAAU,CAAC;;IAIzB,eAAe,GAAG,sDAAsD,CAAC;;IAIzE,qBAAqB,GAAG,iBAAiB,CAAC;;IAI1C,mBAAmB,GAAG,iBAAiB,CAAC;;IAIxC,WAAW,GAAG,GAAG,CAAC;;IAIlB,OAAO,GAAG,KAAK,CAAC;;IAIhB,kBAAkB,GAAG,IAAI,CAAC;;IAI1B,WAAW,GAAG,IAAI,CAAC;;IAInB,WAAW,GAAG,IAAI,CAAC;;AAInB,IAAA,WAAW,CAAU;;AAIrB,IAAA,aAAa,GAAG,IAAI,YAAY,EAAW,CAAC;;AAI5C,IAAA,WAAW,GAAG,IAAI,YAAY,EAAE,CAAC;;AAIjC,IAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;;AAI1C,IAAA,aAAa,GAAG,I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2
|
-
import { EventEmitter, Directive, Output, HostListener, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, EventEmitter, Directive, Output, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -17,19 +17,16 @@ import { CommonModule } from '@angular/common';
|
|
|
17
17
|
* @category Data
|
|
18
18
|
*/
|
|
19
19
|
class InfiniteScrollDirective {
|
|
20
|
-
el;
|
|
20
|
+
el = inject(ElementRef);
|
|
21
21
|
/** @description Emitido quando o usuário atinge o final do elemento com scroll. */
|
|
22
22
|
scrolled = new EventEmitter();
|
|
23
|
-
constructor(el) {
|
|
24
|
-
this.el = el;
|
|
25
|
-
}
|
|
26
23
|
scroll() {
|
|
27
24
|
if (this.el.nativeElement.scrollTop >
|
|
28
25
|
this.el.nativeElement.scrollHeight - this.el.nativeElement.offsetHeight - 2) {
|
|
29
26
|
this.scrolled.emit();
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InfiniteScrollDirective, deps: [
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InfiniteScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
30
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: InfiniteScrollDirective, selector: "[sInfiniteScroll]", outputs: { scrolled: "scrolled" }, host: { listeners: { "scroll": "scroll()" } }, ngImport: i0 });
|
|
34
31
|
}
|
|
35
32
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InfiniteScrollDirective, decorators: [{
|
|
@@ -37,7 +34,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
37
34
|
args: [{
|
|
38
35
|
selector: '[sInfiniteScroll]',
|
|
39
36
|
}]
|
|
40
|
-
}],
|
|
37
|
+
}], propDecorators: { scrolled: [{
|
|
41
38
|
type: Output
|
|
42
39
|
}], scroll: [{
|
|
43
40
|
type: HostListener,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-infinite-scroll.mjs","sources":["../../projects/angular-components/infinite-scroll/src/lib/infinite-scroll/infinite-scroll.directive.ts","../../projects/angular-components/infinite-scroll/src/lib/infinite-scroll/infinite-scroll.module.ts","../../projects/angular-components/infinite-scroll/src/seniorsistemas-angular-components-infinite-scroll.ts"],"sourcesContent":["import { ElementRef, EventEmitter, Directive, HostListener, Output } from '@angular/core';\n\n/**\n * @description Diretiva de scroll infinito que detecta quando o usuário chega\n * ao final do elemento e emite o evento `scrolled`. Deve ser aplicada a um\n * elemento com overflow e scroll habilitado.\n *\n * @example\n * ```html\n * <div sInfiniteScroll (scrolled)=\"carregarMais()\" style=\"overflow-y: auto; height: 400px\">\n * <!-- itens -->\n * </div>\n * ```\n *\n * @category Data\n */\n@Directive({\n selector: '[sInfiniteScroll]',\n})\nexport class InfiniteScrollDirective {\n /** @description Emitido quando o usuário atinge o final do elemento com scroll. */\n @Output()\n public scrolled = new EventEmitter<number>();\n\n
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-infinite-scroll.mjs","sources":["../../projects/angular-components/infinite-scroll/src/lib/infinite-scroll/infinite-scroll.directive.ts","../../projects/angular-components/infinite-scroll/src/lib/infinite-scroll/infinite-scroll.module.ts","../../projects/angular-components/infinite-scroll/src/seniorsistemas-angular-components-infinite-scroll.ts"],"sourcesContent":["import { ElementRef, EventEmitter, Directive, HostListener, Output, inject } from '@angular/core';\n\n/**\n * @description Diretiva de scroll infinito que detecta quando o usuário chega\n * ao final do elemento e emite o evento `scrolled`. Deve ser aplicada a um\n * elemento com overflow e scroll habilitado.\n *\n * @example\n * ```html\n * <div sInfiniteScroll (scrolled)=\"carregarMais()\" style=\"overflow-y: auto; height: 400px\">\n * <!-- itens -->\n * </div>\n * ```\n *\n * @category Data\n */\n@Directive({\n selector: '[sInfiniteScroll]',\n})\nexport class InfiniteScrollDirective {\n private readonly el = inject(ElementRef);\n\n /** @description Emitido quando o usuário atinge o final do elemento com scroll. */\n @Output()\n public scrolled = new EventEmitter<number>();\n\n @HostListener('scroll')\n public scroll() {\n if (\n this.el.nativeElement.scrollTop >\n this.el.nativeElement.scrollHeight - this.el.nativeElement.offsetHeight - 2\n ) {\n this.scrolled.emit();\n }\n }\n}\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { InfiniteScrollDirective } from './infinite-scroll.directive';\n\n@NgModule({\n declarations: [InfiniteScrollDirective],\n imports: [CommonModule],\n exports: [InfiniteScrollDirective],\n})\nexport class InfiniteScrollModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;;;;;;AAaG;MAIU,uBAAuB,CAAA;AACf,IAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;;AAIlC,IAAA,QAAQ,GAAG,IAAI,YAAY,EAAU,CAAC;IAGtC,MAAM,GAAA;AACT,QAAA,IACI,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS;AAC/B,YAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,GAAG,CAAC,EAC7E;AACE,YAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;SACxB;KACJ;wGAfQ,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;4FAAvB,uBAAuB,EAAA,QAAA,EAAA,mBAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAA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CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, Directive, Input, NgModule } from '@angular/core';
|
|
4
|
+
import { Component, inject, TemplateRef, ViewContainerRef, Directive, Input, NgModule } from '@angular/core';
|
|
5
5
|
import * as i1 from '@seniorsistemas/angular-components/tooltip';
|
|
6
6
|
import { TooltipModule } from '@seniorsistemas/angular-components/tooltip';
|
|
7
7
|
|
|
@@ -31,8 +31,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
31
31
|
* @category Overlay
|
|
32
32
|
*/
|
|
33
33
|
class InfoSignDirective {
|
|
34
|
-
templateRef;
|
|
35
|
-
viewContainer;
|
|
34
|
+
templateRef = inject(TemplateRef);
|
|
35
|
+
viewContainer = inject(ViewContainerRef);
|
|
36
36
|
/**
|
|
37
37
|
* @description Mensagem exibida no tooltip do ícone de informação. Campo obrigatório.
|
|
38
38
|
*/
|
|
@@ -55,10 +55,6 @@ class InfoSignDirective {
|
|
|
55
55
|
*/
|
|
56
56
|
useFocusedInputRef = true;
|
|
57
57
|
componentRef = null;
|
|
58
|
-
constructor(templateRef, viewContainer) {
|
|
59
|
-
this.templateRef = templateRef;
|
|
60
|
-
this.viewContainer = viewContainer;
|
|
61
|
-
}
|
|
62
58
|
ngOnChanges() {
|
|
63
59
|
this.createInfoSign();
|
|
64
60
|
}
|
|
@@ -90,7 +86,7 @@ class InfoSignDirective {
|
|
|
90
86
|
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
91
87
|
}
|
|
92
88
|
}
|
|
93
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InfoSignDirective, deps: [
|
|
89
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InfoSignDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
94
90
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: InfoSignDirective, selector: "[sInfoSign]", inputs: { sInfoSign: "sInfoSign", displayTime: ["sInfoSignDisplayTime", "displayTime"], focusedInputRef: ["sInfoSignFocusedInputRef", "focusedInputRef"], useFocusedInputRef: ["sInfoSignUseFocusedInputRef", "useFocusedInputRef"] }, usesOnChanges: true, ngImport: i0 });
|
|
95
91
|
}
|
|
96
92
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InfoSignDirective, decorators: [{
|
|
@@ -98,7 +94,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
98
94
|
args: [{
|
|
99
95
|
selector: '[sInfoSign]',
|
|
100
96
|
}]
|
|
101
|
-
}],
|
|
97
|
+
}], propDecorators: { sInfoSign: [{
|
|
102
98
|
type: Input,
|
|
103
99
|
args: [{ required: true }]
|
|
104
100
|
}], displayTime: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-info-sign.mjs","sources":["../../projects/angular-components/info-sign/src/lib/info-sign/components/info-sign/info-sign.component.ts","../../projects/angular-components/info-sign/src/lib/info-sign/components/info-sign/info-sign.component.html","../../projects/angular-components/info-sign/src/lib/info-sign/info-sign.directive.ts","../../projects/angular-components/info-sign/src/lib/info-sign/info-sign.module.ts","../../projects/angular-components/info-sign/src/seniorsistemas-angular-components-info-sign.ts"],"sourcesContent":["import { Component, TemplateRef } from \"@angular/core\";\n\n@Component({\n selector: \"s-info-sign-component\",\n templateUrl: \"./info-sign.component.html\",\n styleUrls: [\"./info-sign.component.scss\"],\n})\nexport class InfoSignComponent {\n public templateRef: TemplateRef<any> | null = null;\n public tooltip?: string;\n public displayTime?: number;\n public focusedInputRef: HTMLInputElement | null = null;\n}\n","<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n [displayTime]=\"displayTime\"\n mobileBehavior=\"tap\"\n [showDelay]=\"0\"\n [tooltipEvent]=\"focusedInputRef ? 'focus' : 'hover'\"\n [focusedInputRef]=\"focusedInputRef\">\n </i>\n</span>\n","import {
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-info-sign.mjs","sources":["../../projects/angular-components/info-sign/src/lib/info-sign/components/info-sign/info-sign.component.ts","../../projects/angular-components/info-sign/src/lib/info-sign/components/info-sign/info-sign.component.html","../../projects/angular-components/info-sign/src/lib/info-sign/info-sign.directive.ts","../../projects/angular-components/info-sign/src/lib/info-sign/info-sign.module.ts","../../projects/angular-components/info-sign/src/seniorsistemas-angular-components-info-sign.ts"],"sourcesContent":["import { Component, TemplateRef } from \"@angular/core\";\n\n@Component({\n selector: \"s-info-sign-component\",\n templateUrl: \"./info-sign.component.html\",\n styleUrls: [\"./info-sign.component.scss\"],\n})\nexport class InfoSignComponent {\n public templateRef: TemplateRef<any> | null = null;\n public tooltip?: string;\n public displayTime?: number;\n public focusedInputRef: HTMLInputElement | null = null;\n}\n","<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n [displayTime]=\"displayTime\"\n mobileBehavior=\"tap\"\n [showDelay]=\"0\"\n [tooltipEvent]=\"focusedInputRef ? 'focus' : 'hover'\"\n [focusedInputRef]=\"focusedInputRef\">\n </i>\n</span>\n","import { ComponentRef, Directive, Input, OnChanges, OnDestroy, OnInit, TemplateRef, ViewContainerRef, inject } from '@angular/core';\n\nimport { InfoSignComponent } from './components/info-sign/info-sign.component';\n\n/**\n * @description Diretiva estrutural que exibe um ícone de informação ao lado do elemento hospedeiro.\n * Ao interagir com o ícone, um tooltip com a mensagem configurada é exibido temporariamente.\n * Suporta sincronização de posição com um campo de input referenciado.\n *\n * @example\n * ```html\n * <input *sInfoSign=\"'Informe seu CPF'; displayTime: 4000\" type=\"text\" />\n * ```\n *\n * @category Overlay\n */\n@Directive({\n selector: '[sInfoSign]',\n})\nexport class InfoSignDirective implements OnChanges, OnInit, OnDestroy {\n private readonly templateRef = inject<TemplateRef<any>>(TemplateRef);\n private readonly viewContainer = inject(ViewContainerRef);\n\n /**\n * @description Mensagem exibida no tooltip do ícone de informação. Campo obrigatório.\n */\n @Input({ required: true })\n public sInfoSign!: string;\n\n /**\n * @description Tempo em milissegundos que o tooltip permanece visível após ser exibido.\n *\n * @default 5000\n */\n @Input('sInfoSignDisplayTime')\n public displayTime: number = 5000;\n\n /**\n * @description Referência a um elemento de input HTML para posicionamento relativo do info sign.\n * Utilizado quando `useFocusedInputRef` é `true`.\n */\n @Input('sInfoSignFocusedInputRef')\n public focusedInputRef: HTMLInputElement | HTMLElement | undefined | null = null;\n\n /**\n * @description Quando `true`, utiliza `focusedInputRef` para calcular o posicionamento do ícone.\n *\n * @default true\n */\n @Input('sInfoSignUseFocusedInputRef') public useFocusedInputRef = true;\n\n private componentRef: ComponentRef<InfoSignComponent> | null = null;\n\n public ngOnChanges(): void {\n this.createInfoSign();\n }\n\n public ngOnInit(): void {\n this.createInfoSign();\n }\n\n public ngOnDestroy(): void {\n if (this.componentRef) {\n this.componentRef.destroy();\n }\n }\n\n private createInfoSign(): void {\n if (!this.componentRef && this.sInfoSign) {\n this.viewContainer.clear();\n this.componentRef = this.viewContainer.createComponent(InfoSignComponent);\n const _infoSignComponent = this.componentRef.instance as InfoSignComponent;\n _infoSignComponent.templateRef = this.templateRef;\n _infoSignComponent.tooltip = this.sInfoSign;\n _infoSignComponent.displayTime = this.displayTime;\n if (this.useFocusedInputRef && this.focusedInputRef) {\n _infoSignComponent.focusedInputRef = this.focusedInputRef as HTMLInputElement;\n }\n } else if (this.componentRef && this.sInfoSign) {\n this.componentRef.instance.tooltip = this.sInfoSign;\n } else {\n this.viewContainer.clear();\n this.viewContainer.createEmbeddedView(this.templateRef);\n }\n }\n}\n\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { InfoSignComponent } from './components/info-sign/info-sign.component';\nimport { InfoSignDirective } from './info-sign.directive';\nimport { TooltipModule } from '@seniorsistemas/angular-components/tooltip';\n\n@NgModule({\n imports: [TooltipModule, CommonModule],\n declarations: [InfoSignDirective, InfoSignComponent],\n exports: [InfoSignDirective],\n})\nexport class InfoSignModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAOa,iBAAiB,CAAA;IACnB,WAAW,GAA4B,IAAI,CAAC;AAC5C,IAAA,OAAO,CAAU;AACjB,IAAA,WAAW,CAAU;IACrB,eAAe,GAA4B,IAAI,CAAC;wGAJ9C,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,6DCP9B,+cAcA,EAAA,MAAA,EAAA,CAAA,8HAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,cAAA,EAAA,QAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,oBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CA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