structra-ui 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -3
- package/app/_utils/date-pt-br.utils.d.ts +24 -0
- package/app/_utils/decimal-br.utils.d.ts +52 -0
- package/app/_utils/estados-br.data.d.ts +10 -0
- package/app/_utils/integer-br.utils.d.ts +17 -0
- package/app/_utils/integer-value.utils.d.ts +5 -0
- package/app/_utils/scroll/body-scroll-lock.util.d.ts +22 -0
- package/app/app-shell/_models/breadcrumb-item.model.d.ts +13 -0
- package/app/app-shell/app-shell-sidebar-template.directive.d.ts +19 -0
- package/app/app-shell/app-shell.component.d.ts +41 -0
- package/app/app-shell/breadcrumb/breadcrumb.component.d.ts +10 -0
- package/app/app-shell/index.d.ts +19 -0
- package/app/app-shell/sidebar/app-sidebar-toolbar.directive.d.ts +14 -0
- package/app/app-shell/sidebar/shell-sidebar-toggle.component.d.ts +19 -0
- package/app/app-shell/sidebar/sidebar.component.d.ts +36 -0
- package/app/app-shell/sidebar-reveal.constants.d.ts +8 -0
- package/app/app-shell/topbar/topbar.component.d.ts +8 -0
- package/app/app-shell/user-menu/user-menu.component.d.ts +25 -0
- package/app/buttons/base-button/base-button.component.d.ts +43 -0
- package/app/buttons/index.d.ts +1 -0
- package/app/data-display/_models/card-item-view.model.d.ts +8 -0
- package/app/data-display/_models/data-display.models.d.ts +11 -0
- package/app/data-display/_models/data-grid-column.model.d.ts +13 -0
- package/app/data-display/_models/index.d.ts +2 -0
- package/app/data-display/adaptive-data-view/adaptive-data-view.component.d.ts +53 -0
- package/app/data-display/card-list/card-list.component.d.ts +70 -0
- package/app/data-display/dashboard-section/dashboard-section.component.d.ts +12 -0
- package/app/data-display/data-card/data-card.component.d.ts +16 -0
- package/app/data-display/data-grid/data-grid-actions-cell-renderer.component.d.ts +21 -0
- package/app/data-display/data-grid/data-grid.component.d.ts +76 -0
- package/app/data-display/data-list/data-list.component.d.ts +18 -0
- package/app/data-display/data-toolbar/data-toolbar.component.d.ts +6 -0
- package/app/data-display/details-field/details-field.component.d.ts +10 -0
- package/app/data-display/details-view/details-view.component.d.ts +26 -0
- package/app/data-display/empty-state/empty-state-overlay.util.d.ts +5 -0
- package/app/data-display/empty-state/empty-state.component.d.ts +13 -0
- package/app/data-display/index.d.ts +20 -0
- package/app/data-display/list-item/list-item.component.d.ts +22 -0
- package/app/data-display/stat-card/stat-card.component.d.ts +23 -0
- package/app/data-display/status-badge/status-badge.component.d.ts +17 -0
- package/app/data-display/table-empty-state/table-empty-state.component.d.ts +14 -0
- package/app/data-display/table-toolbar/table-toolbar.component.d.ts +11 -0
- package/app/dialogs/_models/lib-dialog-size.model.d.ts +6 -0
- package/app/dialogs/_utils/lib-dialog-panel-classes.d.ts +3 -0
- package/app/dialogs/app-dialog/app-dialog.component.d.ts +57 -0
- package/app/dialogs/app-dialog/dialog-footer.directive.d.ts +6 -0
- package/app/dialogs/confirm-dialog/confirm-dialog-data.model.d.ts +13 -0
- package/app/dialogs/confirm-dialog/confirm-dialog.component.d.ts +20 -0
- package/app/dialogs/confirm-dialog/confirm-dialog.service.d.ts +17 -0
- package/app/dialogs/index.d.ts +13 -0
- package/app/dialogs/loading-dialog/loading-dialog-data.model.d.ts +7 -0
- package/app/dialogs/loading-dialog/loading-dialog.component.d.ts +9 -0
- package/app/dialogs/loading-dialog/loading-dialog.service.d.ts +15 -0
- package/app/dialogs/toast/toast-host.component.d.ts +13 -0
- package/app/dialogs/toast/toast.models.d.ts +26 -0
- package/app/dialogs/toast/toast.service.d.ts +17 -0
- package/app/fields/checkbox-fields/_base/boolean-field.directive.d.ts +42 -0
- package/app/fields/checkbox-fields/checkbox-field/checkbox-field.component.d.ts +8 -0
- package/app/fields/checkbox-fields/index.d.ts +3 -0
- package/app/fields/checkbox-fields/switch-field/switch-field.component.d.ts +8 -0
- package/app/fields/dropdown-fields/_base/dropdown-base/dropdown-base.component.d.ts +62 -0
- package/app/fields/dropdown-fields/_base/dropdown-multi-option-field.base.d.ts +40 -0
- package/app/fields/dropdown-fields/_base/dropdown-option-field.base.d.ts +47 -0
- package/app/fields/dropdown-fields/_base/dropdown-trigger-blur.util.d.ts +18 -0
- package/app/fields/dropdown-fields/_models/dropdown-list-bindings.model.d.ts +13 -0
- package/app/fields/dropdown-fields/_models/dropdown-search-page-requested.model.d.ts +7 -0
- package/app/fields/dropdown-fields/_models/index.d.ts +4 -0
- package/app/fields/dropdown-fields/_models/select-option.model.d.ts +5 -0
- package/app/fields/dropdown-fields/_models/select-pagination.model.d.ts +6 -0
- package/app/fields/dropdown-fields/dropdown-search-field/dropdown-search-field.component.d.ts +84 -0
- package/app/fields/dropdown-fields/index.d.ts +7 -0
- package/app/fields/dropdown-fields/multiselect-field/multiselect-field.component.d.ts +49 -0
- package/app/fields/dropdown-fields/select-field/select-field.component.d.ts +54 -0
- package/app/fields/input-fields/_base/base-field.component.d.ts +60 -0
- package/app/fields/input-fields/_base/base-field.directive.d.ts +102 -0
- package/app/fields/input-fields/_base/masked-text-field.base.d.ts +34 -0
- package/app/fields/input-fields/_base/ng-control-field.directive.d.ts +43 -0
- package/app/fields/input-fields/_models/field-common-inputs.model.d.ts +49 -0
- package/app/fields/input-fields/_models/index.d.ts +1 -0
- package/app/fields/input-fields/_utils/mask-complete.validators.d.ts +18 -0
- package/app/fields/input-fields/_utils/mask-format.utils.d.ts +13 -0
- package/app/fields/input-fields/cep-field/cep-field.component.d.ts +12 -0
- package/app/fields/input-fields/cpf-cnpj-field/cpf-cnpj-field.component.d.ts +20 -0
- package/app/fields/input-fields/date-field/date-field.component.d.ts +30 -0
- package/app/fields/input-fields/decimal-field/decimal-field.component.d.ts +17 -0
- package/app/fields/input-fields/index.d.ts +22 -0
- package/app/fields/input-fields/input-mask-field/input-mask-field.component.d.ts +16 -0
- package/app/fields/input-fields/integer-field/integer-field.component.d.ts +17 -0
- package/app/fields/input-fields/password-field/password-field.component.d.ts +30 -0
- package/app/fields/input-fields/phone-field/phone-field.component.d.ts +22 -0
- package/app/fields/input-fields/text-field/text-field.component.d.ts +16 -0
- package/app/fields/input-fields/textarea-field/textarea-field.component.d.ts +31 -0
- package/app/form-layout/_models/form-layout.model.d.ts +41 -0
- package/app/form-layout/_models/form-tabs.model.d.ts +1 -0
- package/app/form-layout/_models/index.d.ts +3 -0
- package/app/form-layout/_models/validation-summary.model.d.ts +8 -0
- package/app/form-layout/form-actions/form-actions.component.d.ts +21 -0
- package/app/form-layout/form-col/form-col.component.d.ts +25 -0
- package/app/form-layout/form-group/form-group.component.d.ts +125 -0
- package/app/form-layout/form-group/form-path.utils.d.ts +16 -0
- package/app/form-layout/form-group/form-root-invalid-ui-refresh.util.d.ts +8 -0
- package/app/form-layout/form-row/form-row.component.d.ts +14 -0
- package/app/form-layout/form-section/form-section.component.d.ts +13 -0
- package/app/form-layout/form-tab/form-tab.component.d.ts +32 -0
- package/app/form-layout/form-tabs/form-tabs.component.d.ts +44 -0
- package/app/form-layout/index.d.ts +14 -0
- package/app/form-layout/layout-stack/layout-stack.component.d.ts +25 -0
- package/app/form-layout/validation-summary/validation-summary.component.d.ts +105 -0
- package/app/loading/skeleton-loading/index.d.ts +6 -0
- package/app/loading/skeleton-loading/skeleton-block/skeleton-block.component.d.ts +15 -0
- package/app/loading/skeleton-loading/skeleton-card/skeleton-card.component.d.ts +10 -0
- package/app/loading/skeleton-loading/skeleton-field-shell/skeleton-field-shell.component.d.ts +21 -0
- package/app/loading/skeleton-loading/skeleton-list/skeleton-list.component.d.ts +17 -0
- package/app/loading/skeleton-loading/skeleton-table/skeleton-table.component.d.ts +16 -0
- package/app/loading/skeleton-loading/skeleton-text/skeleton-text.component.d.ts +17 -0
- package/app/menus/_models/drawer-side.model.d.ts +6 -0
- package/app/menus/_models/drawer-size.model.d.ts +6 -0
- package/app/menus/_models/menu-dropdown-placement.model.d.ts +10 -0
- package/app/menus/_models/menu-item.model.d.ts +47 -0
- package/app/menus/_utils/menu-connected-positions.util.d.ts +4 -0
- package/app/menus/_utils/menu-rows.util.d.ts +22 -0
- package/app/menus/_utils/submenu-connected-positions.util.d.ts +5 -0
- package/app/menus/action-menu/action-menu.component.d.ts +24 -0
- package/app/menus/context-menu/context-menu.component.d.ts +32 -0
- package/app/menus/drawer/drawer.component.d.ts +38 -0
- package/app/menus/dropdown-menu/dropdown-menu.component.d.ts +33 -0
- package/app/menus/index.d.ts +11 -0
- package/app/menus/menu-divider/menu-divider.component.d.ts +8 -0
- package/app/menus/menu-group/menu-group.component.d.ts +13 -0
- package/app/menus/menu-list/menu-list.component.d.ts +77 -0
- package/app/overlay/_models/overlay-placement.model.d.ts +9 -0
- package/app/overlay/_utils/anchored-overlay-positions.util.d.ts +9 -0
- package/app/overlay/anchored-overlay/anchored-overlay.component.d.ts +51 -0
- package/app/overlay/index.d.ts +20 -0
- package/app/overlay/popover/popover-body-template.directive.d.ts +7 -0
- package/app/overlay/popover/popover-footer-template.directive.d.ts +7 -0
- package/app/overlay/popover/popover-trigger.directive.d.ts +6 -0
- package/app/overlay/popover/popover.component.d.ts +38 -0
- package/app/overlay/tooltip/tooltip-panel-template.directive.d.ts +10 -0
- package/app/overlay/tooltip/tooltip.component.d.ts +40 -0
- package/app/theme/app-theme.service.d.ts +25 -0
- package/app/theme/index.d.ts +1 -0
- package/esm2022/app/_utils/date-pt-br.utils.mjs +82 -0
- package/esm2022/app/_utils/decimal-br.utils.mjs +154 -0
- package/esm2022/app/_utils/estados-br.data.mjs +37 -0
- package/esm2022/app/_utils/integer-br.utils.mjs +48 -0
- package/esm2022/app/_utils/integer-value.utils.mjs +19 -0
- package/esm2022/app/_utils/scroll/body-scroll-lock.util.mjs +43 -0
- package/esm2022/app/app-shell/_models/breadcrumb-item.model.mjs +2 -0
- package/esm2022/app/app-shell/app-shell-sidebar-template.directive.mjs +29 -0
- package/esm2022/app/app-shell/app-shell.component.mjs +105 -0
- package/esm2022/app/app-shell/breadcrumb/breadcrumb.component.mjs +18 -0
- package/esm2022/app/app-shell/index.mjs +19 -0
- package/esm2022/app/app-shell/sidebar/app-sidebar-toolbar.directive.mjs +23 -0
- package/esm2022/app/app-shell/sidebar/shell-sidebar-toggle.component.mjs +36 -0
- package/esm2022/app/app-shell/sidebar/sidebar.component.mjs +84 -0
- package/esm2022/app/app-shell/sidebar-reveal.constants.mjs +9 -0
- package/esm2022/app/app-shell/topbar/topbar.component.mjs +14 -0
- package/esm2022/app/app-shell/user-menu/user-menu.component.mjs +52 -0
- package/esm2022/app/buttons/base-button/base-button.component.mjs +97 -0
- package/esm2022/app/buttons/index.mjs +2 -0
- package/esm2022/app/data-display/_models/card-item-view.model.mjs +2 -0
- package/esm2022/app/data-display/_models/data-display.models.mjs +2 -0
- package/esm2022/app/data-display/_models/data-grid-column.model.mjs +2 -0
- package/esm2022/app/data-display/_models/index.mjs +2 -0
- package/esm2022/app/data-display/adaptive-data-view/adaptive-data-view.component.mjs +124 -0
- package/esm2022/app/data-display/card-list/card-list.component.mjs +208 -0
- package/esm2022/app/data-display/dashboard-section/dashboard-section.component.mjs +25 -0
- package/esm2022/app/data-display/data-card/data-card.component.mjs +40 -0
- package/esm2022/app/data-display/data-grid/data-grid-actions-cell-renderer.component.mjs +41 -0
- package/esm2022/app/data-display/data-grid/data-grid.component.mjs +253 -0
- package/esm2022/app/data-display/data-list/data-list.component.mjs +40 -0
- package/esm2022/app/data-display/data-toolbar/data-toolbar.component.mjs +12 -0
- package/esm2022/app/data-display/details-field/details-field.component.mjs +21 -0
- package/esm2022/app/data-display/details-view/details-view.component.mjs +44 -0
- package/esm2022/app/data-display/empty-state/empty-state-overlay.util.mjs +19 -0
- package/esm2022/app/data-display/empty-state/empty-state.component.mjs +30 -0
- package/esm2022/app/data-display/index.mjs +19 -0
- package/esm2022/app/data-display/list-item/list-item.component.mjs +59 -0
- package/esm2022/app/data-display/stat-card/stat-card.component.mjs +59 -0
- package/esm2022/app/data-display/status-badge/status-badge.component.mjs +41 -0
- package/esm2022/app/data-display/table-empty-state/table-empty-state.component.mjs +31 -0
- package/esm2022/app/data-display/table-toolbar/table-toolbar.component.mjs +22 -0
- package/esm2022/app/dialogs/_models/lib-dialog-size.model.mjs +8 -0
- package/esm2022/app/dialogs/_utils/lib-dialog-panel-classes.mjs +6 -0
- package/esm2022/app/dialogs/app-dialog/app-dialog.component.mjs +170 -0
- package/esm2022/app/dialogs/app-dialog/dialog-footer.directive.mjs +15 -0
- package/esm2022/app/dialogs/confirm-dialog/confirm-dialog-data.model.mjs +2 -0
- package/esm2022/app/dialogs/confirm-dialog/confirm-dialog.component.mjs +36 -0
- package/esm2022/app/dialogs/confirm-dialog/confirm-dialog.service.mjs +45 -0
- package/esm2022/app/dialogs/index.mjs +11 -0
- package/esm2022/app/dialogs/loading-dialog/loading-dialog-data.model.mjs +2 -0
- package/esm2022/app/dialogs/loading-dialog/loading-dialog.component.mjs +19 -0
- package/esm2022/app/dialogs/loading-dialog/loading-dialog.service.mjs +36 -0
- package/esm2022/app/dialogs/toast/toast-host.component.mjs +65 -0
- package/esm2022/app/dialogs/toast/toast.models.mjs +2 -0
- package/esm2022/app/dialogs/toast/toast.service.mjs +76 -0
- package/esm2022/app/fields/checkbox-fields/_base/boolean-field.directive.mjs +158 -0
- package/esm2022/app/fields/checkbox-fields/checkbox-field/checkbox-field.component.mjs +36 -0
- package/esm2022/app/fields/checkbox-fields/index.mjs +4 -0
- package/esm2022/app/fields/checkbox-fields/switch-field/switch-field.component.mjs +35 -0
- package/esm2022/app/fields/dropdown-fields/_base/dropdown-base/dropdown-base.component.mjs +117 -0
- package/esm2022/app/fields/dropdown-fields/_base/dropdown-multi-option-field.base.mjs +152 -0
- package/esm2022/app/fields/dropdown-fields/_base/dropdown-option-field.base.mjs +149 -0
- package/esm2022/app/fields/dropdown-fields/_base/dropdown-trigger-blur.util.mjs +32 -0
- package/esm2022/app/fields/dropdown-fields/_models/dropdown-list-bindings.model.mjs +2 -0
- package/esm2022/app/fields/dropdown-fields/_models/dropdown-search-page-requested.model.mjs +2 -0
- package/esm2022/app/fields/dropdown-fields/_models/index.mjs +2 -0
- package/esm2022/app/fields/dropdown-fields/_models/select-option.model.mjs +2 -0
- package/esm2022/app/fields/dropdown-fields/_models/select-pagination.model.mjs +2 -0
- package/esm2022/app/fields/dropdown-fields/dropdown-search-field/dropdown-search-field.component.mjs +520 -0
- package/esm2022/app/fields/dropdown-fields/index.mjs +7 -0
- package/esm2022/app/fields/dropdown-fields/multiselect-field/multiselect-field.component.mjs +379 -0
- package/esm2022/app/fields/dropdown-fields/select-field/select-field.component.mjs +359 -0
- package/esm2022/app/fields/input-fields/_base/base-field.component.mjs +151 -0
- package/esm2022/app/fields/input-fields/_base/base-field.directive.mjs +224 -0
- package/esm2022/app/fields/input-fields/_base/masked-text-field.base.mjs +135 -0
- package/esm2022/app/fields/input-fields/_base/ng-control-field.directive.mjs +127 -0
- package/esm2022/app/fields/input-fields/_models/field-common-inputs.model.mjs +2 -0
- package/esm2022/app/fields/input-fields/_models/index.mjs +2 -0
- package/esm2022/app/fields/input-fields/_utils/mask-complete.validators.mjs +61 -0
- package/esm2022/app/fields/input-fields/_utils/mask-format.utils.mjs +40 -0
- package/esm2022/app/fields/input-fields/cep-field/cep-field.component.mjs +48 -0
- package/esm2022/app/fields/input-fields/cpf-cnpj-field/cpf-cnpj-field.component.mjs +61 -0
- package/esm2022/app/fields/input-fields/date-field/date-field.component.mjs +147 -0
- package/esm2022/app/fields/input-fields/decimal-field/decimal-field.component.mjs +166 -0
- package/esm2022/app/fields/input-fields/index.mjs +22 -0
- package/esm2022/app/fields/input-fields/input-mask-field/input-mask-field.component.mjs +52 -0
- package/esm2022/app/fields/input-fields/integer-field/integer-field.component.mjs +143 -0
- package/esm2022/app/fields/input-fields/password-field/password-field.component.mjs +130 -0
- package/esm2022/app/fields/input-fields/phone-field/phone-field.component.mjs +66 -0
- package/esm2022/app/fields/input-fields/text-field/text-field.component.mjs +90 -0
- package/esm2022/app/fields/input-fields/textarea-field/textarea-field.component.mjs +125 -0
- package/esm2022/app/form-layout/_models/form-layout.model.mjs +48 -0
- package/esm2022/app/form-layout/_models/form-tabs.model.mjs +2 -0
- package/esm2022/app/form-layout/_models/index.mjs +2 -0
- package/esm2022/app/form-layout/_models/validation-summary.model.mjs +2 -0
- package/esm2022/app/form-layout/form-actions/form-actions.component.mjs +55 -0
- package/esm2022/app/form-layout/form-col/form-col.component.mjs +76 -0
- package/esm2022/app/form-layout/form-group/form-group.component.mjs +358 -0
- package/esm2022/app/form-layout/form-group/form-path.utils.mjs +65 -0
- package/esm2022/app/form-layout/form-group/form-root-invalid-ui-refresh.util.mjs +54 -0
- package/esm2022/app/form-layout/form-row/form-row.component.mjs +49 -0
- package/esm2022/app/form-layout/form-section/form-section.component.mjs +43 -0
- package/esm2022/app/form-layout/form-tab/form-tab.component.mjs +67 -0
- package/esm2022/app/form-layout/form-tabs/form-tabs.component.mjs +126 -0
- package/esm2022/app/form-layout/index.mjs +14 -0
- package/esm2022/app/form-layout/layout-stack/layout-stack.component.mjs +56 -0
- package/esm2022/app/form-layout/validation-summary/validation-summary.component.mjs +343 -0
- package/esm2022/app/loading/skeleton-loading/index.mjs +7 -0
- package/esm2022/app/loading/skeleton-loading/skeleton-block/skeleton-block.component.mjs +43 -0
- package/esm2022/app/loading/skeleton-loading/skeleton-card/skeleton-card.component.mjs +23 -0
- package/esm2022/app/loading/skeleton-loading/skeleton-field-shell/skeleton-field-shell.component.mjs +34 -0
- package/esm2022/app/loading/skeleton-loading/skeleton-list/skeleton-list.component.mjs +38 -0
- package/esm2022/app/loading/skeleton-loading/skeleton-table/skeleton-table.component.mjs +37 -0
- package/esm2022/app/loading/skeleton-loading/skeleton-text/skeleton-text.component.mjs +45 -0
- package/esm2022/app/menus/_models/drawer-side.model.mjs +8 -0
- package/esm2022/app/menus/_models/drawer-size.model.mjs +8 -0
- package/esm2022/app/menus/_models/menu-dropdown-placement.model.mjs +12 -0
- package/esm2022/app/menus/_models/menu-item.model.mjs +6 -0
- package/esm2022/app/menus/_utils/menu-connected-positions.util.mjs +41 -0
- package/esm2022/app/menus/_utils/menu-rows.util.mjs +39 -0
- package/esm2022/app/menus/_utils/submenu-connected-positions.util.mjs +23 -0
- package/esm2022/app/menus/action-menu/action-menu.component.mjs +48 -0
- package/esm2022/app/menus/context-menu/context-menu.component.mjs +112 -0
- package/esm2022/app/menus/drawer/drawer.component.mjs +142 -0
- package/esm2022/app/menus/dropdown-menu/dropdown-menu.component.mjs +99 -0
- package/esm2022/app/menus/index.mjs +11 -0
- package/esm2022/app/menus/menu-divider/menu-divider.component.mjs +14 -0
- package/esm2022/app/menus/menu-group/menu-group.component.mjs +32 -0
- package/esm2022/app/menus/menu-list/menu-list.component.mjs +399 -0
- package/esm2022/app/overlay/_models/overlay-placement.model.mjs +11 -0
- package/esm2022/app/overlay/_utils/anchored-overlay-positions.util.mjs +84 -0
- package/esm2022/app/overlay/anchored-overlay/anchored-overlay.component.mjs +121 -0
- package/esm2022/app/overlay/index.mjs +21 -0
- package/esm2022/app/overlay/popover/popover-body-template.directive.mjs +17 -0
- package/esm2022/app/overlay/popover/popover-footer-template.directive.mjs +17 -0
- package/esm2022/app/overlay/popover/popover-trigger.directive.mjs +15 -0
- package/esm2022/app/overlay/popover/popover.component.mjs +93 -0
- package/esm2022/app/overlay/tooltip/tooltip-panel-template.directive.mjs +20 -0
- package/esm2022/app/overlay/tooltip/tooltip.component.mjs +118 -0
- package/esm2022/app/theme/app-theme.service.mjs +49 -0
- package/esm2022/app/theme/index.mjs +2 -0
- package/esm2022/structra-public-api.mjs +18 -0
- package/esm2022/structra-ui.mjs +2 -2
- package/esm2022/structra-version.mjs +3 -0
- package/fesm2022/structra-ui.mjs +8856 -4
- package/fesm2022/structra-ui.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +7 -2
- package/structra-public-api.d.ts +17 -0
- package/structra-version.d.ts +2 -0
- package/esm2022/lib/version.mjs +0 -3
- package/esm2022/public-api.mjs +0 -5
- package/lib/version.d.ts +0 -2
- package/public-api.d.ts +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DoCheck, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { AbstractControl, NgControl } from '@angular/forms';
|
|
3
|
+
import { BaseFieldDirective } from './base-field.directive';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Campos com `NgControl` + CVA: injeta o control e expõe estado de erro/a11y comuns.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class NgControlFieldDirective<T> extends BaseFieldDirective<T> implements OnInit, OnChanges, DoCheck {
|
|
9
|
+
protected ngControl: NgControl | null;
|
|
10
|
+
/** `FormGroupDirective.submitted` muda com `resetForm()` sem `ngSubmit` — OnPush precisa disto para a borda/erro. */
|
|
11
|
+
private lastParentSubmitted;
|
|
12
|
+
/**
|
|
13
|
+
* Texto do label flutuante em `app-base-field` (`label` ou `placeholder`).
|
|
14
|
+
* Mantido em campo (não getter) para reduzir trabalho por ciclo de deteção.
|
|
15
|
+
*/
|
|
16
|
+
floatLabelCaption: string;
|
|
17
|
+
/** Cache para o template (evita `getErrorMessage()` / getters a cada CD). */
|
|
18
|
+
uiErrorMessage: string;
|
|
19
|
+
uiRequiredEffective: boolean;
|
|
20
|
+
uiInvalid: boolean;
|
|
21
|
+
uiAriaDescribedBy: string | null;
|
|
22
|
+
protected resolveControlForRequired(): AbstractControl | null | undefined;
|
|
23
|
+
ngOnChanges(_changes: SimpleChanges): void;
|
|
24
|
+
private refreshFloatLabelCaption;
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
ngDoCheck(): void;
|
|
27
|
+
writeValue(value: T | null): void;
|
|
28
|
+
/**
|
|
29
|
+
* Após propagar o valor ao `FormControl`, reavalia já `uiInvalid` / a11y.
|
|
30
|
+
* Só confiar em `valueChanges` pode deixar o estado visual desfasado (ex.: select após escolha).
|
|
31
|
+
*/
|
|
32
|
+
protected emitModelValue(value: T | null): void;
|
|
33
|
+
protected registerFormSubmitRecheck(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Actualiza caches usados no template após mudança de valor/estado do control
|
|
36
|
+
* ou de inputs que afectam mensagem / obrigatório.
|
|
37
|
+
*/
|
|
38
|
+
protected syncControlUi(): void;
|
|
39
|
+
get baseInvalid(): boolean;
|
|
40
|
+
get errorElementId(): string;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgControlFieldDirective<any>, never>;
|
|
42
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgControlFieldDirective<any>, never, never, {}, {}, never, never, false, never>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { MenuNodeItem } from '../../../menus/_models/menu-item.model';
|
|
2
|
+
/**
|
|
3
|
+
* Contrato documental de entradas visuais comuns (campos com `BaseFieldDirective`).
|
|
4
|
+
* Nem todos os membros existem em todos os componentes; use como referência de API.
|
|
5
|
+
*
|
|
6
|
+
* **Aliases estáveis:** `iconLeft` → `prefixIcon` (mesmo valor).
|
|
7
|
+
*/
|
|
8
|
+
export interface FieldCommonInputs {
|
|
9
|
+
label: string;
|
|
10
|
+
placeholder: string;
|
|
11
|
+
/** Mensagem de erro sob o campo; vazia usa o texto padrão quando inválido. */
|
|
12
|
+
errorMessage: string;
|
|
13
|
+
/** Por defeito `false` na `BaseFieldDirective`. */
|
|
14
|
+
showErrorMessage?: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
readonly: boolean;
|
|
17
|
+
required: boolean;
|
|
18
|
+
/** Asterisco no label quando obrigatório; padrão `false` na `BaseFieldDirective`. */
|
|
19
|
+
showRequiredMark?: boolean;
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
/** Ícone Font Awesome à esquerda; use com `showPrefixIcon`. */
|
|
23
|
+
showPrefixIcon?: boolean;
|
|
24
|
+
prefixIcon?: string;
|
|
25
|
+
/** Alias de `prefixIcon`. */
|
|
26
|
+
iconLeft?: string;
|
|
27
|
+
clearable?: boolean;
|
|
28
|
+
clearAriaLabel?: string;
|
|
29
|
+
/** `true` = sugestões do navegador; padrão nos componentes é `false`. */
|
|
30
|
+
autocomplete?: boolean;
|
|
31
|
+
/** Skeleton no `app-base-field` enquanto dados externos carregam. */
|
|
32
|
+
loading?: boolean;
|
|
33
|
+
/** Botão «…» no sufixo com menu de ações; padrão `false` na `BaseFieldDirective`. */
|
|
34
|
+
mostrarMenuContexto?: boolean;
|
|
35
|
+
/** Itens do menu do sufixo; só mostra o botão se a lista tiver entradas. */
|
|
36
|
+
contextMenuItems?: readonly MenuNodeItem<string>[];
|
|
37
|
+
/** `id` ARIA do menu do sufixo; por defeito `{id do campo}-ctx`. */
|
|
38
|
+
contextMenuId?: string;
|
|
39
|
+
/** Texto: limite de caracteres (padrão no componente). */
|
|
40
|
+
maxLength?: number;
|
|
41
|
+
/** Inteiro/decimal: valor máximo numérico (padrão no componente). */
|
|
42
|
+
max?: number;
|
|
43
|
+
/** Data: formatação com hh:mm e hora atual ao escolher no calendário. */
|
|
44
|
+
showTimeHours?: boolean;
|
|
45
|
+
/** Data: limite inferior do calendário. */
|
|
46
|
+
minDate?: Date | null;
|
|
47
|
+
/** Data: limite superior do calendário. */
|
|
48
|
+
maxDate?: Date | null;
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { FieldCommonInputs } from './field-common-inputs.model';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
/**
|
|
3
|
+
* Validação alinhada às máscaras dinâmicas CPF/CNPJ: só dígitos; 11 ou 14 completos.
|
|
4
|
+
* Vazio fica para `Validators.required`; com dígitos a menos devolve `maskIncomplete`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function cpfCnpjMaskCompleteValidator(): ValidatorFn;
|
|
7
|
+
/**
|
|
8
|
+
* Telefone BR só dígitos (DDD + número): 10 fixo ou 11 celular, conforme {@link landline}.
|
|
9
|
+
* Usar com `app-phone-field` para que `FormControl.invalid` e ícones de grupo/aba coincidam com a UI.
|
|
10
|
+
*/
|
|
11
|
+
export declare function phoneBrMaskCompleteValidator(landline: boolean): ValidatorFn;
|
|
12
|
+
/**
|
|
13
|
+
* Máscara com número fixo de dígitos (valor do modelo só dígitos, como CEP/telefone).
|
|
14
|
+
* Valor vazio: `null` (delega em `Validators.required`); com dígitos a menos: `maskIncomplete`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function fixedDigitsMaskCompleteValidator(expectedDigits: number): ValidatorFn;
|
|
17
|
+
/** CEP brasileiro (`app-cep-field`): 8 dígitos. Usar com `Validators.required`. */
|
|
18
|
+
export declare function cepMaskCompleteValidator(): ValidatorFn;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Máscara com `#` como placeholder de um dígito (0–9); restantes caracteres são literais.
|
|
3
|
+
* Ex.: `#####-###` (CEP), `(##) #####-####` (celular BR 11 dígitos).
|
|
4
|
+
*/
|
|
5
|
+
/** Remove tudo que não é dígito. */
|
|
6
|
+
export declare function stripToDigits(s: string): string;
|
|
7
|
+
/** Conta quantos `#` existem no padrão (= número máximo de dígitos). */
|
|
8
|
+
export declare function maskDigitCount(pattern: string): number;
|
|
9
|
+
/**
|
|
10
|
+
* Formata apenas dígitos segundo o padrão. Não adiciona literais à direita sem dígitos
|
|
11
|
+
* correspondentes (ex.: não fica "12345-" com 5 dígitos).
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatMaskDigits(digitsOnly: string, pattern: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MaskedTextFieldBase } from '../_base/masked-text-field.base';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/** CEP brasileiro (8 dígitos). Valor do modelo: só dígitos, ex. `01310100`. */
|
|
4
|
+
export declare class CepFieldComponent extends MaskedTextFieldBase {
|
|
5
|
+
get hostInvalidClass(): boolean;
|
|
6
|
+
maskPattern: string;
|
|
7
|
+
onNativeInput(event: Event): void;
|
|
8
|
+
onBlur(): void;
|
|
9
|
+
onClear(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CepFieldComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CepFieldComponent, "app-cep-field", never, { "maskPattern": { "alias": "maskPattern"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MaskedTextFieldBase } from '../_base/masked-text-field.base';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* CPF (11 dígitos) ou CNPJ (14 dígitos) no mesmo campo.
|
|
5
|
+
* Até 11 dígitos: `###.###.###-##`; a partir do 12º: `##.###.###/####-##`.
|
|
6
|
+
* Valor do modelo: só dígitos, ex. `12345678901` ou `12345678000190`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class CpfCnpjFieldComponent extends MaskedTextFieldBase {
|
|
9
|
+
private static readonly CPF_MASK;
|
|
10
|
+
private static readonly CNPJ_MASK;
|
|
11
|
+
get hostInvalidClass(): boolean;
|
|
12
|
+
/** Ignorado: a máscara é definida dinamicamente por {@link maskPatternFromDigits}. */
|
|
13
|
+
maskPattern: string;
|
|
14
|
+
protected maskPatternFromDigits(digitsOnly: string): string;
|
|
15
|
+
onNativeInput(event: Event): void;
|
|
16
|
+
onBlur(): void;
|
|
17
|
+
onClear(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpfCnpjFieldComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CpfCnpjFieldComponent, "app-cpf-cnpj-field", never, { "maskPattern": { "alias": "maskPattern"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { MatDatepicker } from '@angular/material/datepicker';
|
|
3
|
+
import { NgControlFieldDirective } from '../_base/ng-control-field.directive';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DateFieldComponent extends NgControlFieldDirective<string | null> implements OnChanges {
|
|
6
|
+
picker?: MatDatepicker<Date>;
|
|
7
|
+
/**
|
|
8
|
+
* Se `true`, a formatação inclui hh:mm (24h) e, ao escolher no calendário,
|
|
9
|
+
* usa a hora actual local no momento da selecção.
|
|
10
|
+
*/
|
|
11
|
+
showTimeHours: boolean;
|
|
12
|
+
minDate: Date | null;
|
|
13
|
+
maxDate: Date | null;
|
|
14
|
+
innerDate: Date | null;
|
|
15
|
+
filledUi: boolean;
|
|
16
|
+
/** Texto da data no span (evita getter no template). */
|
|
17
|
+
displayTextUi: string;
|
|
18
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
19
|
+
private refreshFilledUi;
|
|
20
|
+
private refreshDateDisplay;
|
|
21
|
+
protected afterWriteValue(value: string | null): void;
|
|
22
|
+
openPicker(): void;
|
|
23
|
+
onGhostInputKeydown(ev: KeyboardEvent): void;
|
|
24
|
+
onPickedDate(next: Date | null): void;
|
|
25
|
+
onBlur(): void;
|
|
26
|
+
onClear(): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateFieldComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateFieldComponent, "app-date-field", never, { "showTimeHours": { "alias": "showTimeHours"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
29
|
+
static ngAcceptInputType_showTimeHours: unknown;
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NgControlFieldDirective } from '../_base/ng-control-field.directive';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DecimalFieldComponent extends NgControlFieldDirective<number | null> {
|
|
4
|
+
/** Valor máximo permitido (inclusive), com até 2 casas decimais. */
|
|
5
|
+
max: number;
|
|
6
|
+
inputText: string;
|
|
7
|
+
filledUi: boolean;
|
|
8
|
+
private refreshFilledUi;
|
|
9
|
+
protected afterWriteValue(value: number | null): void;
|
|
10
|
+
onBeforeInput(event: Event): void;
|
|
11
|
+
onNativeInput(event: Event): void;
|
|
12
|
+
onBlur(): void;
|
|
13
|
+
onClear(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DecimalFieldComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DecimalFieldComponent, "app-decimal-field", never, { "max": { "alias": "max"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
16
|
+
static ngAcceptInputType_max: unknown;
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { BaseFieldDirective } from './_base/base-field.directive';
|
|
2
|
+
export { BaseFieldComponent } from './_base/base-field.component';
|
|
3
|
+
export { NgControlFieldDirective } from './_base/ng-control-field.directive';
|
|
4
|
+
export { TextFieldComponent } from './text-field/text-field.component';
|
|
5
|
+
export { PasswordFieldComponent } from './password-field/password-field.component';
|
|
6
|
+
export { TextareaFieldComponent } from './textarea-field/textarea-field.component';
|
|
7
|
+
export { IntegerFieldComponent } from './integer-field/integer-field.component';
|
|
8
|
+
export { DecimalFieldComponent } from './decimal-field/decimal-field.component';
|
|
9
|
+
export { DateFieldComponent } from './date-field/date-field.component';
|
|
10
|
+
export { InputMaskFieldComponent } from './input-mask-field/input-mask-field.component';
|
|
11
|
+
export { CepFieldComponent } from './cep-field/cep-field.component';
|
|
12
|
+
export { PhoneFieldComponent } from './phone-field/phone-field.component';
|
|
13
|
+
export { CpfCnpjFieldComponent } from './cpf-cnpj-field/cpf-cnpj-field.component';
|
|
14
|
+
export { MaskedTextFieldBase } from './_base/masked-text-field.base';
|
|
15
|
+
export { stripToDigits, maskDigitCount, formatMaskDigits, } from './_utils/mask-format.utils';
|
|
16
|
+
export { cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, fixedDigitsMaskCompleteValidator, phoneBrMaskCompleteValidator, } from './_utils/mask-complete.validators';
|
|
17
|
+
export type { FieldCommonInputs } from './_models';
|
|
18
|
+
export { BR_ESTADOS_NOME_SIGLA, mapEstadosToOptions, } from '../../_utils/estados-br.data';
|
|
19
|
+
export { sanitizeIntegerDigits, parseIntegerString, } from '../../_utils/integer-value.utils';
|
|
20
|
+
export { formatIntegerThousandsBr, semanticIntegerDigitCountLeft, caretIndexFromIntegerDigitCount, } from '../../_utils/integer-br.utils';
|
|
21
|
+
export { sanitizeDecimalBrInput, parseDecimalBr, formatDecimalBr, extractDecimalBrParts, buildDecimalBrDisplay, buildDecimalBrParseString, semanticCaretAt, caretIndexFromSemantic, } from '../../_utils/decimal-br.utils';
|
|
22
|
+
export { formatDateTimePtBr, formatUiFieldDateValue, parseUiFieldDateValue, normalizeFormDateValue, applyPickedCalendarDate, } from '../../_utils/date-pt-br.utils';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MaskedTextFieldBase } from '../_base/masked-text-field.base';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Campo de texto com máscara configurável (`#` = dígito).
|
|
5
|
+
* Valor do formulário: apenas dígitos, sem máscara.
|
|
6
|
+
*/
|
|
7
|
+
export declare class InputMaskFieldComponent extends MaskedTextFieldBase {
|
|
8
|
+
get hostInvalidClass(): boolean;
|
|
9
|
+
/** Ex.: `#####-###`, `(##) #####-####`. */
|
|
10
|
+
maskPattern: string;
|
|
11
|
+
onNativeInput(event: Event): void;
|
|
12
|
+
onBlur(): void;
|
|
13
|
+
onClear(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputMaskFieldComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputMaskFieldComponent, "app-input-mask-field", never, { "maskPattern": { "alias": "maskPattern"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NgControlFieldDirective } from '../_base/ng-control-field.directive';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class IntegerFieldComponent extends NgControlFieldDirective<number | null> {
|
|
4
|
+
/** Valor máximo permitido (inclusive). */
|
|
5
|
+
max: number;
|
|
6
|
+
inputText: string;
|
|
7
|
+
filledUi: boolean;
|
|
8
|
+
private refreshFilledUi;
|
|
9
|
+
protected afterWriteValue(value: number | null): void;
|
|
10
|
+
onBeforeInput(event: Event): void;
|
|
11
|
+
onNativeInput(event: Event): void;
|
|
12
|
+
onBlur(): void;
|
|
13
|
+
onClear(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IntegerFieldComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IntegerFieldComponent, "app-integer-field", never, { "max": { "alias": "max"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
16
|
+
static ngAcceptInputType_max: unknown;
|
|
17
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NgControlFieldDirective } from '../_base/ng-control-field.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class PasswordFieldComponent extends NgControlFieldDirective<string | null> implements OnInit {
|
|
5
|
+
get hostInvalidClass(): boolean;
|
|
6
|
+
/** Por defeito `false`: o botão de limpar compete com o toggle de visibilidade. */
|
|
7
|
+
clearable: boolean;
|
|
8
|
+
maxLength: number;
|
|
9
|
+
/** Atributo HTML `autocomplete` (senha actual vs. nova senha). */
|
|
10
|
+
autoComplete: 'off' | 'current-password' | 'new-password';
|
|
11
|
+
/** `false` = caracteres ocultos (ícone olho aberto para revelar). */
|
|
12
|
+
passwordVisible: boolean;
|
|
13
|
+
inputText: string;
|
|
14
|
+
filledUi: boolean;
|
|
15
|
+
inputTypeUi: 'password' | 'text';
|
|
16
|
+
toggleAriaLabelUi: string;
|
|
17
|
+
toggleIconClassUi: string;
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
private refreshFilledUi;
|
|
20
|
+
private refreshPasswordToggleUi;
|
|
21
|
+
protected afterWriteValue(value: string | null): void;
|
|
22
|
+
onNativeInput(event: Event): void;
|
|
23
|
+
onBlur(): void;
|
|
24
|
+
onClear(): void;
|
|
25
|
+
togglePasswordVisible(ev: Event): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordFieldComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordFieldComponent, "app-password-field", never, { "clearable": { "alias": "clearable"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "autoComplete": { "alias": "autoComplete"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
28
|
+
static ngAcceptInputType_clearable: unknown;
|
|
29
|
+
static ngAcceptInputType_maxLength: unknown;
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MaskedTextFieldBase } from '../_base/masked-text-field.base';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Telefone BR: celular 11 dígitos `(##) #####-####` ou fixo 10 `(##) ####-####`.
|
|
5
|
+
* Valor do modelo: só dígitos (DDD + número), ex. `11999999999` ou `1133334444`.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PhoneFieldComponent extends MaskedTextFieldBase {
|
|
8
|
+
get hostInvalidClass(): boolean;
|
|
9
|
+
/** Se `true`, máscara de fixo (10 dígitos). Se `false`, celular (11). */
|
|
10
|
+
landline: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Máscara manual (com `#`). Se vazio, usa celular ou fixo conforme {@link landline}.
|
|
13
|
+
*/
|
|
14
|
+
maskPattern: string;
|
|
15
|
+
protected get pattern(): string;
|
|
16
|
+
onNativeInput(event: Event): void;
|
|
17
|
+
onBlur(): void;
|
|
18
|
+
onClear(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneFieldComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PhoneFieldComponent, "app-phone-field", never, { "landline": { "alias": "landline"; "required": false; }; "maskPattern": { "alias": "maskPattern"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
21
|
+
static ngAcceptInputType_landline: unknown;
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NgControlFieldDirective } from '../_base/ng-control-field.directive';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TextFieldComponent extends NgControlFieldDirective<string | null> {
|
|
4
|
+
/** Limite de caracteres no valor do campo. */
|
|
5
|
+
maxLength: number;
|
|
6
|
+
inputText: string;
|
|
7
|
+
filledUi: boolean;
|
|
8
|
+
private refreshFilledUi;
|
|
9
|
+
protected afterWriteValue(value: string | null): void;
|
|
10
|
+
onNativeInput(event: Event): void;
|
|
11
|
+
onBlur(): void;
|
|
12
|
+
onClear(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextFieldComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextFieldComponent, "app-text-field", never, { "maxLength": { "alias": "maxLength"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
15
|
+
static ngAcceptInputType_maxLength: unknown;
|
|
16
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { NgControlFieldDirective } from '../_base/ng-control-field.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TextareaFieldComponent extends NgControlFieldDirective<string | null> implements OnChanges, OnInit {
|
|
5
|
+
get hostInvalidClass(): boolean;
|
|
6
|
+
/** Limite de caracteres no valor do campo. `0` = sem limite explícito no DOM. */
|
|
7
|
+
maxLength: number;
|
|
8
|
+
rows: number;
|
|
9
|
+
/**
|
|
10
|
+
* Limite de altura em linhas (mesma lógica de `rows`). Por omissão igual a {@link rows}.
|
|
11
|
+
* O campo não é redimensionável pelo usuário (`resize: none`).
|
|
12
|
+
*/
|
|
13
|
+
maxResizeRows: number;
|
|
14
|
+
inputText: string;
|
|
15
|
+
filledUi: boolean;
|
|
16
|
+
/** Altura CSS (evita getter chamado a cada CD). */
|
|
17
|
+
textareaMaxHeightCss: string;
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
20
|
+
private updateTextareaHeight;
|
|
21
|
+
private refreshFilledUi;
|
|
22
|
+
protected afterWriteValue(value: string | null): void;
|
|
23
|
+
onNativeInput(event: Event): void;
|
|
24
|
+
onBlur(): void;
|
|
25
|
+
onClear(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaFieldComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaFieldComponent, "app-textarea-field", never, { "maxLength": { "alias": "maxLength"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "maxResizeRows": { "alias": "maxResizeRows"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
28
|
+
static ngAcceptInputType_maxLength: unknown;
|
|
29
|
+
static ngAcceptInputType_rows: unknown;
|
|
30
|
+
static ngAcceptInputType_maxResizeRows: unknown;
|
|
31
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Espaçamento horizontal/vertical entre itens da linha. */
|
|
2
|
+
export declare enum FormRowGap {
|
|
3
|
+
Xs = "xs",
|
|
4
|
+
Sm = "sm",
|
|
5
|
+
Md = "md",
|
|
6
|
+
Lg = "lg"
|
|
7
|
+
}
|
|
8
|
+
/** Alinhamento no eixo cruzado (itens da linha). */
|
|
9
|
+
export declare enum FormRowAlign {
|
|
10
|
+
Start = "start",
|
|
11
|
+
Center = "center",
|
|
12
|
+
End = "end",
|
|
13
|
+
Stretch = "stretch"
|
|
14
|
+
}
|
|
15
|
+
/** Distribuição no eixo principal. */
|
|
16
|
+
export declare enum FormRowJustify {
|
|
17
|
+
Start = "start",
|
|
18
|
+
Center = "center",
|
|
19
|
+
End = "end",
|
|
20
|
+
Between = "between"
|
|
21
|
+
}
|
|
22
|
+
/** Variante visual do grupo. */
|
|
23
|
+
export declare enum FormGroupVariant {
|
|
24
|
+
Default = "default",
|
|
25
|
+
Outlined = "outlined",
|
|
26
|
+
Subtle = "subtle"
|
|
27
|
+
}
|
|
28
|
+
/** Alinhamento horizontal no eixo principal (`justify-content`) em `app-layout-stack`. */
|
|
29
|
+
export declare enum LayoutStackAlign {
|
|
30
|
+
Start = "start",
|
|
31
|
+
Center = "center",
|
|
32
|
+
End = "end",
|
|
33
|
+
SpaceBetween = "space-between"
|
|
34
|
+
}
|
|
35
|
+
/** Alinhamento em `app-form-actions` (barra de ações de formulário). */
|
|
36
|
+
export declare enum FormActionsAlign {
|
|
37
|
+
Start = "start",
|
|
38
|
+
Center = "center",
|
|
39
|
+
End = "end",
|
|
40
|
+
SpaceBetween = "space-between"
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FormTabsVariant = 'default' | 'pill';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { LayoutStackAlign, FormActionsAlign, FormGroupVariant, FormRowAlign, FormRowGap, FormRowJustify, } from './form-layout.model';
|
|
2
|
+
export type { ValidationSummaryItem, ValidationSummaryVariant, } from './validation-summary.model';
|
|
3
|
+
export type { FormTabsVariant } from './form-tabs.model';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Variante visual do resumo de validação. */
|
|
2
|
+
export type ValidationSummaryVariant = 'error' | 'warning' | 'info';
|
|
3
|
+
/** Item do resumo: mensagem e destino opcional para foco / scroll / destaque. */
|
|
4
|
+
export interface ValidationSummaryItem {
|
|
5
|
+
message: string;
|
|
6
|
+
/** `id` HTML do controle focável (ex.: o mesmo `[id]` dos campos da lib). */
|
|
7
|
+
fieldId?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormActionsAlign, LayoutStackAlign } from '../_models/form-layout.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/** Barra de ações de formulário (Salvar, Cancelar, Adicionar, …). Projeção de conteúdo. */
|
|
4
|
+
export declare class FormActionsComponent {
|
|
5
|
+
align: FormActionsAlign;
|
|
6
|
+
stackOnMobile: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Por omissão `true`: os botões repartem a largura da faixa (um botão ≈ 100%; vários repartem por igual).
|
|
9
|
+
* Use `false` para faixa compacta (largura intrínseca, ex.: várias ações alinhadas à direita).
|
|
10
|
+
*/
|
|
11
|
+
fill: boolean;
|
|
12
|
+
divider: boolean;
|
|
13
|
+
/** `FormActionsAlign` e `LayoutStackAlign` partilham os mesmos valores; delegação ao `app-layout-stack`. */
|
|
14
|
+
get layoutAlign(): LayoutStackAlign;
|
|
15
|
+
get hostClass(): string;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormActionsComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormActionsComponent, "app-form-actions", never, { "align": { "alias": "align"; "required": false; }; "stackOnMobile": { "alias": "stackOnMobile"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "divider": { "alias": "divider"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
18
|
+
static ngAcceptInputType_stackOnMobile: unknown;
|
|
19
|
+
static ngAcceptInputType_fill: unknown;
|
|
20
|
+
static ngAcceptInputType_divider: unknown;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Coluna no sistema de 12 trilhos da {@link FormRowComponent}.
|
|
4
|
+
* Em viewports menores que `sm`, usa `xs` (por defeito largura total).
|
|
5
|
+
*/
|
|
6
|
+
export declare class FormColComponent {
|
|
7
|
+
/** Colunas ocupadas em < `sm` (por defeito 12 = linha inteira). */
|
|
8
|
+
xs: number;
|
|
9
|
+
sm?: number;
|
|
10
|
+
md?: number;
|
|
11
|
+
lg?: number;
|
|
12
|
+
xl?: number;
|
|
13
|
+
order?: number;
|
|
14
|
+
/** Quando `true`, a coluna pode crescer para ocupar espaço livre na linha (flex futuro / composição). */
|
|
15
|
+
grow: boolean;
|
|
16
|
+
get hostClass(): string;
|
|
17
|
+
get hostVars(): string;
|
|
18
|
+
private clampSpan;
|
|
19
|
+
private normalizeOptionalSpan;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormColComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormColComponent, "app-form-col", never, { "xs": { "alias": "xs"; "required": false; }; "sm": { "alias": "sm"; "required": false; }; "md": { "alias": "md"; "required": false; }; "lg": { "alias": "lg"; "required": false; }; "xl": { "alias": "xl"; "required": false; }; "order": { "alias": "order"; "required": false; }; "grow": { "alias": "grow"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
22
|
+
static ngAcceptInputType_xs: unknown;
|
|
23
|
+
static ngAcceptInputType_order: unknown;
|
|
24
|
+
static ngAcceptInputType_grow: unknown;
|
|
25
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { DoCheck, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { FormGroupVariant } from '../_models/form-layout.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FormGroupComponent implements OnChanges, OnInit, DoCheck {
|
|
5
|
+
private readonly cdr;
|
|
6
|
+
private readonly destroyRef;
|
|
7
|
+
private readonly hostRef;
|
|
8
|
+
private readonly rootFormDir;
|
|
9
|
+
titulo: string;
|
|
10
|
+
subtitulo: string;
|
|
11
|
+
collapsible: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Quando `true` (padrão), o cabeçalho alterna aberto/fechado (respeita {@link collapsed}).
|
|
14
|
+
* Quando `false`, o grupo permanece **sempre expandido** (não recolhe), a seta fica só indicativa **em cinza**
|
|
15
|
+
* e o cabeçalho deixa de ser clicável — útil para seções obrigatórias sempre visíveis.
|
|
16
|
+
*/
|
|
17
|
+
foldable: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Com `collapsible`: `true` = grupo **fechado** (só cabeçalho visível), `false` = **aberto**.
|
|
20
|
+
* O pai pode fixar o estado inicial e manter com `(collapsedChange)` ou `[collapsed]` ligado a uma variável.
|
|
21
|
+
* Se {@link foldable} for `false`, o estado efectivo é sempre **aberto** (ignora-se `collapsed` para o corpo).
|
|
22
|
+
*/
|
|
23
|
+
collapsed: boolean;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
dense: boolean;
|
|
26
|
+
canMoveUp: boolean;
|
|
27
|
+
canMoveDown: boolean;
|
|
28
|
+
showHeader: boolean;
|
|
29
|
+
showDivider: boolean;
|
|
30
|
+
variant: FormGroupVariant;
|
|
31
|
+
/**
|
|
32
|
+
* Com `collapsible` e `collapsed`: se `true`, o corpo **não** é criado no DOM enquanto o
|
|
33
|
+
* grupo está fechado (após a primeira expansão pode voltar a fechar e voltar a desmontar).
|
|
34
|
+
* Útil para blocos pesados inicialmente fechados; o `FormGroup` reactivo no ascendente
|
|
35
|
+
* conserva valores — os `FormControlName` religam ao reabrir.
|
|
36
|
+
*/
|
|
37
|
+
destroyOnCollapse: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Quando `true`, o corpo não força `flex-direction: column` nos filhos projetados (ex.: conteúdo
|
|
40
|
+
* próprio com grade ou `flex` em linha). O padrão `false` mantém o espaçamento vertical entre
|
|
41
|
+
* várias `app-form-row` / wrapper com `formGroupName`.
|
|
42
|
+
*/
|
|
43
|
+
skipBodyChildStacking: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Quando `true`, mostra o ícone de aviso no cabeçalho. O pai deve refletir inválido **e** critério
|
|
46
|
+
* de UX (ex. `dirty` ou formulário já submetido), não só `touched` — Tab/foco não deve acender sozinho.
|
|
47
|
+
* Ignorado quando {@link formGroupPath} está definido (usa-se só o cálculo automático).
|
|
48
|
+
*/
|
|
49
|
+
groupInvalid: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Caminho no `FormGroup` raiz do `<form [formGroup]>` (ex.: `identificacao`, `endereco.morada`).
|
|
52
|
+
* Quando preenchido, o ícone de aviso é calculado automaticamente a partir do estado reativo,
|
|
53
|
+
* sem precisar de `[groupInvalid]` manual.
|
|
54
|
+
*/
|
|
55
|
+
formGroupPath: string;
|
|
56
|
+
/**
|
|
57
|
+
* Quando `true`, o critério “já houve tentativa de envio” para o ícone automático (`formGroupPath`)
|
|
58
|
+
* inclui este sinal (ex.: alinhar a `app-form-tabs` `[warning]` com `markAllAsTouched()` sem `submitted`
|
|
59
|
+
* no `FormGroupDirective`, ou validação disparada por `(click)` em vez de `submit`).
|
|
60
|
+
*/
|
|
61
|
+
uxSubmittedPass: boolean;
|
|
62
|
+
readonly collapsedChange: EventEmitter<boolean>;
|
|
63
|
+
readonly moveUp: EventEmitter<void>;
|
|
64
|
+
readonly moveDown: EventEmitter<void>;
|
|
65
|
+
/** Estado interno espelha o input (OnPush + alterações externas). */
|
|
66
|
+
private collapsedInternal;
|
|
67
|
+
/** Evita `scrollIntoView` duplo no mesmo ciclo (clique + `[collapsed]` do pai). */
|
|
68
|
+
private scrollIntoViewCoalesce;
|
|
69
|
+
/**
|
|
70
|
+
* `FormGroupDirective.submitted` nem sempre fica `true` no ciclo do ícone com `[formGroup]` reactivo;
|
|
71
|
+
* o `submit` nativo do `<form>` garante aviso nos filhos após «Salvar» + `markAllAsTouched()`.
|
|
72
|
+
* Repõe-se quando o `FormGroup` raiz volta a `VALID`.
|
|
73
|
+
*/
|
|
74
|
+
private formSubmitPassActive;
|
|
75
|
+
/** Rastreia `rootFormDir.submitted` para repor {@link formSubmitPassActive} após `resetForm` com raiz ainda inválida. */
|
|
76
|
+
private prevRootFormSubmitted;
|
|
77
|
+
ngOnInit(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Permite expandir o grupo a partir do exterior (ex.: resumo de validação antes de focar um campo).
|
|
80
|
+
* `CustomEvent` no host: `ui-request-expand` (sem bubbles).
|
|
81
|
+
*/
|
|
82
|
+
private setupExpandRequestListener;
|
|
83
|
+
/** Ícone de aviso: automático com `formGroupPath`, senão `groupInvalid` manual. */
|
|
84
|
+
get invalidFlagVisible(): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* `markAllAsTouched()` / `submitted` não passam sempre por `valueChanges`; com OnPush o getter
|
|
87
|
+
* do ícone precisa do `submit` do `<form>` ancestral (após um tick) para atualizar.
|
|
88
|
+
*/
|
|
89
|
+
private setupFormPathInvalidTracking;
|
|
90
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
91
|
+
/** Estado interno de colapso: com `foldable === false` força sempre expandido. */
|
|
92
|
+
private applyCollapsedFromInputs;
|
|
93
|
+
get hostClass(): string;
|
|
94
|
+
get showHeaderBar(): boolean;
|
|
95
|
+
get isCollapsed(): boolean;
|
|
96
|
+
get renderBodyInDom(): boolean;
|
|
97
|
+
get bodyVisuallyHidden(): boolean;
|
|
98
|
+
get headerIsInteractive(): boolean;
|
|
99
|
+
onHeaderClick(): void;
|
|
100
|
+
onHeaderKeydown(ev: KeyboardEvent): void;
|
|
101
|
+
onMoveUpClick(ev: Event): void;
|
|
102
|
+
onMoveDownClick(ev: Event): void;
|
|
103
|
+
private setCollapsed;
|
|
104
|
+
/**
|
|
105
|
+
* Após expandir, desloca a vista até ao grupo com scroll nativo suave, só o necessário
|
|
106
|
+
* (`block: 'nearest'`). Executa após pintar o corpo expandido.
|
|
107
|
+
*/
|
|
108
|
+
private scheduleScrollIntoView;
|
|
109
|
+
ngDoCheck(): void;
|
|
110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupComponent, never>;
|
|
111
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormGroupComponent, "app-form-group", never, { "titulo": { "alias": "titulo"; "required": true; }; "subtitulo": { "alias": "subtitulo"; "required": false; }; "collapsible": { "alias": "collapsible"; "required": false; }; "foldable": { "alias": "foldable"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "canMoveUp": { "alias": "canMoveUp"; "required": false; }; "canMoveDown": { "alias": "canMoveDown"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "showDivider": { "alias": "showDivider"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "destroyOnCollapse": { "alias": "destroyOnCollapse"; "required": false; }; "skipBodyChildStacking": { "alias": "skipBodyChildStacking"; "required": false; }; "groupInvalid": { "alias": "groupInvalid"; "required": false; }; "formGroupPath": { "alias": "formGroupPath"; "required": false; }; "uxSubmittedPass": { "alias": "uxSubmittedPass"; "required": false; }; }, { "collapsedChange": "collapsedChange"; "moveUp": "moveUp"; "moveDown": "moveDown"; }, never, ["*"], true, never>;
|
|
112
|
+
static ngAcceptInputType_collapsible: unknown;
|
|
113
|
+
static ngAcceptInputType_foldable: unknown;
|
|
114
|
+
static ngAcceptInputType_collapsed: unknown;
|
|
115
|
+
static ngAcceptInputType_disabled: unknown;
|
|
116
|
+
static ngAcceptInputType_dense: unknown;
|
|
117
|
+
static ngAcceptInputType_canMoveUp: unknown;
|
|
118
|
+
static ngAcceptInputType_canMoveDown: unknown;
|
|
119
|
+
static ngAcceptInputType_showHeader: unknown;
|
|
120
|
+
static ngAcceptInputType_showDivider: unknown;
|
|
121
|
+
static ngAcceptInputType_destroyOnCollapse: unknown;
|
|
122
|
+
static ngAcceptInputType_skipBodyChildStacking: unknown;
|
|
123
|
+
static ngAcceptInputType_groupInvalid: unknown;
|
|
124
|
+
static ngAcceptInputType_uxSubmittedPass: unknown;
|
|
125
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
/** Resolve `a.b.c` a partir da raiz do formulário (normalmente o `FormGroup` do `<form [formGroup]>`). */
|
|
3
|
+
export declare function resolveControlAtPath(root: AbstractControl, path: string): AbstractControl | null;
|
|
4
|
+
/**
|
|
5
|
+
* Há erro “visível” na subárvore: folho inválido e (`dirty` ou `formSubmitted`).
|
|
6
|
+
* `formSubmitted` deve incluir o equivalente a «formulário já enviado» (ex.: `FormGroupDirective.submitted`
|
|
7
|
+
* ou passo activo após o evento `submit` do `<form>` em `app-form-group`), para acender o ícone após
|
|
8
|
+
* «Salvar» + `markAllAsTouched()` sem exigir `dirty` em cada campo.
|
|
9
|
+
* Não usar `touched` sozinho: Tab/blur marca touched sem alterar valor e não deve acender o ícone.
|
|
10
|
+
*/
|
|
11
|
+
export declare function subtreeHasVisibleInvalid(control: AbstractControl, formSubmitted?: boolean): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Critério alinhado ao ícone automático de `app-form-group` com `formGroupPath`
|
|
14
|
+
* (e reutilizável para aviso por separador, ex. `app-form-tab` + `formGroupName`).
|
|
15
|
+
*/
|
|
16
|
+
export declare function sectionHasVisibleInvalid(root: AbstractControl, path: string, formSubmitted?: boolean): boolean;
|