@seniorsistemas/angular-components 19.9.15-develop-11ab86f5 → 19.9.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -84
- package/accordion/README.md +4 -5
- package/accordion/lib/accordion/accordion.module.d.ts +0 -7
- package/alert/lib/alert/alert.module.d.ts +0 -7
- package/badge/README.md +4 -5
- package/badge/lib/badge/badge.module.d.ts +0 -10
- package/bignumber-input/README.md +4 -5
- package/bignumber-input/lib/bignumber-input/bignumber-input.directive.d.ts +39 -16
- package/bignumber-input/lib/bignumber-input/bignumber-input.module.d.ts +0 -7
- package/breadcrumb/README.md +4 -5
- package/breadcrumb/lib/dynamic-breadcrumb/dynamic-breadcrumb.module.d.ts +1 -5
- package/button/lib/button/button.module.d.ts +0 -7
- package/calendar-mask/README.md +4 -5
- package/calendar-mask/lib/calendar-mask/calendar-mask.module.d.ts +0 -7
- package/card/README.md +5 -6
- package/card/lib/card/card.module.d.ts +0 -7
- package/chat/README.md +8 -11
- package/chat/lib/chat/chat.module.d.ts +0 -7
- package/checkbox-list/README.md +4 -5
- package/checkbox-list/lib/checkbox-list/checkbox-list.module.d.ts +0 -7
- package/chips/README.md +4 -5
- package/chips/lib/chips/chips.module.d.ts +0 -7
- package/code-editor/README.md +4 -5
- package/code-editor/lib/code-editor/code-editor.module.d.ts +0 -7
- package/collapse-link/README.md +4 -5
- package/collapse-link/lib/collapse-link/collapse-link.module.d.ts +0 -7
- package/common/lib/angular-components.module.d.ts +0 -9
- package/common/lib/svg-factory/svg-factory.module.d.ts +0 -7
- package/common/public-api.d.ts +0 -1
- package/content-generator/README.md +2 -2
- package/content-generator/lib/content-generator/content-generator.module.d.ts +0 -7
- package/control-errors/README.md +2 -2
- package/control-errors/lib/control-errors/control-errors.module.d.ts +0 -7
- package/country-phone-picker/README.md +2 -2
- package/country-phone-picker/lib/country-phone-picker/country-phone-picker.module.d.ts +0 -7
- package/currency/README.md +1 -1
- package/custom-fields/README.md +3 -14
- package/custom-fields/lib/custom-fields/custom-fields.module.d.ts +0 -7
- package/custom-fields/lib/custom-fields/models/index.d.ts +0 -1
- package/dialog/README.md +1 -1
- package/drawer/README.md +4 -8
- package/drawer/lib/drawer/drawer.module.d.ts +0 -10
- package/dynamic-form/README.md +2 -18
- package/dynamic-form/dynamic-form/dynamic-form.module.d.ts +0 -7
- package/dynamic-form/dynamic-form/form-field/addon-config.d.ts +1 -10
- package/dynamic-form/dynamic-form/form-field/configurations/fields/currency-field.d.ts +15 -15
- package/dynamic-form/dynamic-form/form-field/configurations/fields/number-field.d.ts +6 -8
- package/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.d.ts +2 -5
- package/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.d.ts +664 -0
- package/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.d.ts +29 -0
- package/dynamic-form/public-api.d.ts +1 -0
- package/editable-overlay/README.md +2 -2
- package/editable-overlay/lib/editable-overlay/editable-overlay.module.d.ts +0 -7
- package/empty-state/README.md +2 -5
- package/empty-state/lib/empty-state/empty-state.module.d.ts +0 -7
- package/esm2022/accordion/lib/accordion/accordion.module.mjs +1 -8
- package/esm2022/alert/lib/alert/alert.module.mjs +1 -8
- package/esm2022/badge/lib/badge/badge.module.mjs +1 -11
- package/esm2022/bignumber-input/lib/bignumber-input/bignumber-input.directive.mjs +127 -19
- package/esm2022/bignumber-input/lib/bignumber-input/bignumber-input.module.mjs +1 -8
- package/esm2022/breadcrumb/lib/dynamic-breadcrumb/dynamic-breadcrumb.module.mjs +2 -6
- package/esm2022/button/lib/button/button.module.mjs +1 -8
- package/esm2022/calendar-mask/lib/calendar-mask/calendar-mask.module.mjs +1 -8
- package/esm2022/card/lib/card/card.module.mjs +1 -8
- package/esm2022/chat/lib/chat/chat.module.mjs +1 -8
- package/esm2022/checkbox-list/lib/checkbox-list/checkbox-list.module.mjs +1 -8
- package/esm2022/chips/lib/chips/chips.module.mjs +1 -8
- package/esm2022/code-editor/lib/code-editor/code-editor.component.mjs +1 -10
- package/esm2022/code-editor/lib/code-editor/code-editor.module.mjs +15 -9
- package/esm2022/collapse-link/lib/collapse-link/collapse-link.module.mjs +1 -8
- package/esm2022/common/lib/angular-components.module.mjs +1 -10
- package/esm2022/common/lib/svg-factory/svg-factory.module.mjs +1 -8
- package/esm2022/common/public-api.mjs +1 -2
- package/esm2022/content-generator/lib/content-generator/content-generator.module.mjs +1 -8
- package/esm2022/control-errors/lib/control-errors/control-errors.module.mjs +1 -8
- package/esm2022/country-phone-picker/lib/country-phone-picker/country-phone-picker.module.mjs +1 -8
- package/esm2022/country-phone-picker/lib/country-phone-picker/country-phone-picker.service.mjs +3 -4
- package/esm2022/custom-fields/lib/custom-fields/custom-fields.component.mjs +13 -17
- package/esm2022/custom-fields/lib/custom-fields/custom-fields.module.mjs +1 -8
- package/esm2022/custom-fields/lib/custom-fields/custom-fields.service.mjs +3 -4
- package/esm2022/custom-fields/lib/custom-fields/models/custom-field-type.mjs +2 -4
- package/esm2022/custom-fields/lib/custom-fields/models/index.mjs +1 -2
- package/esm2022/drawer/lib/drawer/drawer.module.mjs +1 -11
- package/esm2022/dynamic-form/dynamic-form/dynamic-form.module.mjs +1 -8
- package/esm2022/dynamic-form/dynamic-form/form-field/addon-config.mjs +2 -6
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/currency-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/number-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.mjs +10 -33
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.mjs +96 -0
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.mjs +124 -0
- package/esm2022/dynamic-form/public-api.mjs +7 -2
- package/esm2022/editable-overlay/lib/editable-overlay/editable-overlay.module.mjs +1 -8
- package/esm2022/empty-state/lib/empty-state/empty-state.module.mjs +1 -8
- package/esm2022/fieldset/lib/fieldset/fieldset.module.mjs +1 -8
- package/esm2022/file-picker/lib/file-picker/file-picker.module.mjs +1 -8
- package/esm2022/file-picker/lib/file-picker/file-picker.service.mjs +3 -4
- package/esm2022/gantt/lib/gantt/gantt.module.mjs +1 -8
- package/esm2022/global-search/lib/global-search/global-search.module.mjs +1 -19
- package/esm2022/grid-menu/lib/grid-menu/grid-menu.module.mjs +1 -8
- package/esm2022/help-popover/lib/help-popover/help-popover.module.mjs +1 -8
- package/esm2022/image-cropper/lib/image-cropper/image-cropper.module.mjs +1 -12
- package/esm2022/image-cropper/lib/image-cropper/image-cropper.service.mjs +3 -4
- package/esm2022/infinite-scroll/lib/infinite-scroll/infinite-scroll.module.mjs +1 -8
- package/esm2022/info-sign/lib/info-sign/info-sign.module.mjs +1 -8
- package/esm2022/inline-edit/lib/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.mjs +5 -5
- package/esm2022/inline-edit/lib/inline-edit/inline-edit.module.mjs +1 -8
- package/esm2022/input-group/lib/input-group/input-group.module.mjs +1 -8
- package/esm2022/input-mask/lib/input-mask/input-mask.module.mjs +1 -8
- package/esm2022/input-text/lib/input-text/input-text.module.mjs +1 -8
- package/esm2022/insights/lib/insights/insights.module.mjs +1 -11
- package/esm2022/kanban/lib/kanban/kanban-event.service.mjs +3 -4
- package/esm2022/kanban/lib/kanban/kanban.module.mjs +1 -11
- package/esm2022/label-value/lib/label-value/label-value.module.mjs +1 -8
- package/esm2022/loading-state/lib/loading-state/loading-state.module.mjs +1 -8
- package/esm2022/locale/lib/locale/locale.module.mjs +1 -14
- package/esm2022/locale/lib/locale/locale.service.mjs +3 -4
- package/esm2022/locale/lib/locale/options/index.mjs +13 -1
- package/esm2022/locale/lib/locale/pipes/localized-bignumber-impure.pipe.mjs +1 -1
- package/esm2022/locale/lib/locale/pipes/localized-bignumber.pipe.mjs +2 -10
- package/esm2022/locale/public-api.mjs +1 -2
- package/esm2022/localized-number-input/lib/localized-number-input/localized-number-input.directive.mjs +1 -5
- package/esm2022/localized-number-input/lib/localized-number-input/localized-number-input.module.mjs +1 -8
- package/esm2022/mask/lib/mask/mask-formatter.module.mjs +1 -8
- package/esm2022/mouse-events/lib/mouse-events/mouse-events.module.mjs +1 -8
- package/esm2022/navigation-button/lib/navigation-button/navigation-button.module.mjs +1 -8
- package/esm2022/number-input/lib/number-input/number-input.directive.mjs +2 -2
- package/esm2022/number-input/lib/number-input/number-input.module.mjs +2 -9
- package/esm2022/numeric/lib/numeric.module.mjs +1 -8
- package/esm2022/numeric-mask/lib/numeric-mask/numeric-mask.directive.mjs +15 -178
- package/esm2022/numeric-mask/lib/numeric-mask/numeric-mask.module.mjs +1 -8
- package/esm2022/object-card/lib/object-card/object-card.module.mjs +1 -12
- package/esm2022/panel/lib/panel/panel.module.mjs +1 -11
- package/esm2022/password-strength/lib/password-strength/password-strength.module.mjs +1 -8
- package/esm2022/picklist/lib/picklist/picklist.module.mjs +1 -8
- package/esm2022/pin-code-field/lib/pin-code-field.module.mjs +1 -8
- package/esm2022/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.module.mjs +1 -8
- package/esm2022/progressbar/lib/progressbar/progressbar.module.mjs +1 -8
- package/esm2022/rating-scale/lib/rating-scale/rating-scale.module.mjs +1 -8
- package/esm2022/select/lib/select/select.component.mjs +3 -16
- package/esm2022/select-button/lib/select-button/select-button.module.mjs +1 -8
- package/esm2022/shared/lib/shared/border-button/border-button.module.mjs +1 -8
- package/esm2022/slide-in-bar/lib/slide-in-bar/slide-in-bar.module.mjs +1 -8
- package/esm2022/slide-in-bar/lib/slide-in-bar/slide-in-bar.service.mjs +3 -4
- package/esm2022/slider/lib/slider/slider.module.mjs +1 -8
- package/esm2022/speech-recognition/lib/speech-recognition/speech-recognition.module.mjs +1 -8
- package/esm2022/split-button/lib/split-button/split-button.module.mjs +1 -8
- package/esm2022/stats-card/lib/stats-card/stats-card.module.mjs +1 -8
- package/esm2022/stepper/lib/stepper/stepper.module.mjs +1 -8
- package/esm2022/structure/lib/structure/structure.module.mjs +1 -8
- package/esm2022/switch/lib/switch/switch.module.mjs +1 -8
- package/esm2022/table/lib/table/table.module.mjs +1 -9
- package/esm2022/table-header/lib/table-header/table-header-checkox.module.mjs +1 -8
- package/esm2022/template/lib/template/template.module.mjs +1 -8
- package/esm2022/text-area/lib/text-area.module.mjs +1 -8
- package/esm2022/thumbnail/lib/thumbnail/thumbnail.module.mjs +1 -8
- package/esm2022/thumbnails/lib/thumbnails/thumbnails.module.mjs +1 -8
- package/esm2022/tiered-menu/lib/tiered-menu/tiered-menu.module.mjs +1 -8
- package/esm2022/tile/lib/tile/tile.module.mjs +1 -11
- package/esm2022/timeline/lib/timeline/timeline.module.mjs +1 -8
- package/esm2022/toast/lib/toast/toast.module.mjs +1 -8
- package/esm2022/token-list/lib/token-list/token-list.module.mjs +1 -8
- package/esm2022/tooltip/lib/tooltip/tooltip.module.mjs +1 -8
- package/esm2022/topbar/lib/topbar/topbar.module.mjs +1 -11
- package/esm2022/tree/lib/tree/tree.module.mjs +1 -8
- package/esm2022/workspace-switch/lib/workspace-switch/workspace-switch.module.mjs +1 -8
- package/fesm2022/seniorsistemas-angular-components-accordion.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-accordion.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-alert.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-alert.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-badge.mjs +0 -10
- package/fesm2022/seniorsistemas-angular-components-badge.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-bignumber-input.mjs +126 -25
- package/fesm2022/seniorsistemas-angular-components-bignumber-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs +1 -5
- package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-button.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-card.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-chat.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-chat.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-checkbox-list.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-checkbox-list.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-chips.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-chips.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-code-editor.mjs +160 -164
- package/fesm2022/seniorsistemas-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-collapse-link.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-collapse-link.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-common.mjs +2 -38
- package/fesm2022/seniorsistemas-angular-components-common.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-content-generator.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-content-generator.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-control-errors.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-control-errors.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs +2 -10
- package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs +15 -75
- package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-drawer.mjs +0 -10
- package/fesm2022/seniorsistemas-angular-components-drawer.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +208 -52
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-editable-overlay.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-editable-overlay.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-empty-state.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-empty-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-fieldset.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-fieldset.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-file-picker.mjs +2 -10
- package/fesm2022/seniorsistemas-angular-components-file-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-gantt.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-gantt.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-global-search.mjs +0 -18
- package/fesm2022/seniorsistemas-angular-components-global-search.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-grid-menu.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-grid-menu.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-help-popover.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-help-popover.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs +2 -14
- package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-info-sign.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-info-sign.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs +4 -11
- package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-input-group.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-input-group.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-input-mask.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-input-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-input-text.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-input-text.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-insights.mjs +0 -10
- package/fesm2022/seniorsistemas-angular-components-insights.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-kanban.mjs +2 -13
- package/fesm2022/seniorsistemas-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-label-value.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-label-value.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-loading-state.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-loading-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-locale.mjs +5 -58
- package/fesm2022/seniorsistemas-angular-components-locale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs +0 -11
- package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-mask.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-mouse-events.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-mouse-events.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-number-input.mjs +2 -9
- package/fesm2022/seniorsistemas-angular-components-number-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-numeric-mask.mjs +14 -184
- package/fesm2022/seniorsistemas-angular-components-numeric-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-numeric.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-numeric.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-object-card.mjs +0 -11
- package/fesm2022/seniorsistemas-angular-components-object-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-panel.mjs +0 -10
- package/fesm2022/seniorsistemas-angular-components-panel.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-password-strength.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-password-strength.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-picklist.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-picklist.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-pin-code-field.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-pin-code-field.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-progressbar.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-progressbar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-rating-scale.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-rating-scale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-select-button.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-select-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-select.mjs +2 -15
- package/fesm2022/seniorsistemas-angular-components-select.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-shared.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-shared.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs +2 -10
- package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-slider.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-slider.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-split-button.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-split-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-stats-card.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-stats-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-stepper.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-structure.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-structure.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-switch.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-switch.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-table-header.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-table-header.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-table.mjs +0 -8
- package/fesm2022/seniorsistemas-angular-components-table.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-template.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-template.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-text-area.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-text-area.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-thumbnails.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-thumbnails.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tile.mjs +0 -10
- package/fesm2022/seniorsistemas-angular-components-tile.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-timeline.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-timeline.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-toast.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-toast.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-token-list.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-token-list.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tooltip.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-tooltip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-topbar.mjs +0 -10
- package/fesm2022/seniorsistemas-angular-components-topbar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tree.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-tree.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs +0 -7
- package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs.map +1 -1
- package/fieldset/README.md +2 -2
- package/fieldset/lib/fieldset/fieldset.module.d.ts +0 -7
- package/file-picker/README.md +2 -2
- package/file-picker/lib/file-picker/file-picker.module.d.ts +0 -7
- package/file-upload/README.md +1 -1
- package/gantt/README.md +2 -2
- package/gantt/lib/gantt/gantt.module.d.ts +0 -7
- package/global-search/README.md +2 -5
- package/global-search/lib/global-search/global-search.module.d.ts +0 -18
- package/grid-menu/README.md +4 -5
- package/grid-menu/lib/grid-menu/grid-menu.module.d.ts +0 -7
- package/help-popover/README.md +4 -5
- package/help-popover/lib/help-popover/help-popover.module.d.ts +0 -7
- package/ia-insight/README.md +1 -1
- package/image-cropper/README.md +5 -6
- package/image-cropper/lib/image-cropper/image-cropper.module.d.ts +0 -11
- package/infinite-scroll/README.md +4 -5
- package/infinite-scroll/lib/infinite-scroll/infinite-scroll.module.d.ts +0 -7
- package/info-sign/README.md +4 -5
- package/info-sign/lib/info-sign/info-sign.module.d.ts +0 -7
- package/inline-edit/README.md +4 -5
- package/inline-edit/lib/inline-edit/inline-edit.module.d.ts +0 -7
- package/input-group/lib/input-group/input-group.module.d.ts +0 -7
- package/input-mask/lib/input-mask/input-mask.module.d.ts +0 -7
- package/input-text/lib/input-text/input-text.module.d.ts +0 -7
- package/insights/README.md +4 -6
- package/insights/lib/insights/insights.module.d.ts +0 -10
- package/kanban/README.md +4 -6
- package/kanban/lib/kanban/kanban.module.d.ts +0 -10
- package/label-value/README.md +4 -5
- package/label-value/lib/label-value/label-value.module.d.ts +0 -7
- package/loading-state/README.md +5 -9
- package/loading-state/lib/loading-state/loading-state.module.d.ts +0 -7
- package/locale/lib/locale/locale.module.d.ts +0 -13
- package/locale/lib/locale/pipes/localized-bignumber-impure.pipe.d.ts +2 -2
- package/locale/lib/locale/pipes/localized-bignumber.pipe.d.ts +1 -20
- package/locale/public-api.d.ts +0 -1
- package/localized-number-input/README.md +8 -32
- package/localized-number-input/lib/localized-number-input/localized-number-input.directive.d.ts +0 -4
- package/localized-number-input/lib/localized-number-input/localized-number-input.module.d.ts +0 -7
- package/mask/lib/mask/mask-formatter.module.d.ts +0 -7
- package/mouse-events/README.md +4 -5
- package/mouse-events/lib/mouse-events/mouse-events.module.d.ts +0 -7
- package/navigation-button/README.md +4 -5
- package/navigation-button/lib/navigation-button/navigation-button.module.d.ts +0 -7
- package/number-input/lib/number-input/number-input.directive.d.ts +1 -1
- package/number-input/lib/number-input/number-input.module.d.ts +1 -8
- package/numeric/README.md +5 -6
- package/numeric/lib/numeric.module.d.ts +0 -7
- package/numeric-mask/README.md +1 -44
- package/numeric-mask/lib/numeric-mask/numeric-mask.directive.d.ts +4 -65
- package/numeric-mask/lib/numeric-mask/numeric-mask.module.d.ts +0 -7
- package/object-card/README.md +4 -11
- package/object-card/lib/object-card/object-card.module.d.ts +0 -11
- package/package.json +1 -1
- package/panel/README.md +4 -8
- package/panel/lib/panel/panel.module.d.ts +0 -10
- package/password-strength/README.md +3 -6
- package/password-strength/lib/password-strength/password-strength.module.d.ts +0 -7
- package/picklist/README.md +5 -8
- package/picklist/lib/picklist/picklist.module.d.ts +0 -7
- package/pin-code-field/lib/pin-code-field.module.d.ts +0 -7
- package/product-header/README.md +2 -2
- package/profile-picture-picker/README.md +3 -6
- package/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.module.d.ts +0 -7
- package/progressbar/README.md +3 -6
- package/progressbar/lib/progressbar/progressbar.module.d.ts +0 -7
- package/rating-scale/README.md +3 -6
- package/rating-scale/lib/rating-scale/rating-scale.module.d.ts +0 -7
- package/schematics/collection.json +0 -40
- package/schematics/migrations.json +1 -5
- package/schematics/utils/ast-utils.js +0 -16
- package/schematics/utils/ast-utils.js.map +1 -1
- package/select/lib/select/select.component.d.ts +0 -8
- package/select-button/README.md +3 -6
- package/select-button/lib/select-button/select-button.module.d.ts +0 -7
- package/shared/lib/shared/border-button/border-button.module.d.ts +0 -7
- package/sidebar/README.md +2 -2
- package/slide-in-bar/README.md +5 -5
- package/slide-in-bar/lib/slide-in-bar/slide-in-bar.module.d.ts +0 -7
- package/slider/README.md +3 -6
- package/slider/lib/slider/slider.module.d.ts +0 -7
- package/speech-recognition/README.md +3 -6
- package/speech-recognition/lib/speech-recognition/speech-recognition.module.d.ts +0 -7
- package/split-button/README.md +3 -6
- package/split-button/lib/split-button/split-button.module.d.ts +0 -7
- package/stats-card/README.md +3 -6
- package/stats-card/lib/stats-card/stats-card.module.d.ts +0 -7
- package/stepper/README.md +3 -6
- package/stepper/lib/stepper/stepper.module.d.ts +0 -7
- package/structure/lib/structure/structure.module.d.ts +0 -7
- package/switch/README.md +3 -6
- package/switch/lib/switch/switch.module.d.ts +0 -7
- package/table/README.md +4 -12
- package/table/lib/table/table.module.d.ts +0 -8
- package/table-header/lib/table-header/table-header-checkox.module.d.ts +0 -7
- package/template/README.md +11 -0
- package/template/lib/template/template.module.d.ts +0 -7
- package/text-area/lib/text-area.module.d.ts +0 -7
- package/text-area-ia/README.md +1 -1
- package/thumbnail/lib/thumbnail/thumbnail.module.d.ts +0 -7
- package/thumbnails/lib/thumbnails/thumbnails.module.d.ts +0 -7
- package/tiered-menu/lib/tiered-menu/tiered-menu.module.d.ts +0 -7
- package/tile/lib/tile/tile.module.d.ts +0 -10
- package/timeline/lib/timeline/timeline.module.d.ts +0 -7
- package/toast/lib/toast/toast.module.d.ts +0 -7
- package/token-list/lib/token-list/token-list.module.d.ts +0 -7
- package/tooltip/lib/tooltip/tooltip.module.d.ts +0 -7
- package/topbar/lib/topbar/topbar.module.d.ts +0 -10
- package/tree/lib/tree/tree.module.d.ts +0 -7
- package/workspace-switch/lib/workspace-switch/workspace-switch.module.d.ts +0 -7
- package/common/lib/provide-angular-components.d.ts +0 -19
- package/custom-fields/lib/custom-fields/models/custom-field-value-parser.d.ts +0 -21
- package/esm2022/common/lib/provide-angular-components.mjs +0 -22
- package/esm2022/custom-fields/lib/custom-fields/models/custom-field-value-parser.mjs +0 -46
- package/esm2022/locale/lib/locale/provide-locale.mjs +0 -42
- package/locale/lib/locale/provide-locale.d.ts +0 -18
- package/schematics/migrations/migrate-app-to-standalone/index.d.ts +0 -32
- package/schematics/migrations/migrate-app-to-standalone/index.js +0 -98
- package/schematics/migrations/migrate-app-to-standalone/index.js.map +0 -1
- package/schematics/migrations/migrate-deprecated-apis/index.d.ts +0 -49
- package/schematics/migrations/migrate-deprecated-apis/index.js +0 -660
- package/schematics/migrations/migrate-deprecated-apis/index.js.map +0 -1
- package/schematics/migrations/migrate-deprecated-datepicker/index.d.ts +0 -31
- package/schematics/migrations/migrate-deprecated-datepicker/index.js +0 -115
- package/schematics/migrations/migrate-deprecated-datepicker/index.js.map +0 -1
- package/schematics/migrations/migrate-deprecated-dynamic-form/index.d.ts +0 -52
- package/schematics/migrations/migrate-deprecated-dynamic-form/index.js +0 -661
- package/schematics/migrations/migrate-deprecated-dynamic-form/index.js.map +0 -1
- package/schematics/migrations/migrate-deprecated-imports/index.d.ts +0 -23
- package/schematics/migrations/migrate-deprecated-imports/index.js +0 -335
- package/schematics/migrations/migrate-deprecated-imports/index.js.map +0 -1
- package/schematics/migrations/migrate-deprecated-selectors/index.d.ts +0 -15
- package/schematics/migrations/migrate-deprecated-selectors/index.js +0 -76
- package/schematics/migrations/migrate-deprecated-selectors/index.js.map +0 -1
- package/schematics/migrations/migrate-modules-to-standalone/index.d.ts +0 -51
- package/schematics/migrations/migrate-modules-to-standalone/index.js +0 -632
- package/schematics/migrations/migrate-modules-to-standalone/index.js.map +0 -1
- package/schematics/migrations/migrate-modules-to-standalone/modules-map.json +0 -1656
- package/schematics/migrations/migrate-v20/index.d.ts +0 -9
- package/schematics/migrations/migrate-v20/index.js +0 -90
- package/schematics/migrations/migrate-v20/index.js.map +0 -1
- package/schematics/migrations/migrate-v20/items.d.ts +0 -7
- package/schematics/migrations/migrate-v20/items.js +0 -54
- package/schematics/migrations/migrate-v20/items.js.map +0 -1
- package/schematics/migrations/migrate-v20/plan.d.ts +0 -32
- package/schematics/migrations/migrate-v20/plan.js +0 -29
- package/schematics/migrations/migrate-v20/plan.js.map +0 -1
- package/schematics/schema/app-standalone.schema.json +0 -21
- package/schematics/schema/migrate-v20.schema.json +0 -33
- package/schematics/schema/scope.schema.json +0 -17
- package/schematics/utils/eol.d.ts +0 -5
- package/schematics/utils/eol.js +0 -17
- package/schematics/utils/eol.js.map +0 -1
- package/schematics/utils/prompt-utils.d.ts +0 -62
- package/schematics/utils/prompt-utils.js +0 -166
- package/schematics/utils/prompt-utils.js.map +0 -1
- package/schematics/utils/report.d.ts +0 -27
- package/schematics/utils/report.js +0 -70
- package/schematics/utils/report.js.map +0 -1
- package/schematics/utils/scope.d.ts +0 -17
- package/schematics/utils/scope.js +0 -55
- package/schematics/utils/scope.js.map +0 -1
- package/schematics/utils/selection.d.ts +0 -21
- package/schematics/utils/selection.js +0 -60
- package/schematics/utils/selection.js.map +0 -1
- package/schematics/utils/symbol-utils.d.ts +0 -31
- package/schematics/utils/symbol-utils.js +0 -202
- package/schematics/utils/symbol-utils.js.map +0 -1
- package/schematics/utils/template-utils.d.ts +0 -62
- package/schematics/utils/template-utils.js +0 -165
- package/schematics/utils/template-utils.js.map +0 -1
- package/schematics/utils/tsconfig-paths.d.ts +0 -5
- package/schematics/utils/tsconfig-paths.js +0 -73
- package/schematics/utils/tsconfig-paths.js.map +0 -1
|
@@ -149,13 +149,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
149
149
|
type: Output
|
|
150
150
|
}] } });
|
|
151
151
|
|
|
152
|
-
/**
|
|
153
|
-
* @deprecated Será removido na v20. Importe diretamente o standalone `NavigationButtonComponent` (de
|
|
154
|
-
* `@seniorsistemas/angular-components/navigation-button`) no lugar deste módulo.
|
|
155
|
-
*
|
|
156
|
-
* Migração automática (também executada pelo `ng update` na v20):
|
|
157
|
-
* `ng generate @seniorsistemas/angular-components:migrate-modules-to-standalone`
|
|
158
|
-
*/
|
|
159
152
|
class NavigationButtonModule {
|
|
160
153
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
161
154
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: NavigationButtonModule, imports: [NavigationButtonComponent], exports: [NavigationButtonComponent] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-navigation-button.mjs","sources":["../../projects/angular-components/navigation-button/src/lib/navigation-button/navigation-button.component.ts","../../projects/angular-components/navigation-button/src/lib/navigation-button/navigation-button.component.html","../../projects/angular-components/navigation-button/src/lib/navigation-button/navigation-button.module.ts","../../projects/angular-components/navigation-button/src/seniorsistemas-angular-components-navigation-button.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n forwardRef,\r\n OnInit,\r\n AfterViewInit,\r\n ChangeDetectorRef,\r\n inject,\r\n} from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { NavigationButtonItem } from './models/navigation-button-item';\r\nimport { NavigationButtonStepChangedInfo } from './models';\r\nimport { TieredMenuItemData, TieredMenuDirective } from '@seniorsistemas/angular-components/tiered-menu';\r\nimport { NgClass } from '@angular/common';\r\nimport { TooltipDirective } from '@seniorsistemas/angular-components/tooltip';\r\n\r\n/**\r\n * @description Componente de navegação por etapas que exibe o estado atual (step)\r\n * com suporte a avanço, retrocesso e seleção direta via dropdown (`TieredMenu`).\r\n * Implementa `ControlValueAccessor` para integração com formulários Angular.\r\n *\r\n * @example\r\n * ```html\r\n * <s-navigation-button\r\n * [steps]=\"etapas\"\r\n * (stepChanged)=\"onEtapaMudou($event)\" />\r\n * ```\r\n *\r\n * @category Inputs\r\n */\r\n@Component({\r\n selector: 's-navigation-button',\r\n templateUrl: './navigation-button.component.html',\r\n styleUrls: ['./navigation-button.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => NavigationButtonComponent),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n imports: [NgClass, TieredMenuDirective, TooltipDirective],\r\n})\r\nexport class NavigationButtonComponent implements ControlValueAccessor, OnInit, AfterViewInit {\r\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n /** @description Lista de etapas de navegação. Campo obrigatório. */\r\n @Input({ required: true })\r\n public steps!: NavigationButtonItem[];\r\n\r\n /** @description Valor padrão a ser selecionado ao inicializar o componente. */\r\n @Input()\r\n public defaultValue: unknown;\r\n\r\n /** @description Texto exibido no tooltip do botão principal. */\r\n @Input()\r\n public tooltip?: string;\r\n\r\n /** @description Quando `true`, emite `stepChanged` durante a inicialização com a etapa atual. @default false */\r\n @Input()\r\n public changeOnInit = false;\r\n\r\n /** @description Emitido quando o usuário navega para uma nova etapa, com informações da etapa anterior e atual. */\r\n @Output()\r\n public stepChanged: EventEmitter<NavigationButtonStepChangedInfo> = new EventEmitter();\r\n\r\n public currentIndex = 0;\r\n public isDisabled = false;\r\n public tieredMenuItems: TieredMenuItemData[] = [];\r\n\r\n private _onChange?: (value: unknown) => void;\r\n private _onTouched?: () => void;\r\n private _value: unknown;\r\n\r\n public ngOnInit(): void {\r\n this._createTieredMenuItems();\r\n\r\n if (this.changeOnInit) {\r\n this.stepChanged.emit({\r\n previous: null,\r\n current: this.steps[this.currentIndex],\r\n });\r\n }\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this._setDefaultValue();\r\n }\r\n\r\n private _setDefaultValue(): void {\r\n if (this.defaultValue) {\r\n this._value = this.defaultValue;\r\n\r\n const index = this.steps.findIndex((step) => step.value === this._value);\r\n this.currentIndex = index !== -1 ? index : 0;\r\n this.stepChanged.emit({\r\n previous: null,\r\n current: this.steps[this.currentIndex],\r\n });\r\n\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n }\r\n\r\n public writeValue(value: unknown): void {\r\n this._value = value;\r\n\r\n const index = this.steps.findIndex((step) => step.value === this._value);\r\n this.currentIndex = index !== -1 ? index : 0;\r\n }\r\n\r\n public registerOnChange(onChange: (value: unknown) => void): void {\r\n this._onChange = onChange;\r\n }\r\n\r\n public registerOnTouched(onTouched: () => void): void {\r\n this._onTouched = onTouched;\r\n }\r\n\r\n public setDisabledState?(isDisabled: boolean): void {\r\n this.isDisabled = isDisabled;\r\n }\r\n\r\n public onNext(): void {\r\n if (this.isDisabled) return;\r\n\r\n const previous = this.steps[this.currentIndex];\r\n\r\n if (this.currentIndex < this.steps.length - 1) {\r\n this.currentIndex++;\r\n\r\n const current = this.steps[this.currentIndex];\r\n\r\n this._onChange && this._onChange(current.value);\r\n this.stepChanged.emit({ previous, current });\r\n }\r\n\r\n this._onTouched && this._onTouched();\r\n }\r\n\r\n public onPrevious(): void {\r\n if (this.isDisabled) return;\r\n\r\n const previous = this.steps[this.currentIndex];\r\n\r\n if (this.currentIndex > 0) {\r\n this.currentIndex--;\r\n\r\n const current = this.steps[this.currentIndex];\r\n\r\n this._onChange && this._onChange(current.value);\r\n this.stepChanged.emit({ previous, current });\r\n }\r\n\r\n this._onTouched && this._onTouched();\r\n }\r\n\r\n private _createTieredMenuItems() {\r\n this.steps.forEach((step: NavigationButtonItem) => {\r\n this.tieredMenuItems.push({\r\n label: step.label,\r\n command: () => {\r\n const index = this.steps.findIndex((s) => s === step);\r\n if (this.currentIndex !== index) {\r\n this._onChange && this._onChange(step.value);\r\n this.stepChanged.emit({\r\n previous: this.steps[this.currentIndex],\r\n current: step,\r\n });\r\n this.currentIndex = index;\r\n }\r\n\r\n this._onTouched && this._onTouched();\r\n },\r\n });\r\n });\r\n }\r\n}\r\n","<div\n class=\"navigation-button\"\n [ngClass]=\"{ 'navigation-button--disabled': isDisabled }\"\n>\n <button\n class=\"option option--previous\"\n [ngClass]=\"{ 'option--disabled': currentIndex === 0 }\"\n (click)=\"onPrevious()\"\n >\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n\n @if (steps[currentIndex].tooltip || tooltip) {\n <button\n [sTooltip]=\"steps[currentIndex].tooltip || tooltip\"\n class=\"step\"\n sTieredMenu\n [items]=\"tieredMenuItems\"\n [focusedItem]=\"tieredMenuItems[currentIndex]\"\n >\n {{ steps[currentIndex].label }}\n </button>\n } @else {\n <button class=\"step\">\n {{ steps[currentIndex].label }}\n </button>\n }\n <button\n class=\"option option--next\"\n [ngClass]=\"{ 'option--disabled': currentIndex === steps.length - 1 }\"\n (click)=\"onNext()\"\n >\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n</div>\n","import { NgModule } from '@angular/core';\r\nimport { NavigationButtonComponent } from './navigation-button.component';\r\n\r\n/**\r\n * @deprecated Será removido na v20. Importe diretamente o standalone `NavigationButtonComponent` (de\r\n * `@seniorsistemas/angular-components/navigation-button`) no lugar deste módulo.\r\n *\r\n * Migração automática (também executada pelo `ng update` na v20):\r\n * `ng generate @seniorsistemas/angular-components:migrate-modules-to-standalone`\r\n */\r\n@NgModule({\r\n imports: [NavigationButtonComponent],\r\n exports: [NavigationButtonComponent],\r\n})\r\nexport class NavigationButtonModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],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N,OAAO,EAAE,CAAC,yBAAyB,CAAC;oBACpC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-navigation-button.mjs","sources":["../../projects/angular-components/navigation-button/src/lib/navigation-button/navigation-button.component.ts","../../projects/angular-components/navigation-button/src/lib/navigation-button/navigation-button.component.html","../../projects/angular-components/navigation-button/src/lib/navigation-button/navigation-button.module.ts","../../projects/angular-components/navigation-button/src/seniorsistemas-angular-components-navigation-button.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n forwardRef,\r\n OnInit,\r\n AfterViewInit,\r\n ChangeDetectorRef,\r\n inject,\r\n} from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { NavigationButtonItem } from './models/navigation-button-item';\r\nimport { NavigationButtonStepChangedInfo } from './models';\r\nimport { TieredMenuItemData, TieredMenuDirective } from '@seniorsistemas/angular-components/tiered-menu';\r\nimport { NgClass } from '@angular/common';\r\nimport { TooltipDirective } from '@seniorsistemas/angular-components/tooltip';\r\n\r\n/**\r\n * @description Componente de navegação por etapas que exibe o estado atual (step)\r\n * com suporte a avanço, retrocesso e seleção direta via dropdown (`TieredMenu`).\r\n * Implementa `ControlValueAccessor` para integração com formulários Angular.\r\n *\r\n * @example\r\n * ```html\r\n * <s-navigation-button\r\n * [steps]=\"etapas\"\r\n * (stepChanged)=\"onEtapaMudou($event)\" />\r\n * ```\r\n *\r\n * @category Inputs\r\n */\r\n@Component({\r\n selector: 's-navigation-button',\r\n templateUrl: './navigation-button.component.html',\r\n styleUrls: ['./navigation-button.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => NavigationButtonComponent),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n imports: [NgClass, TieredMenuDirective, TooltipDirective],\r\n})\r\nexport class NavigationButtonComponent implements ControlValueAccessor, OnInit, AfterViewInit {\r\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n /** @description Lista de etapas de navegação. Campo obrigatório. */\r\n @Input({ required: true })\r\n public steps!: NavigationButtonItem[];\r\n\r\n /** @description Valor padrão a ser selecionado ao inicializar o componente. */\r\n @Input()\r\n public defaultValue: unknown;\r\n\r\n /** @description Texto exibido no tooltip do botão principal. */\r\n @Input()\r\n public tooltip?: string;\r\n\r\n /** @description Quando `true`, emite `stepChanged` durante a inicialização com a etapa atual. @default false */\r\n @Input()\r\n public changeOnInit = false;\r\n\r\n /** @description Emitido quando o usuário navega para uma nova etapa, com informações da etapa anterior e atual. */\r\n @Output()\r\n public stepChanged: EventEmitter<NavigationButtonStepChangedInfo> = new EventEmitter();\r\n\r\n public currentIndex = 0;\r\n public isDisabled = false;\r\n public tieredMenuItems: TieredMenuItemData[] = [];\r\n\r\n private _onChange?: (value: unknown) => void;\r\n private _onTouched?: () => void;\r\n private _value: unknown;\r\n\r\n public ngOnInit(): void {\r\n this._createTieredMenuItems();\r\n\r\n if (this.changeOnInit) {\r\n this.stepChanged.emit({\r\n previous: null,\r\n current: this.steps[this.currentIndex],\r\n });\r\n }\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this._setDefaultValue();\r\n }\r\n\r\n private _setDefaultValue(): void {\r\n if (this.defaultValue) {\r\n this._value = this.defaultValue;\r\n\r\n const index = this.steps.findIndex((step) => step.value === this._value);\r\n this.currentIndex = index !== -1 ? index : 0;\r\n this.stepChanged.emit({\r\n previous: null,\r\n current: this.steps[this.currentIndex],\r\n });\r\n\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n }\r\n\r\n public writeValue(value: unknown): void {\r\n this._value = value;\r\n\r\n const index = this.steps.findIndex((step) => step.value === this._value);\r\n this.currentIndex = index !== -1 ? index : 0;\r\n }\r\n\r\n public registerOnChange(onChange: (value: unknown) => void): void {\r\n this._onChange = onChange;\r\n }\r\n\r\n public registerOnTouched(onTouched: () => void): void {\r\n this._onTouched = onTouched;\r\n }\r\n\r\n public setDisabledState?(isDisabled: boolean): void {\r\n this.isDisabled = isDisabled;\r\n }\r\n\r\n public onNext(): void {\r\n if (this.isDisabled) return;\r\n\r\n const previous = this.steps[this.currentIndex];\r\n\r\n if (this.currentIndex < this.steps.length - 1) {\r\n this.currentIndex++;\r\n\r\n const current = this.steps[this.currentIndex];\r\n\r\n this._onChange && this._onChange(current.value);\r\n this.stepChanged.emit({ previous, current });\r\n }\r\n\r\n this._onTouched && this._onTouched();\r\n }\r\n\r\n public onPrevious(): void {\r\n if (this.isDisabled) return;\r\n\r\n const previous = this.steps[this.currentIndex];\r\n\r\n if (this.currentIndex > 0) {\r\n this.currentIndex--;\r\n\r\n const current = this.steps[this.currentIndex];\r\n\r\n this._onChange && this._onChange(current.value);\r\n this.stepChanged.emit({ previous, current });\r\n }\r\n\r\n this._onTouched && this._onTouched();\r\n }\r\n\r\n private _createTieredMenuItems() {\r\n this.steps.forEach((step: NavigationButtonItem) => {\r\n this.tieredMenuItems.push({\r\n label: step.label,\r\n command: () => {\r\n const index = this.steps.findIndex((s) => s === step);\r\n if (this.currentIndex !== index) {\r\n this._onChange && this._onChange(step.value);\r\n this.stepChanged.emit({\r\n previous: this.steps[this.currentIndex],\r\n current: step,\r\n });\r\n this.currentIndex = index;\r\n }\r\n\r\n this._onTouched && this._onTouched();\r\n },\r\n });\r\n });\r\n }\r\n}\r\n","<div\n class=\"navigation-button\"\n [ngClass]=\"{ 'navigation-button--disabled': isDisabled }\"\n>\n <button\n class=\"option option--previous\"\n [ngClass]=\"{ 'option--disabled': currentIndex === 0 }\"\n (click)=\"onPrevious()\"\n >\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n\n @if (steps[currentIndex].tooltip || tooltip) {\n <button\n [sTooltip]=\"steps[currentIndex].tooltip || tooltip\"\n class=\"step\"\n sTieredMenu\n [items]=\"tieredMenuItems\"\n [focusedItem]=\"tieredMenuItems[currentIndex]\"\n >\n {{ steps[currentIndex].label }}\n </button>\n } @else {\n <button class=\"step\">\n {{ steps[currentIndex].label }}\n </button>\n }\n <button\n class=\"option option--next\"\n [ngClass]=\"{ 'option--disabled': currentIndex === steps.length - 1 }\"\n (click)=\"onNext()\"\n >\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n</div>\n","import { NgModule } from '@angular/core';\r\nimport { NavigationButtonComponent } from './navigation-button.component';\r\n\r\n@NgModule({\r\n imports: [NavigationButtonComponent],\r\n exports: [NavigationButtonComponent],\r\n})\r\nexport class NavigationButtonModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAmBA;;;;;;;;;;;;;AAaG;MAeU,yBAAyB,CAAA;AACjB,IAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;;AAIxD,IAAA,KAAK,CAA0B;;AAI/B,IAAA,YAAY,CAAU;;AAItB,IAAA,OAAO,CAAU;;IAIjB,YAAY,GAAG,KAAK,CAAC;;AAIrB,IAAA,WAAW,GAAkD,IAAI,YAAY,EAAE,CAAC;IAEhF,YAAY,GAAG,CAAC,CAAC;IACjB,UAAU,GAAG,KAAK,CAAC;IACnB,eAAe,GAAyB,EAAE,CAAC;AAE1C,IAAA,SAAS,CAA4B;AACrC,IAAA,UAAU,CAAc;AACxB,IAAA,MAAM,CAAU;IAEjB,QAAQ,GAAA;QACX,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAE9B,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;AAClB,gBAAA,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC;AACzC,aAAA,CAAC,CAAC;SACN;KACJ;IAEM,eAAe,GAAA;QAClB,IAAI,CAAC,gBAAgB,EAAE,CAAC;KAC3B;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gBAKC,WAAW,EAAA,CAAA;sBADjB,MAAM;;;ME5DE,sBAAsB,CAAA;wGAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAtB,sBAAsB,EAAA,OAAA,EAAA,CAHrB,yBAAyB,CAAA,EAAA,OAAA,EAAA,CACzB,yBAAyB,CAAA,EAAA,CAAA,CAAA;yGAE1B,sBAAsB,EAAA,CAAA,CAAA;;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,yBAAyB,CAAC;oBACpC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -12,7 +12,7 @@ var NumberAlignmentOption;
|
|
|
12
12
|
NumberAlignmentOption["LEFT"] = "left";
|
|
13
13
|
})(NumberAlignmentOption || (NumberAlignmentOption = {}));
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated Use a diretiva `
|
|
15
|
+
* @deprecated Use a diretiva `sNumericMask` em vez desta.
|
|
16
16
|
* @description Alias de `BignumberInputDirective` mantido por compatibilidade.
|
|
17
17
|
* Todos os inputs e outputs são idênticos ao `sBignumberInput`.
|
|
18
18
|
*
|
|
@@ -49,14 +49,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
49
49
|
}] });
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* @deprecated
|
|
53
|
-
* `@seniorsistemas/angular-components/bignumber-input`) no lugar deste módulo.
|
|
54
|
-
*
|
|
55
|
-
* Atenção: o `sNumberInput` está depreciado em favor do `sNumericMask`; revise os templates (o schematic
|
|
56
|
-
* `migrate-deprecated-apis` faz essa troca e grava os defaults antigos de forma explícita).
|
|
57
|
-
*
|
|
58
|
-
* Migração automática (também executada pelo `ng update` na v20):
|
|
59
|
-
* `ng generate @seniorsistemas/angular-components:migrate-modules-to-standalone`
|
|
52
|
+
* @deprecated Should use 'BignumberInputModule' instead
|
|
60
53
|
*/
|
|
61
54
|
class NumberInputModule {
|
|
62
55
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NumberInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-number-input.mjs","sources":["../../projects/angular-components/number-input/src/lib/number-input/number-input.directive.ts","../../projects/angular-components/number-input/src/lib/number-input/number-input.module.ts","../../projects/angular-components/number-input/src/seniorsistemas-angular-components-number-input.ts"],"sourcesContent":["import { Directive, forwardRef } from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { BignumberInputDirective } from '@seniorsistemas/angular-components/bignumber-input';\r\n\r\n/**\r\n * @deprecated Este enum é mantido apenas por compatibilidade. Utilize as strings `'left'` ou `'right'` diretamente.\r\n */\r\nexport enum NumberAlignmentOption {\r\n RIGHT = 'right',\r\n LEFT = 'left',\r\n}\r\n\r\n/**\r\n * @deprecated Use a diretiva `
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-number-input.mjs","sources":["../../projects/angular-components/number-input/src/lib/number-input/number-input.directive.ts","../../projects/angular-components/number-input/src/lib/number-input/number-input.module.ts","../../projects/angular-components/number-input/src/seniorsistemas-angular-components-number-input.ts"],"sourcesContent":["import { Directive, forwardRef } from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { BignumberInputDirective } from '@seniorsistemas/angular-components/bignumber-input';\r\n\r\n/**\r\n * @deprecated Este enum é mantido apenas por compatibilidade. Utilize as strings `'left'` ou `'right'` diretamente.\r\n */\r\nexport enum NumberAlignmentOption {\r\n RIGHT = 'right',\r\n LEFT = 'left',\r\n}\r\n\r\n/**\r\n * @deprecated Use a diretiva `sNumericMask` em vez desta.\r\n * @description Alias de `BignumberInputDirective` mantido por compatibilidade.\r\n * Todos os inputs e outputs são idênticos ao `sBignumberInput`.\r\n *\r\n * @example\r\n * ```html\r\n * <input sNumberInput [precision]=\"10\" [scale]=\"2\" />\r\n * ```\r\n *\r\n * @category Inputs\r\n */\r\n@Directive({\r\n selector: 'input[sNumberInput]',\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => NumberInputDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class NumberInputDirective extends BignumberInputDirective {}\r\n","import { NgModule } from '@angular/core';\r\n\r\nimport { BignumberInputModule } from '@seniorsistemas/angular-components/bignumber-input';\r\n\r\nimport { NumberInputDirective } from './number-input.directive';\r\n\r\n/**\r\n * @deprecated Should use 'BignumberInputModule' instead\r\n */\r\n@NgModule({\r\n imports: [NumberInputDirective],\r\n exports: [NumberInputDirective],\r\n})\r\nexport class NumberInputModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAKA;;AAEG;IACS,sBAGX;AAHD,CAAA,UAAY,qBAAqB,EAAA;AAC7B,IAAA,qBAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACjB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA,CAAA;AAED;;;;;;;;;;;AAWG;AAYG,MAAO,oBAAqB,SAAQ,uBAAuB,CAAA;wGAApD,oBAAoB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,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{ input,
|
|
2
|
+
import { input, inject, ElementRef, Renderer2, DestroyRef, model, forwardRef, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
5
5
|
import { LocaleService } from '@seniorsistemas/angular-components/locale';
|
|
@@ -76,25 +76,6 @@ class NumericMaskDirective {
|
|
|
76
76
|
* @default 'preserve'
|
|
77
77
|
*/
|
|
78
78
|
decimalRoundingMode = input('preserve');
|
|
79
|
-
/**
|
|
80
|
-
* Maximum number of significant digits accepted by the field (integer + decimal part).
|
|
81
|
-
* Opt-in: when left `undefined` (default), there is no total-digit limit, no native `maxLength`
|
|
82
|
-
* is applied, pasted values are never rejected, and `placeholder` is never auto-calculated —
|
|
83
|
-
* i.e. the directive behaves exactly as before this input existed.
|
|
84
|
-
*/
|
|
85
|
-
precision = input(undefined);
|
|
86
|
-
/**
|
|
87
|
-
* Placeholder text shown when the field is empty. When `precision` is set and this is left
|
|
88
|
-
* unset, it is auto-calculated from `minDecimalPlaces` (e.g. `0,00`); has no effect otherwise.
|
|
89
|
-
*/
|
|
90
|
-
placeholder = model(undefined);
|
|
91
|
-
/**
|
|
92
|
-
* Emitted when a pasted value is rejected for exceeding `precision`. Only fires when
|
|
93
|
-
* `precision` is set; emits the rejected pasted text.
|
|
94
|
-
*/
|
|
95
|
-
pasteRejected = output();
|
|
96
|
-
/** Native `maxLength` attribute, auto-calculated from `precision` when it is set. */
|
|
97
|
-
maxLength;
|
|
98
79
|
elementRef = inject((ElementRef));
|
|
99
80
|
renderer = inject(Renderer2);
|
|
100
81
|
localeService = inject(LocaleService, { optional: true });
|
|
@@ -105,46 +86,17 @@ class NumericMaskDirective {
|
|
|
105
86
|
thousandSeparator = model('.');
|
|
106
87
|
currentLocale = 'pt-BR';
|
|
107
88
|
lastModelValue = null;
|
|
108
|
-
/** `protected`: subclasses with their own deprecated separator aliases (e.g. `BignumberInputDirective`) set this directly. */
|
|
109
|
-
_decimalSeparatorExplicit = false;
|
|
110
|
-
/** `protected`: see `_decimalSeparatorExplicit`. */
|
|
111
|
-
_thousandSeparatorExplicit = false;
|
|
112
|
-
_lastAutoPlaceholder;
|
|
113
89
|
ngOnChanges(changes) {
|
|
114
90
|
if (changes['locale'] && !changes['locale'].firstChange && this.locale()) {
|
|
115
91
|
this.currentLocale = this.locale();
|
|
116
92
|
this.updateSeparators();
|
|
117
93
|
this.setInputMode();
|
|
118
94
|
}
|
|
119
|
-
// Preserves an explicitly bound separator across later locale-driven recalculations
|
|
120
|
-
// (see `updateSeparators`): `changes['X']` is only present when the parent template
|
|
121
|
-
// actually binds that input (Angular never reports unbound inputs here, not even on
|
|
122
|
-
// the first change), so consumers who never touch these two keep today's locale-derived
|
|
123
|
-
// behavior. Checked by key presence alone — NOT the current value's truthiness, which
|
|
124
|
-
// would wrongly treat an intentional `[thousandSeparator]="''"` (no grouping) as "not
|
|
125
|
-
// explicit" and let a later locale change silently restore grouping.
|
|
126
|
-
if (changes['decimalSeparator']) {
|
|
127
|
-
this._decimalSeparatorExplicit = true;
|
|
128
|
-
}
|
|
129
|
-
if (changes['thousandSeparator']) {
|
|
130
|
-
this._thousandSeparatorExplicit = true;
|
|
131
|
-
}
|
|
132
|
-
if (changes['precision'] ||
|
|
133
|
-
changes['minDecimalPlaces'] ||
|
|
134
|
-
changes['maxDecimalPlaces'] ||
|
|
135
|
-
changes['decimalSeparator'] ||
|
|
136
|
-
changes['thousandSeparator']) {
|
|
137
|
-
this.calculateMaxLength();
|
|
138
|
-
}
|
|
139
|
-
if (changes['precision'] || changes['minDecimalPlaces'] || changes['decimalSeparator']) {
|
|
140
|
-
this.updatePlaceholder();
|
|
141
|
-
}
|
|
142
95
|
}
|
|
143
96
|
ngOnInit() {
|
|
144
97
|
if (this.minDecimalPlaces() > this.maxDecimalPlaces()) {
|
|
145
98
|
throw new Error(`NumericMaskDirective: minDecimalPlaces (${this.minDecimalPlaces()}) cannot be greater than maxDecimalPlaces (${this.maxDecimalPlaces()})`);
|
|
146
99
|
}
|
|
147
|
-
this.updatePlaceholder();
|
|
148
100
|
if (this.locale()) {
|
|
149
101
|
this.currentLocale = this.locale();
|
|
150
102
|
this.updateSeparators();
|
|
@@ -225,35 +177,14 @@ class NumericMaskDirective {
|
|
|
225
177
|
this.onChange(modelValue);
|
|
226
178
|
}
|
|
227
179
|
/**
|
|
228
|
-
* Listener for paste events (clipboard)
|
|
229
|
-
* exceed it, the paste is rejected outright (nothing is written) and `pasteRejected` fires.
|
|
180
|
+
* Listener for paste events (clipboard)
|
|
230
181
|
*/
|
|
231
182
|
onPaste(event) {
|
|
232
|
-
const pastedText = event.clipboardData?.getData('text') || '';
|
|
233
|
-
const precision = this.precision();
|
|
234
|
-
if (precision !== undefined && this.exceedsPrecision(pastedText, precision)) {
|
|
235
|
-
event.preventDefault();
|
|
236
|
-
this.pasteRejected.emit(pastedText);
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
183
|
event.preventDefault();
|
|
184
|
+
const pastedText = event.clipboardData?.getData('text') || '';
|
|
240
185
|
let value = this.parseClipboardValue(pastedText);
|
|
241
186
|
this.processInputValue(value);
|
|
242
187
|
}
|
|
243
|
-
/**
|
|
244
|
-
* Whether a raw pasted string, once stripped of separators, has more significant digits
|
|
245
|
-
* than `precision` allows.
|
|
246
|
-
* @private
|
|
247
|
-
*/
|
|
248
|
-
exceedsPrecision(text, precision) {
|
|
249
|
-
const thousandSep = this.thousandSeparator();
|
|
250
|
-
const numericText = text
|
|
251
|
-
.replace(new RegExp(this.escapeRegex(thousandSep), 'g'), '')
|
|
252
|
-
.replace(this.decimalSeparator(), '.');
|
|
253
|
-
const [intPart, decimalPart = ''] = numericText.split('.');
|
|
254
|
-
const totalDigits = intPart.replace(/\D/g, '').length + decimalPart.slice(0, this.maxDecimalPlaces()).length;
|
|
255
|
-
return totalDigits > precision;
|
|
256
|
-
}
|
|
257
188
|
/**
|
|
258
189
|
* Listener for special keys (+ and -)
|
|
259
190
|
*/
|
|
@@ -325,59 +256,12 @@ class NumericMaskDirective {
|
|
|
325
256
|
}
|
|
326
257
|
}
|
|
327
258
|
/**
|
|
328
|
-
* Updates separators according to the locale
|
|
329
|
-
* `thousandSeparator` (tracked in `ngOnChanges`) is restored afterwards, so a locale
|
|
330
|
-
* change never silently overrides a value the consumer set on purpose.
|
|
259
|
+
* Updates separators according to the locale
|
|
331
260
|
*/
|
|
332
261
|
updateSeparators() {
|
|
333
|
-
const explicitDecimal = this._decimalSeparatorExplicit ? this.decimalSeparator() : undefined;
|
|
334
|
-
const explicitThousand = this._thousandSeparatorExplicit ? this.thousandSeparator() : undefined;
|
|
335
262
|
const formatted = new Intl.NumberFormat(this.currentLocale).format(1234.5);
|
|
336
263
|
this.thousandSeparator.set(formatted[1]);
|
|
337
264
|
this.decimalSeparator.set(formatted[5]);
|
|
338
|
-
if (explicitDecimal !== undefined) {
|
|
339
|
-
this.decimalSeparator.set(explicitDecimal);
|
|
340
|
-
}
|
|
341
|
-
if (explicitThousand !== undefined) {
|
|
342
|
-
this.thousandSeparator.set(explicitThousand);
|
|
343
|
-
}
|
|
344
|
-
this.calculateMaxLength();
|
|
345
|
-
this.updatePlaceholder();
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* Auto-calculates the native `maxLength` from `precision`, sized for the current separators
|
|
349
|
-
* and `maxDecimalPlaces`. No-op (leaves `maxLength` unset) while `precision` is `undefined`.
|
|
350
|
-
* `protected`: subclasses that map their own deprecated inputs into `minDecimalPlaces`/
|
|
351
|
-
* `maxDecimalPlaces`/`thousandSeparator` outside of a tracked `changes` key call this directly.
|
|
352
|
-
*/
|
|
353
|
-
calculateMaxLength() {
|
|
354
|
-
const precision = this.precision();
|
|
355
|
-
if (precision === undefined) {
|
|
356
|
-
this.maxLength = undefined;
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
const scale = this.maxDecimalPlaces();
|
|
360
|
-
const decSepLength = this.decimalSeparator()?.length ?? 0;
|
|
361
|
-
const thoSepLength = this.thousandSeparator()?.length ?? 0;
|
|
362
|
-
const DIGITS_GROUP_SIZE = 3;
|
|
363
|
-
let maxLength = precision + (scale ? decSepLength : 0);
|
|
364
|
-
maxLength += Math.ceil((precision - scale) / DIGITS_GROUP_SIZE - 1) * thoSepLength;
|
|
365
|
-
this.maxLength = maxLength;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Auto-calculates `placeholder` (e.g. `0,00`) from `minDecimalPlaces`, without overwriting
|
|
369
|
-
* a value the consumer set explicitly. No-op while `precision` is `undefined`.
|
|
370
|
-
* `protected`: see `calculateMaxLength`.
|
|
371
|
-
*/
|
|
372
|
-
updatePlaceholder() {
|
|
373
|
-
if (this.precision() === undefined)
|
|
374
|
-
return;
|
|
375
|
-
const scale = this.minDecimalPlaces();
|
|
376
|
-
const autoPlaceholder = scale ? `0${this.decimalSeparator()}${''.padEnd(scale, '0')}` : '0';
|
|
377
|
-
if (this.placeholder() === undefined || this.placeholder() === this._lastAutoPlaceholder) {
|
|
378
|
-
this.placeholder.set(autoPlaceholder);
|
|
379
|
-
}
|
|
380
|
-
this._lastAutoPlaceholder = autoPlaceholder;
|
|
381
265
|
}
|
|
382
266
|
/**
|
|
383
267
|
* Processes input value and updates the input and model
|
|
@@ -502,18 +386,10 @@ class NumericMaskDirective {
|
|
|
502
386
|
*/
|
|
503
387
|
parseStringToValue(value) {
|
|
504
388
|
const isNegative = value.startsWith('-');
|
|
505
|
-
let numericStr = value
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
const thousandSep = this.thousandSeparator();
|
|
510
|
-
if (thousandSep) {
|
|
511
|
-
numericStr = numericStr.replace(new RegExp(this.escapeRegex(thousandSep), 'g'), '');
|
|
512
|
-
}
|
|
513
|
-
const decimalSep = this.decimalSeparator();
|
|
514
|
-
if (decimalSep) {
|
|
515
|
-
numericStr = numericStr.replace(new RegExp(this.escapeRegex(decimalSep), 'g'), '.');
|
|
516
|
-
}
|
|
389
|
+
let numericStr = value
|
|
390
|
+
.replace(/^-/, '')
|
|
391
|
+
.replace(new RegExp(`\\${this.thousandSeparator()}`, 'g'), '')
|
|
392
|
+
.replace(new RegExp(`\\${this.decimalSeparator()}`, 'g'), '.');
|
|
517
393
|
if (numericStr === '.' || numericStr === '') {
|
|
518
394
|
numericStr = '0';
|
|
519
395
|
}
|
|
@@ -529,28 +405,6 @@ class NumericMaskDirective {
|
|
|
529
405
|
}
|
|
530
406
|
return { bigNumber, numeric: bigNumber.toNumber(), isNegative };
|
|
531
407
|
}
|
|
532
|
-
/**
|
|
533
|
-
* Groups an integer digit string (optionally signed) using `thousandSeparator`.
|
|
534
|
-
*
|
|
535
|
-
* Previously this used `Intl.NumberFormat(currentLocale)` and then tried to strip the
|
|
536
|
-
* locale's own grouping via `.split(decimalSeparator())`, which (a) ignored a custom
|
|
537
|
-
* `thousandSeparator` entirely — always falling back to the locale's own grouping
|
|
538
|
-
* character instead, e.g. `thousandSeparator=""` had no effect — and (b) corrupted the
|
|
539
|
-
* result whenever the locale's grouping character happened to equal `decimalSeparator`
|
|
540
|
-
* (e.g. a custom `decimalSeparator="."` under `pt-BR`, which groups thousands with `.`
|
|
541
|
-
* too): `"1.234".split('.')[0]` returned `"1"` instead of `"1234"`. Grouping the digits
|
|
542
|
-
* directly with the directive's own (already locale/explicit-resolved) `thousandSeparator`
|
|
543
|
-
* avoids the detour through `Intl.NumberFormat` and both bugs.
|
|
544
|
-
* @private
|
|
545
|
-
*/
|
|
546
|
-
groupIntegerDigits(integerPart) {
|
|
547
|
-
const numericValue = parseInt(integerPart, 10) || 0;
|
|
548
|
-
const isNegative = numericValue < 0;
|
|
549
|
-
const digits = Math.abs(numericValue).toString();
|
|
550
|
-
const sep = this.thousandSeparator();
|
|
551
|
-
const grouped = sep ? digits.replace(/\B(?=(\d{3})+(?!\d))/g, sep) : digits;
|
|
552
|
-
return isNegative ? `-${grouped}` : grouped;
|
|
553
|
-
}
|
|
554
408
|
/**
|
|
555
409
|
* Formats a numeric value according to the locale
|
|
556
410
|
* Truncates (never rounds) to maxDecimalPlaces and pads with zeros to minDecimalPlaces
|
|
@@ -564,7 +418,9 @@ class NumericMaskDirective {
|
|
|
564
418
|
const parts = formattedValue.split(this.decimalSeparator());
|
|
565
419
|
const integerPart = parts[0];
|
|
566
420
|
let decimalPart = parts[1] || '';
|
|
567
|
-
const formattedInteger = this.
|
|
421
|
+
const formattedInteger = new Intl.NumberFormat(this.currentLocale)
|
|
422
|
+
.format(parseInt(integerPart, 10) || 0)
|
|
423
|
+
.split(this.decimalSeparator())[0];
|
|
568
424
|
const effectiveDecimalPlaces = decimalPart.replace(/0+$/, '').length;
|
|
569
425
|
const decimalPlacesToShow = Math.max(this.minDecimalPlaces(), Math.min(effectiveDecimalPlaces, this.maxDecimalPlaces()));
|
|
570
426
|
decimalPart = decimalPart.substring(0, decimalPlacesToShow).padEnd(decimalPlacesToShow, '0');
|
|
@@ -662,13 +518,10 @@ class NumericMaskDirective {
|
|
|
662
518
|
this.renderer.setProperty(this.elementRef.nativeElement, 'disabled', isDisabled);
|
|
663
519
|
}
|
|
664
520
|
validate(control) {
|
|
665
|
-
const
|
|
666
|
-
if (!
|
|
521
|
+
const value = control.value;
|
|
522
|
+
if (!value) {
|
|
667
523
|
return null;
|
|
668
524
|
}
|
|
669
|
-
// The model may be set programmatically as a `number` (e.g. `patchValue` with a backend DTO),
|
|
670
|
-
// even though the value this directive emits is always a decimal `string`.
|
|
671
|
-
const value = String(controlValue);
|
|
672
525
|
const numericValue = parseFloat(value);
|
|
673
526
|
if (isNaN(numericValue)) {
|
|
674
527
|
return null;
|
|
@@ -703,24 +556,10 @@ class NumericMaskDirective {
|
|
|
703
556
|
},
|
|
704
557
|
};
|
|
705
558
|
}
|
|
706
|
-
const precision = this.precision();
|
|
707
|
-
if (precision !== undefined) {
|
|
708
|
-
const numericStr = String(value).replace('-', '');
|
|
709
|
-
const [intPart, decPart = ''] = numericStr.split('.');
|
|
710
|
-
const totalDigits = intPart.length + decPart.length;
|
|
711
|
-
if (totalDigits > precision) {
|
|
712
|
-
return {
|
|
713
|
-
exceedsPrecision: {
|
|
714
|
-
precision,
|
|
715
|
-
actual: totalDigits,
|
|
716
|
-
},
|
|
717
|
-
};
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
559
|
return null;
|
|
721
560
|
}
|
|
722
561
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NumericMaskDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
723
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: NumericMaskDirective, isStandalone: true, selector: "[sNumericMask]", inputs: { locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, minDecimalPlaces: { classPropertyName: "minDecimalPlaces", publicName: "minDecimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, maxDecimalPlaces: { classPropertyName: "maxDecimalPlaces", publicName: "maxDecimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, allowNegative: { classPropertyName: "allowNegative", publicName: "allowNegative", isSignal: true, isRequired: false, transformFunction: null }, allowScientificNotation: { classPropertyName: "allowScientificNotation", publicName: "allowScientificNotation", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, blockDecimalOverflow: { classPropertyName: "blockDecimalOverflow", publicName: "blockDecimalOverflow", isSignal: true, isRequired: false, transformFunction: null }, decimalRoundingMode: { classPropertyName: "decimalRoundingMode", publicName: "decimalRoundingMode", isSignal: true, isRequired: false, transformFunction: null },
|
|
562
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: NumericMaskDirective, isStandalone: true, selector: "[sNumericMask]", inputs: { locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, minDecimalPlaces: { classPropertyName: "minDecimalPlaces", publicName: "minDecimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, maxDecimalPlaces: { classPropertyName: "maxDecimalPlaces", publicName: "maxDecimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, allowNegative: { classPropertyName: "allowNegative", publicName: "allowNegative", isSignal: true, isRequired: false, transformFunction: null }, allowScientificNotation: { classPropertyName: "allowScientificNotation", publicName: "allowScientificNotation", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, blockDecimalOverflow: { classPropertyName: "blockDecimalOverflow", publicName: "blockDecimalOverflow", isSignal: true, isRequired: false, transformFunction: null }, decimalRoundingMode: { classPropertyName: "decimalRoundingMode", publicName: "decimalRoundingMode", isSignal: true, isRequired: false, transformFunction: null }, decimalSeparator: { classPropertyName: "decimalSeparator", publicName: "decimalSeparator", isSignal: true, isRequired: false, transformFunction: null }, thousandSeparator: { classPropertyName: "thousandSeparator", publicName: "thousandSeparator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { decimalSeparator: "decimalSeparatorChange", thousandSeparator: "thousandSeparatorChange" }, host: { listeners: { "input": "onInput($event)", "focus": "onFocus()", "blur": "onBlur()", "paste": "onPaste($event)", "keydown": "onKeyDown($event)", "keypress": "onKeyPress($event)" }, properties: { "style.text-align": "\"right\"" } }, providers: [
|
|
724
563
|
{
|
|
725
564
|
provide: NG_VALUE_ACCESSOR,
|
|
726
565
|
useExisting: forwardRef(() => NumericMaskDirective),
|
|
@@ -746,8 +585,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
746
585
|
'(keydown)': 'onKeyDown($event)',
|
|
747
586
|
'(keypress)': 'onKeyPress($event)',
|
|
748
587
|
'[style.text-align]': '"right"',
|
|
749
|
-
'[attr.maxLength]': 'maxLength',
|
|
750
|
-
'[attr.placeholder]': 'placeholder()',
|
|
751
588
|
},
|
|
752
589
|
providers: [
|
|
753
590
|
{
|
|
@@ -764,13 +601,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
764
601
|
}]
|
|
765
602
|
}] });
|
|
766
603
|
|
|
767
|
-
/**
|
|
768
|
-
* @deprecated Será removido na v20. Importe diretamente o standalone `NumericMaskDirective` (de
|
|
769
|
-
* `@seniorsistemas/angular-components/numeric-mask`) no lugar deste módulo.
|
|
770
|
-
*
|
|
771
|
-
* Migração automática (também executada pelo `ng update` na v20):
|
|
772
|
-
* `ng generate @seniorsistemas/angular-components:migrate-modules-to-standalone`
|
|
773
|
-
*/
|
|
774
604
|
class CurrencyMaskModule {
|
|
775
605
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CurrencyMaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
776
606
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: CurrencyMaskModule, imports: [NumericMaskDirective], exports: [NumericMaskDirective] });
|