@govbr-ds/webcomponents 2.3.0 → 2.5.0
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 -2
- package/cem/custom-elements.json +1764 -1575
- package/cem/webcomponents.html-custom-data.json +194 -163
- package/dist/cjs/br-avatar.cjs.entry.js +3 -3
- package/dist/cjs/br-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/br-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/br-button_2.cjs.entry.js +4 -4
- package/dist/cjs/br-card.cjs.entry.js +3 -3
- package/dist/cjs/br-carousel-page.cjs.entry.js +2 -2
- package/dist/cjs/br-carousel.cjs.entry.js +2 -2
- package/dist/cjs/br-checkbox-group.cjs.entry.js +3 -3
- package/dist/cjs/br-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/br-checkgroup.cjs.entry.js +1 -1
- package/dist/cjs/br-collapse_2.cjs.entry.js +5 -5
- package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar-group.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar-header.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar-link.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +1 -1
- package/dist/cjs/br-cookiebar-note.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar.cjs.entry.js +3 -3
- package/dist/cjs/br-crumb.cjs.entry.js +1 -1
- package/dist/cjs/br-date-picker_3.cjs.entry.js +984 -545
- package/dist/cjs/br-datetime-picker.cjs.entry.js +1346 -310
- package/dist/cjs/br-divider.cjs.entry.js +3 -3
- package/dist/cjs/br-dropdown_2.cjs.entry.js +282 -139
- package/dist/cjs/br-footer-category.cjs.entry.js +3 -3
- package/dist/cjs/br-footer-item.cjs.entry.js +2 -2
- package/dist/cjs/br-footer-legal.cjs.entry.js +2 -2
- package/dist/cjs/br-footer-logo.cjs.entry.js +2 -2
- package/dist/cjs/br-footer-social.cjs.entry.js +2 -2
- package/dist/cjs/br-footer.cjs.entry.js +4 -4
- package/dist/cjs/br-header-function.cjs.entry.js +2 -2
- package/dist/cjs/br-header-link.cjs.entry.js +2 -2
- package/dist/cjs/br-header-list.cjs.entry.js +2 -2
- package/dist/cjs/br-header-logo.cjs.entry.js +2 -2
- package/dist/cjs/br-header.cjs.entry.js +2 -2
- package/dist/cjs/br-icon.cjs.entry.js +3 -3
- package/dist/cjs/br-input.cjs.entry.js +64 -10
- package/dist/cjs/br-item.cjs.entry.js +3 -3
- package/dist/cjs/br-link.cjs.entry.js +8 -8
- package/dist/cjs/br-loading.cjs.entry.js +2 -2
- package/dist/cjs/br-magic-button.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-header.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-info.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-link.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-list.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-logo.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-social.cjs.entry.js +1 -1
- package/dist/cjs/br-menu.cjs.entry.js +4 -4
- package/dist/cjs/br-modal.cjs.entry.js +1 -1
- package/dist/cjs/br-notification-body.cjs.entry.js +2 -2
- package/dist/cjs/br-notification-header.cjs.entry.js +2 -2
- package/dist/cjs/br-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/br-notification.cjs.entry.js +3 -3
- package/dist/cjs/br-pagination.cjs.entry.js +3 -3
- package/dist/cjs/br-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/br-radio.cjs.entry.js +4 -4
- package/dist/cjs/br-scrim.cjs.entry.js +3 -3
- package/dist/cjs/br-select-input_3.cjs.entry.js +308 -101
- package/dist/cjs/br-sign-in.cjs.entry.js +3 -3
- package/dist/cjs/br-skip-link-item.cjs.entry.js +1 -1
- package/dist/cjs/br-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/br-skiplink-item.cjs.entry.js +2 -2
- package/dist/cjs/br-slider.cjs.entry.js +3 -3
- package/dist/cjs/br-step_2.cjs.entry.js +6 -6
- package/dist/cjs/br-switch.cjs.entry.js +4 -4
- package/dist/cjs/br-tab-item.cjs.entry.js +2 -2
- package/dist/cjs/br-tab.cjs.entry.js +4 -4
- package/dist/cjs/br-table-body.cjs.entry.js +2 -2
- package/dist/cjs/br-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/br-table-header-cell.cjs.entry.js +2 -2
- package/dist/cjs/br-table-header.cjs.entry.js +2 -2
- package/dist/cjs/br-table-row.cjs.entry.js +2 -2
- package/dist/cjs/br-table.cjs.entry.js +2 -2
- package/dist/cjs/br-tag.cjs.entry.js +4 -4
- package/dist/cjs/br-textarea.cjs.entry.js +3 -3
- package/dist/cjs/br-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/br-upload.cjs.entry.js +8 -24
- package/dist/cjs/br-wizard-panel.cjs.entry.js +2 -2
- package/dist/cjs/br-wizard.cjs.entry.js +2 -2
- package/dist/cjs/{datetime-picker-constants-B5pWeOn1.js → datetime-picker-constants-CTf1kVJ1.js} +21 -5
- package/dist/cjs/format-bytes-Cs8SH2w0.js +24 -0
- package/dist/cjs/{iconify-icon-DfODV9bf.js → iconify-icon-LjavbM-D.js} +103 -57
- package/dist/cjs/index-Bc30P_6z.js +14 -14
- package/dist/cjs/{index-C92n55ch.js → index-Caoez3xb.js} +75 -27
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{datetime-picker-props-validation-DmNKSXsy.js → isValid-DgJ-noPS.js} +1 -483
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/select.utils-C38f5Kea.js +62 -0
- package/dist/cjs/{slot-DAllytTj.js → slot-CjaqqX7y.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/avatar/avatar.css +1 -1
- package/dist/collection/components/avatar/avatar.js +21 -21
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +4 -12
- package/dist/collection/components/breadcrumb/breadcrumb.css +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +32 -27
- package/dist/collection/components/breadcrumb/crumb/crumb.js +2 -13
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button/button.js +21 -21
- package/dist/collection/components/card/card.css +1 -1
- package/dist/collection/components/card/card.js +20 -22
- package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -1
- package/dist/collection/components/carousel/carousel-page/carousel-page.js +3 -13
- package/dist/collection/components/carousel/carousel.css +1 -1
- package/dist/collection/components/carousel/carousel.js +23 -30
- package/dist/collection/components/checkbox/checkbox.css +1 -1
- package/dist/collection/components/checkbox/checkbox.js +18 -24
- package/dist/collection/components/checkbox-group/checkbox-group.css +1 -1
- package/dist/collection/components/checkbox-group/checkbox-group.js +19 -20
- package/dist/collection/components/checkgroup/checkgroup.js +2 -14
- package/dist/collection/components/collapse/collapse.css +1 -1
- package/dist/collection/components/collapse/collapse.js +25 -21
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +3 -16
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +3 -16
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +3 -16
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +3 -15
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +3 -14
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +2 -13
- package/dist/collection/components/cookiebar/cookiebar.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar.js +32 -27
- package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +73 -26
- package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +14 -13
- package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -1
- package/dist/collection/components/datetime-picker/date-picker/date-picker.js +474 -321
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input-constants.js +59 -0
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +19 -15
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +370 -218
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.types.js +1 -0
- package/dist/collection/components/datetime-picker/datetime-picker-constants.js +19 -5
- package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +92 -11
- package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +52 -33
- package/dist/collection/components/datetime-picker/datetime-picker.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js +917 -368
- package/dist/collection/components/datetime-picker/datetime-picker.utils.js +62 -49
- package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +3 -2
- package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -1
- package/dist/collection/components/datetime-picker/time-picker/time-picker.js +145 -92
- package/dist/collection/components/divider/divider.css +1 -1
- package/dist/collection/components/divider/divider.js +15 -19
- package/dist/collection/components/dropdown/dropdown.css +1 -1
- package/dist/collection/components/dropdown/dropdown.js +22 -21
- package/dist/collection/components/footer/footer-category/footer-category.css +1 -1
- package/dist/collection/components/footer/footer-category/footer-category.js +4 -17
- package/dist/collection/components/footer/footer-item/footer-item.css +1 -1
- package/dist/collection/components/footer/footer-item/footer-item.js +3 -16
- package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -1
- package/dist/collection/components/footer/footer-legal/footer-legal.js +2 -16
- package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -1
- package/dist/collection/components/footer/footer-logo/footer-logo.js +3 -16
- package/dist/collection/components/footer/footer-social/footer-social.css +1 -1
- package/dist/collection/components/footer/footer-social/footer-social.js +3 -15
- package/dist/collection/components/footer/footer.css +1 -1
- package/dist/collection/components/footer/footer.js +25 -29
- package/dist/collection/components/header/header-function/header-function.css +1 -1
- package/dist/collection/components/header/header-function/header-function.js +10 -14
- package/dist/collection/components/header/header-link/header-link.css +1 -1
- package/dist/collection/components/header/header-link/header-link.js +3 -16
- package/dist/collection/components/header/header-list/header-list.css +1 -1
- package/dist/collection/components/header/header-list/header-list.js +3 -16
- package/dist/collection/components/header/header-logo/header-logo.css +1 -1
- package/dist/collection/components/header/header-logo/header-logo.js +3 -16
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +30 -27
- package/dist/collection/components/icon/icon.css +1 -1
- package/dist/collection/components/icon/icon.js +22 -17
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/input/input.js +125 -30
- package/dist/collection/components/item/item.css +1 -1
- package/dist/collection/components/item/item.js +18 -22
- package/dist/collection/components/link/link.css +1 -1
- package/dist/collection/components/link/link.js +25 -29
- package/dist/collection/components/list/list.css +1 -1
- package/dist/collection/components/list/list.js +17 -21
- package/dist/collection/components/loading/loading.css +1 -1
- package/dist/collection/components/loading/loading.js +17 -24
- package/dist/collection/components/magic-button/magic-button.css +1 -1
- package/dist/collection/components/magic-button/magic-button.js +13 -20
- package/dist/collection/components/menu/menu-group/menu-group.css +1 -1
- package/dist/collection/components/menu/menu-group/menu-group.js +3 -16
- package/dist/collection/components/menu/menu-header/menu-header.css +1 -1
- package/dist/collection/components/menu/menu-header/menu-header.js +3 -16
- package/dist/collection/components/menu/menu-info/menu-info.css +1 -1
- package/dist/collection/components/menu/menu-info/menu-info.js +2 -15
- package/dist/collection/components/menu/menu-item/menu-item.css +1 -1
- package/dist/collection/components/menu/menu-item/menu-item.js +3 -16
- package/dist/collection/components/menu/menu-link/menu-link.css +1 -1
- package/dist/collection/components/menu/menu-link/menu-link.js +5 -17
- package/dist/collection/components/menu/menu-list/menu-list.css +1 -1
- package/dist/collection/components/menu/menu-list/menu-list.js +2 -15
- package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -1
- package/dist/collection/components/menu/menu-logo/menu-logo.js +2 -15
- package/dist/collection/components/menu/menu-social/menu-social.css +1 -1
- package/dist/collection/components/menu/menu-social/menu-social.js +2 -15
- package/dist/collection/components/menu/menu.css +1 -1
- package/dist/collection/components/menu/menu.js +28 -35
- package/dist/collection/components/message/message.css +1 -1
- package/dist/collection/components/message/message.js +22 -25
- package/dist/collection/components/modal/modal.css +1 -1
- package/dist/collection/components/modal/modal.js +18 -21
- package/dist/collection/components/notification/notification-body/notification-body.css +1 -1
- package/dist/collection/components/notification/notification-body/notification-body.js +3 -13
- package/dist/collection/components/notification/notification-header/notification-header.css +1 -1
- package/dist/collection/components/notification/notification-header/notification-header.js +3 -14
- package/dist/collection/components/notification/notification-item/notification-item.css +1 -1
- package/dist/collection/components/notification/notification-item/notification-item.js +3 -16
- package/dist/collection/components/notification/notification.css +1 -1
- package/dist/collection/components/notification/notification.js +20 -29
- package/dist/collection/components/pagination/pagination.css +1 -1
- package/dist/collection/components/pagination/pagination.js +15 -23
- package/dist/collection/components/radio/radio.css +1 -1
- package/dist/collection/components/radio/radio.js +17 -20
- package/dist/collection/components/radio-group/radio-group.css +1 -1
- package/dist/collection/components/radio-group/radio-group.js +20 -20
- package/dist/collection/components/scrim/scrim.css +1 -1
- package/dist/collection/components/scrim/scrim.js +14 -17
- package/dist/collection/components/select/select-input/select-input.css +1 -1
- package/dist/collection/components/select/select-input/select-input.js +157 -27
- package/dist/collection/components/select/select-list/select-list.css +1 -1
- package/dist/collection/components/select/select-list/select-list.js +269 -80
- package/dist/collection/components/select/select-option/select-option.css +1 -1
- package/dist/collection/components/select/select-option/select-option.js +20 -16
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/select/select.js +367 -180
- package/dist/collection/components/select/select.utils.js +26 -7
- package/dist/collection/components/sign-in/sign-in.css +1 -1
- package/dist/collection/components/sign-in/sign-in.js +12 -16
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +8 -4
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -1
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +5 -15
- package/dist/collection/components/skip-link/skip-link.css +1 -1
- package/dist/collection/components/skip-link/skip-link.js +18 -24
- package/dist/collection/components/slider/slider.css +1 -1
- package/dist/collection/components/slider/slider.js +15 -25
- package/dist/collection/components/step/step-item/step-item.css +1 -1
- package/dist/collection/components/step/step-item/step-item.js +5 -15
- package/dist/collection/components/step/step.css +1 -1
- package/dist/collection/components/step/step.js +16 -25
- package/dist/collection/components/switch/switch.css +1 -1
- package/dist/collection/components/switch/switch.js +16 -20
- package/dist/collection/components/tab/tab-item/tab-item.css +1 -1
- package/dist/collection/components/tab/tab-item/tab-item.js +5 -15
- package/dist/collection/components/tab/tab.css +1 -1
- package/dist/collection/components/tab/tab.js +22 -29
- package/dist/collection/components/table/table-body/table-body.css +1 -1
- package/dist/collection/components/table/table-body/table-body.js +3 -13
- package/dist/collection/components/table/table-cell/table-cell.css +1 -1
- package/dist/collection/components/table/table-cell/table-cell.js +3 -12
- package/dist/collection/components/table/table-header/table-header.css +1 -1
- package/dist/collection/components/table/table-header/table-header.js +3 -13
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +3 -13
- package/dist/collection/components/table/table-row/table-row.css +1 -1
- package/dist/collection/components/table/table-row/table-row.js +3 -13
- package/dist/collection/components/table/table.css +1 -1
- package/dist/collection/components/table/table.js +25 -32
- package/dist/collection/components/tag/tag.css +1 -1
- package/dist/collection/components/tag/tag.js +17 -26
- package/dist/collection/components/textarea/textarea.css +1 -1
- package/dist/collection/components/textarea/textarea.js +14 -22
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.js +13 -19
- package/dist/collection/components/upload/upload.css +1 -1
- package/dist/collection/components/upload/upload.js +36 -29
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -1
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +3 -13
- package/dist/collection/components/wizard/wizard.css +1 -1
- package/dist/collection/components/wizard/wizard.js +22 -26
- package/dist/collection/pages/components/select/remote-options.js +87 -0
- package/dist/collection/shared/utils/slot.js +1 -1
- package/dist/components/br-avatar.js +1 -1
- package/dist/components/br-breadcrumb-item.js +1 -1
- package/dist/components/br-breadcrumb.js +1 -1
- package/dist/components/br-button.js +1 -1
- package/dist/components/br-card.js +1 -1
- package/dist/components/br-carousel-page.js +1 -1
- package/dist/components/br-carousel.js +1 -1
- package/dist/components/br-checkbox-group.js +1 -1
- package/dist/components/br-checkbox.js +1 -1
- package/dist/components/br-checkgroup.js +1 -1
- package/dist/components/br-collapse.js +1 -1
- package/dist/components/br-cookiebar-cookie.js +1 -1
- package/dist/components/br-cookiebar-group.js +1 -1
- package/dist/components/br-cookiebar-header.js +1 -1
- package/dist/components/br-cookiebar-link.js +1 -1
- package/dist/components/br-cookiebar-note-group.js +1 -1
- package/dist/components/br-cookiebar-note.js +1 -1
- package/dist/components/br-cookiebar.js +1 -1
- package/dist/components/br-crumb.js +1 -1
- package/dist/components/br-date-picker.js +1 -1
- package/dist/components/br-datetime-input.js +1 -1
- package/dist/components/br-datetime-picker.js +1 -1
- package/dist/components/br-divider.js +1 -1
- package/dist/components/br-dropdown.js +1 -1
- package/dist/components/br-footer-category.js +1 -1
- package/dist/components/br-footer-item.js +1 -1
- package/dist/components/br-footer-legal.js +1 -1
- package/dist/components/br-footer-logo.js +1 -1
- package/dist/components/br-footer-social.js +1 -1
- package/dist/components/br-footer.js +1 -1
- package/dist/components/br-header-function.js +1 -1
- package/dist/components/br-header-link.js +1 -1
- package/dist/components/br-header-list.js +1 -1
- package/dist/components/br-header-logo.js +1 -1
- package/dist/components/br-header.js +1 -1
- package/dist/components/br-icon.js +1 -1
- package/dist/components/br-input.js +1 -1
- package/dist/components/br-item.js +1 -1
- package/dist/components/br-link.js +1 -1
- package/dist/components/br-list.js +1 -1
- package/dist/components/br-loading.js +1 -1
- package/dist/components/br-magic-button.js +1 -1
- package/dist/components/br-menu-group.js +1 -1
- package/dist/components/br-menu-header.js +1 -1
- package/dist/components/br-menu-info.js +1 -1
- package/dist/components/br-menu-item.js +1 -1
- package/dist/components/br-menu-link.js +1 -1
- package/dist/components/br-menu-list.js +1 -1
- package/dist/components/br-menu-logo.js +1 -1
- package/dist/components/br-menu-social.js +1 -1
- package/dist/components/br-menu.js +1 -1
- package/dist/components/br-message.js +1 -1
- package/dist/components/br-modal.js +1 -1
- package/dist/components/br-notification-body.js +1 -1
- package/dist/components/br-notification-header.js +1 -1
- package/dist/components/br-notification-item.js +1 -1
- package/dist/components/br-notification.js +1 -1
- package/dist/components/br-pagination.js +1 -1
- package/dist/components/br-radio-group.js +1 -1
- package/dist/components/br-radio.js +1 -1
- package/dist/components/br-scrim.js +1 -1
- package/dist/components/br-select-input.js +1 -1
- package/dist/components/br-select-list.js +1 -1
- package/dist/components/br-select-option.js +1 -1
- package/dist/components/br-select.js +1 -1
- package/dist/components/br-sign-in.js +1 -1
- package/dist/components/br-skip-link-item.js +1 -1
- package/dist/components/br-skip-link.js +1 -1
- package/dist/components/br-skiplink-item.js +1 -1
- package/dist/components/br-slider.js +1 -1
- package/dist/components/br-step-item.js +1 -1
- package/dist/components/br-step.js +1 -1
- package/dist/components/br-switch.js +1 -1
- package/dist/components/br-tab-item.js +1 -1
- package/dist/components/br-tab.js +1 -1
- package/dist/components/br-table-body.js +1 -1
- package/dist/components/br-table-cell.js +1 -1
- package/dist/components/br-table-header-cell.js +1 -1
- package/dist/components/br-table-header.js +1 -1
- package/dist/components/br-table-row.js +1 -1
- package/dist/components/br-table.js +1 -1
- package/dist/components/br-tag.js +1 -1
- package/dist/components/br-textarea.js +1 -1
- package/dist/components/br-time-picker.js +1 -1
- package/dist/components/br-tooltip.js +1 -1
- package/dist/components/br-upload.js +1 -1
- package/dist/components/br-wizard-panel.js +1 -1
- package/dist/components/br-wizard.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-448Z5r2f.js +5 -0
- package/dist/{webcomponents/p-5f422a69.entry.js → components/p-AhfgJCUp.js} +1 -1
- package/dist/components/p-AoNL6BaW.js +5 -0
- package/dist/components/p-B468MCYC.js +5 -0
- package/dist/components/p-B7bNfmgh.js +5 -0
- package/dist/components/p-B985Ov_x.js +5 -0
- package/dist/components/p-BOWQIHQA.js +5 -0
- package/dist/components/p-BPQrgCRr.js +5 -0
- package/dist/components/p-BwQT0fOJ.js +5 -0
- package/dist/components/p-CAgbUwsx.js +5 -0
- package/dist/components/p-CFXey8i8.js +5 -0
- package/dist/components/p-CVz_akHx.js +5 -0
- package/dist/components/p-CW8xwk6J.js +5 -0
- package/dist/components/p-CYZVdKeO.js +5 -0
- package/dist/components/p-C_DC6oQW.js +16 -0
- package/dist/components/p-CeWbZN7V.js +5 -0
- package/dist/components/p-CyXVsiz9.js +5 -0
- package/dist/components/p-DDe0tQEO.js +5 -0
- package/dist/components/{p-CZZVc2gK.js → p-DJKZ8ktB.js} +1 -1
- package/dist/components/p-DRsZ9GNg.js +5 -0
- package/dist/components/p-DU54cqCf.js +5 -0
- package/dist/components/p-DVJlmlEX.js +5 -0
- package/dist/components/p-DcMjwTqu.js +5 -0
- package/dist/components/p-Dd1qCWAK.js +5 -0
- package/dist/components/p-Dn36Mj2E.js +5 -0
- package/dist/components/p-DoWy_P8b.js +5 -0
- package/dist/components/p-HbhTnepI.js +5 -0
- package/dist/components/{p-BcqVlof7.js → p-JkJjzmGm.js} +1 -1
- package/dist/components/{p-Nze3Utvd.js → p-Or3FLzbz.js} +1 -1
- package/dist/components/p-SWQlgYWR.js +5 -0
- package/dist/components/p-Zb9nyfTY.js +5 -0
- package/dist/components/p-jvKQA6x7.js +5 -0
- package/dist/components/p-pQb-3jFY.js +5 -0
- package/dist/components/p-qX6sHxOk.js +5 -0
- package/dist/esm/br-avatar.entry.js +3 -3
- package/dist/esm/br-breadcrumb-item.entry.js +1 -1
- package/dist/esm/br-breadcrumb.entry.js +3 -3
- package/dist/esm/br-button_2.entry.js +4 -4
- package/dist/esm/br-card.entry.js +3 -3
- package/dist/esm/br-carousel-page.entry.js +2 -2
- package/dist/esm/br-carousel.entry.js +3 -3
- package/dist/esm/br-checkbox-group.entry.js +3 -3
- package/dist/esm/br-checkbox.entry.js +5 -5
- package/dist/esm/br-checkgroup.entry.js +1 -1
- package/dist/esm/br-collapse_2.entry.js +6 -6
- package/dist/esm/br-cookiebar-cookie.entry.js +2 -2
- package/dist/esm/br-cookiebar-group.entry.js +2 -2
- package/dist/esm/br-cookiebar-header.entry.js +2 -2
- package/dist/esm/br-cookiebar-link.entry.js +2 -2
- package/dist/esm/br-cookiebar-note-group.entry.js +1 -1
- package/dist/esm/br-cookiebar-note.entry.js +2 -2
- package/dist/esm/br-cookiebar.entry.js +4 -4
- package/dist/esm/br-crumb.entry.js +1 -1
- package/dist/esm/br-date-picker_3.entry.js +966 -527
- package/dist/esm/br-datetime-picker.entry.js +1316 -280
- package/dist/esm/br-divider.entry.js +3 -3
- package/dist/esm/br-dropdown_2.entry.js +281 -138
- package/dist/esm/br-footer-category.entry.js +3 -3
- package/dist/esm/br-footer-item.entry.js +2 -2
- package/dist/esm/br-footer-legal.entry.js +2 -2
- package/dist/esm/br-footer-logo.entry.js +2 -2
- package/dist/esm/br-footer-social.entry.js +2 -2
- package/dist/esm/br-footer.entry.js +4 -4
- package/dist/esm/br-header-function.entry.js +2 -2
- package/dist/esm/br-header-link.entry.js +2 -2
- package/dist/esm/br-header-list.entry.js +3 -3
- package/dist/esm/br-header-logo.entry.js +2 -2
- package/dist/esm/br-header.entry.js +2 -2
- package/dist/esm/br-icon.entry.js +3 -3
- package/dist/esm/br-input.entry.js +65 -11
- package/dist/esm/br-item.entry.js +3 -3
- package/dist/esm/br-link.entry.js +8 -8
- package/dist/esm/br-loading.entry.js +2 -2
- package/dist/esm/br-magic-button.entry.js +2 -2
- package/dist/esm/br-menu-group.entry.js +2 -2
- package/dist/esm/br-menu-header.entry.js +2 -2
- package/dist/esm/br-menu-info.entry.js +2 -2
- package/dist/esm/br-menu-item.entry.js +2 -2
- package/dist/esm/br-menu-link.entry.js +2 -2
- package/dist/esm/br-menu-list.entry.js +1 -1
- package/dist/esm/br-menu-logo.entry.js +2 -2
- package/dist/esm/br-menu-social.entry.js +1 -1
- package/dist/esm/br-menu.entry.js +5 -5
- package/dist/esm/br-modal.entry.js +1 -1
- package/dist/esm/br-notification-body.entry.js +2 -2
- package/dist/esm/br-notification-header.entry.js +2 -2
- package/dist/esm/br-notification-item.entry.js +2 -2
- package/dist/esm/br-notification.entry.js +4 -4
- package/dist/esm/br-pagination.entry.js +3 -3
- package/dist/esm/br-radio-group.entry.js +5 -5
- package/dist/esm/br-radio.entry.js +5 -5
- package/dist/esm/br-scrim.entry.js +3 -3
- package/dist/esm/br-select-input_3.entry.js +308 -101
- package/dist/esm/br-sign-in.entry.js +3 -3
- package/dist/esm/br-skip-link-item.entry.js +1 -1
- package/dist/esm/br-skip-link.entry.js +2 -2
- package/dist/esm/br-skiplink-item.entry.js +2 -2
- package/dist/esm/br-slider.entry.js +4 -4
- package/dist/esm/br-step_2.entry.js +6 -6
- package/dist/esm/br-switch.entry.js +5 -5
- package/dist/esm/br-tab-item.entry.js +2 -2
- package/dist/esm/br-tab.entry.js +4 -4
- package/dist/esm/br-table-body.entry.js +2 -2
- package/dist/esm/br-table-cell.entry.js +2 -2
- package/dist/esm/br-table-header-cell.entry.js +2 -2
- package/dist/esm/br-table-header.entry.js +2 -2
- package/dist/esm/br-table-row.entry.js +2 -2
- package/dist/esm/br-table.entry.js +2 -2
- package/dist/esm/br-tag.entry.js +5 -5
- package/dist/esm/br-textarea.entry.js +4 -4
- package/dist/esm/br-tooltip.entry.js +3 -3
- package/dist/esm/br-upload.entry.js +6 -22
- package/dist/esm/br-wizard-panel.entry.js +2 -2
- package/dist/esm/br-wizard.entry.js +2 -2
- package/dist/esm/{datetime-picker-constants-BtRPYRvA.js → datetime-picker-constants-1l4_-FEJ.js} +20 -6
- package/dist/esm/{event-CfuJQ1DY.js → event-6Da1SZ3J.js} +1 -1
- package/dist/esm/format-bytes-B7bNfmgh.js +22 -0
- package/dist/esm/{iconify-icon-D3usVJE2.js → iconify-icon-C_DC6oQW.js} +103 -57
- package/dist/esm/{index-BQPOWxe5.js → index-BQRBKuY0.js} +75 -28
- package/dist/esm/index-ConyRdJe.js +14 -14
- package/dist/esm/index.js +2 -2
- package/dist/esm/{datetime-picker-props-validation-BeTcUTnE.js → isValid-wU7S6MI2.js} +2 -477
- package/dist/esm/loader.js +1 -1
- package/dist/esm/select.utils-BYsh2ZdE.js +57 -0
- package/dist/esm/{slot-BIG-yees.js → slot-Bt01zQ7-.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/hydrate/index.js +4459 -3577
- package/dist/hydrate/index.mjs +4459 -3577
- package/dist/types/components/avatar/avatar.d.ts +20 -20
- package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +3 -11
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +30 -25
- package/dist/types/components/breadcrumb/crumb/crumb.d.ts +1 -12
- package/dist/types/components/button/button.d.ts +20 -20
- package/dist/types/components/card/card.d.ts +19 -21
- package/dist/types/components/carousel/carousel-page/carousel-page.d.ts +2 -12
- package/dist/types/components/carousel/carousel.d.ts +22 -29
- package/dist/types/components/checkbox/checkbox.d.ts +16 -22
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +17 -18
- package/dist/types/components/checkgroup/checkgroup.d.ts +1 -13
- package/dist/types/components/collapse/collapse.d.ts +24 -20
- package/dist/types/components/cookiebar/cookiebar-cookie/cookiebar-cookie.d.ts +2 -15
- package/dist/types/components/cookiebar/cookiebar-group/cookiebar-group.d.ts +2 -15
- package/dist/types/components/cookiebar/cookiebar-header/cookiebar-header.d.ts +2 -15
- package/dist/types/components/cookiebar/cookiebar-link/cookiebar-link.d.ts +2 -14
- package/dist/types/components/cookiebar/cookiebar-note/cookiebar-note.d.ts +2 -13
- package/dist/types/components/cookiebar/cookiebar-note-group/cookiebar-note-group.d.ts +2 -13
- package/dist/types/components/cookiebar/cookiebar.d.ts +30 -25
- package/dist/types/components/datetime-picker/date-picker/date-picker-locale.d.ts +20 -12
- package/dist/types/components/datetime-picker/date-picker/date-picker-props-validation.d.ts +14 -13
- package/dist/types/components/datetime-picker/date-picker/date-picker.d.ts +313 -164
- package/dist/types/components/datetime-picker/datetime-input/datetime-input-constants.d.ts +14 -0
- package/dist/types/components/datetime-picker/datetime-input/datetime-input-props-validation.d.ts +19 -15
- package/dist/types/components/datetime-picker/datetime-input/datetime-input.d.ts +226 -105
- package/dist/types/components/datetime-picker/datetime-input/datetime-input.types.d.ts +36 -0
- package/dist/types/components/datetime-picker/datetime-picker-constants.d.ts +19 -5
- package/dist/types/components/datetime-picker/datetime-picker-form-associated.d.ts +32 -5
- package/dist/types/components/datetime-picker/datetime-picker-props-validation.d.ts +22 -24
- package/dist/types/components/datetime-picker/datetime-picker.d.ts +510 -241
- package/dist/types/components/datetime-picker/datetime-picker.types.d.ts +75 -21
- package/dist/types/components/datetime-picker/datetime-picker.utils.d.ts +53 -47
- package/dist/types/components/datetime-picker/time-picker/time-picker-constants.d.ts +3 -2
- package/dist/types/components/datetime-picker/time-picker/time-picker.d.ts +123 -62
- package/dist/types/components/divider/divider.d.ts +14 -18
- package/dist/types/components/dropdown/dropdown.d.ts +21 -20
- package/dist/types/components/footer/footer-category/footer-category.d.ts +2 -15
- package/dist/types/components/footer/footer-item/footer-item.d.ts +2 -15
- package/dist/types/components/footer/footer-legal/footer-legal.d.ts +1 -15
- package/dist/types/components/footer/footer-logo/footer-logo.d.ts +2 -15
- package/dist/types/components/footer/footer-social/footer-social.d.ts +2 -14
- package/dist/types/components/footer/footer.d.ts +23 -27
- package/dist/types/components/header/header-function/header-function.d.ts +9 -13
- package/dist/types/components/header/header-link/header-link.d.ts +2 -15
- package/dist/types/components/header/header-list/header-list.d.ts +2 -15
- package/dist/types/components/header/header-logo/header-logo.d.ts +2 -15
- package/dist/types/components/header/header.d.ts +29 -26
- package/dist/types/components/icon/icon.d.ts +21 -16
- package/dist/types/components/input/input.d.ts +48 -23
- package/dist/types/components/input/input.types.d.ts +4 -0
- package/dist/types/components/item/item.d.ts +17 -21
- package/dist/types/components/link/link.d.ts +18 -22
- package/dist/types/components/list/list.d.ts +16 -20
- package/dist/types/components/loading/loading.d.ts +16 -23
- package/dist/types/components/magic-button/magic-button.d.ts +12 -19
- package/dist/types/components/menu/menu-group/menu-group.d.ts +2 -15
- package/dist/types/components/menu/menu-header/menu-header.d.ts +2 -15
- package/dist/types/components/menu/menu-info/menu-info.d.ts +1 -14
- package/dist/types/components/menu/menu-item/menu-item.d.ts +2 -15
- package/dist/types/components/menu/menu-link/menu-link.d.ts +4 -16
- package/dist/types/components/menu/menu-list/menu-list.d.ts +2 -15
- package/dist/types/components/menu/menu-logo/menu-logo.d.ts +1 -14
- package/dist/types/components/menu/menu-social/menu-social.d.ts +2 -15
- package/dist/types/components/menu/menu.d.ts +25 -32
- package/dist/types/components/message/message.d.ts +21 -24
- package/dist/types/components/modal/modal.d.ts +18 -21
- package/dist/types/components/notification/notification-body/notification-body.d.ts +2 -12
- package/dist/types/components/notification/notification-header/notification-header.d.ts +2 -13
- package/dist/types/components/notification/notification-item/notification-item.d.ts +2 -15
- package/dist/types/components/notification/notification.d.ts +18 -27
- package/dist/types/components/pagination/pagination.d.ts +13 -21
- package/dist/types/components/radio/radio.d.ts +15 -18
- package/dist/types/components/radio-group/radio-group.d.ts +18 -18
- package/dist/types/components/scrim/scrim.d.ts +12 -15
- package/dist/types/components/select/select-input/select-input.d.ts +20 -12
- package/dist/types/components/select/select-list/select-list.d.ts +27 -14
- package/dist/types/components/select/select-option/select-option.d.ts +6 -10
- package/dist/types/components/select/select.d.ts +75 -87
- package/dist/types/components/select/select.types.d.ts +12 -0
- package/dist/types/components/select/select.utils.d.ts +3 -0
- package/dist/types/components/sign-in/sign-in.d.ts +11 -15
- package/dist/types/components/skip-link/skip-link-item/skip-link-item-alias.d.ts +7 -3
- package/dist/types/components/skip-link/skip-link-item/skip-link-item.d.ts +4 -14
- package/dist/types/components/skip-link/skip-link.d.ts +17 -23
- package/dist/types/components/slider/slider.d.ts +14 -24
- package/dist/types/components/step/step-item/step-item.d.ts +2 -12
- package/dist/types/components/step/step.d.ts +15 -24
- package/dist/types/components/switch/switch.d.ts +14 -18
- package/dist/types/components/tab/tab-item/tab-item.d.ts +4 -14
- package/dist/types/components/tab/tab.d.ts +19 -26
- package/dist/types/components/table/table-body/table-body.d.ts +2 -12
- package/dist/types/components/table/table-cell/table-cell.d.ts +2 -11
- package/dist/types/components/table/table-header/table-header.d.ts +2 -12
- package/dist/types/components/table/table-header-cell/table-header-cell.d.ts +2 -12
- package/dist/types/components/table/table-row/table-row.d.ts +2 -12
- package/dist/types/components/table/table.d.ts +24 -31
- package/dist/types/components/tag/tag.d.ts +15 -24
- package/dist/types/components/textarea/textarea.d.ts +13 -21
- package/dist/types/components/tooltip/tooltip.d.ts +12 -18
- package/dist/types/components/upload/upload.d.ts +20 -27
- package/dist/types/components/wizard/wizard-panel/wizard-panel.d.ts +2 -12
- package/dist/types/components/wizard/wizard.d.ts +21 -25
- package/dist/types/components.d.ts +3586 -5062
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/p-031a2256.entry.js +5 -0
- package/dist/webcomponents/p-0602e5b1.entry.js +5 -0
- package/dist/webcomponents/p-079d5f69.entry.js +5 -0
- package/dist/webcomponents/p-087ed5e7.entry.js +5 -0
- package/dist/webcomponents/p-0d5a9ebf.entry.js +5 -0
- package/dist/webcomponents/p-105b4d06.entry.js +5 -0
- package/dist/webcomponents/p-11d4edc5.entry.js +5 -0
- package/dist/webcomponents/p-12dd22af.entry.js +5 -0
- package/dist/webcomponents/p-14aedf0d.entry.js +5 -0
- package/dist/webcomponents/p-152482f9.entry.js +5 -0
- package/dist/webcomponents/p-19b4b1b7.entry.js +5 -0
- package/dist/webcomponents/p-1cd1126e.entry.js +5 -0
- package/dist/webcomponents/{p-BtRPYRvA.js → p-1l4_-FEJ.js} +1 -1
- package/dist/webcomponents/p-21e10074.entry.js +5 -0
- package/dist/webcomponents/p-2271ea84.entry.js +5 -0
- package/dist/webcomponents/p-271b1ede.entry.js +5 -0
- package/dist/webcomponents/p-28f732fc.entry.js +5 -0
- package/dist/webcomponents/{p-c1dafd8d.entry.js → p-2971d38a.entry.js} +1 -1
- package/dist/{components/p-DOJ1vYOl.js → webcomponents/p-2ac48875.entry.js} +1 -1
- package/dist/webcomponents/p-2b1a919c.entry.js +5 -0
- package/dist/webcomponents/p-2da57966.entry.js +5 -0
- package/dist/webcomponents/p-2e81b0b3.entry.js +5 -0
- package/dist/webcomponents/p-2eececed.entry.js +5 -0
- package/dist/webcomponents/{p-513ee754.entry.js → p-2f904c4a.entry.js} +1 -1
- package/dist/webcomponents/p-32414f1c.entry.js +5 -0
- package/dist/webcomponents/{p-5a7c2031.entry.js → p-324afbce.entry.js} +1 -1
- package/dist/webcomponents/p-32ea6342.entry.js +5 -0
- package/dist/webcomponents/p-330ec8ab.entry.js +5 -0
- package/dist/webcomponents/p-374f83b1.entry.js +5 -0
- package/dist/webcomponents/p-3926cc91.entry.js +5 -0
- package/dist/webcomponents/p-39a7826d.entry.js +5 -0
- package/dist/webcomponents/p-3bcc2c58.entry.js +5 -0
- package/dist/webcomponents/p-3c7ce0e4.entry.js +5 -0
- package/dist/webcomponents/p-467842ca.entry.js +5 -0
- package/dist/webcomponents/p-53550e8c.entry.js +5 -0
- package/dist/webcomponents/p-53e71a8a.entry.js +5 -0
- package/dist/webcomponents/p-5528b466.entry.js +5 -0
- package/dist/webcomponents/p-55e0822d.entry.js +5 -0
- package/dist/webcomponents/p-58bacbe1.entry.js +5 -0
- package/dist/webcomponents/p-5a5ed7d8.entry.js +5 -0
- package/dist/webcomponents/p-621f0fa8.entry.js +5 -0
- package/dist/webcomponents/p-6514a75d.entry.js +5 -0
- package/dist/webcomponents/{p-19a38e20.entry.js → p-678b43a6.entry.js} +1 -1
- package/dist/webcomponents/{p-CfuJQ1DY.js → p-6Da1SZ3J.js} +1 -1
- package/dist/webcomponents/p-6b6be415.entry.js +5 -0
- package/dist/webcomponents/{p-0d2ca2f7.entry.js → p-6d58ab4f.entry.js} +1 -1
- package/dist/webcomponents/p-6ff9b26e.entry.js +5 -0
- package/dist/webcomponents/p-84dfbfdd.entry.js +5 -0
- package/dist/webcomponents/{p-d5d2205c.entry.js → p-85c8d060.entry.js} +1 -1
- package/dist/webcomponents/p-913d6f28.entry.js +5 -0
- package/dist/webcomponents/{p-94848046.entry.js → p-975ea5c7.entry.js} +1 -1
- package/dist/webcomponents/p-992167bc.entry.js +5 -0
- package/dist/webcomponents/p-B7bNfmgh.js +5 -0
- package/dist/webcomponents/p-BYsh2ZdE.js +5 -0
- package/dist/webcomponents/p-C_DC6oQW.js +16 -0
- package/dist/webcomponents/{p-DV-iW9Aj.js → p-CpE_G6IZ.js} +1 -1
- package/dist/webcomponents/p-DnwERaeQ.js +5 -0
- package/dist/webcomponents/p-a21872bf.entry.js +5 -0
- package/dist/webcomponents/{p-0b0cf355.entry.js → p-a9f16a65.entry.js} +1 -1
- package/dist/webcomponents/p-b8d4ace3.entry.js +5 -0
- package/dist/webcomponents/{p-6850e98e.entry.js → p-bbcde1ea.entry.js} +1 -1
- package/dist/webcomponents/p-bbf47e78.entry.js +5 -0
- package/dist/webcomponents/p-bf35e506.entry.js +5 -0
- package/dist/webcomponents/{p-b02a7218.entry.js → p-c09af3cd.entry.js} +1 -1
- package/dist/webcomponents/p-c29268b5.entry.js +5 -0
- package/dist/webcomponents/p-c3e61c39.entry.js +5 -0
- package/dist/webcomponents/{p-b16590fc.entry.js → p-c6b2545a.entry.js} +1 -1
- package/dist/webcomponents/{p-b55425b7.entry.js → p-c6f2f17b.entry.js} +1 -1
- package/dist/webcomponents/p-cae39e13.entry.js +5 -0
- package/dist/webcomponents/p-cb1e08b1.entry.js +5 -0
- package/dist/webcomponents/{p-e94a52ac.entry.js → p-cb690a87.entry.js} +1 -1
- package/dist/webcomponents/p-d0be7243.entry.js +5 -0
- package/dist/webcomponents/p-d191c6e3.entry.js +5 -0
- package/dist/webcomponents/p-d205f3fd.entry.js +5 -0
- package/dist/webcomponents/p-d3bd2c40.entry.js +5 -0
- package/dist/webcomponents/{p-61977114.entry.js → p-dbeea64e.entry.js} +1 -1
- package/dist/webcomponents/p-df475129.entry.js +5 -0
- package/dist/webcomponents/p-e0ccf189.entry.js +5 -0
- package/dist/webcomponents/p-e121429a.entry.js +5 -0
- package/dist/webcomponents/p-e4b968b5.entry.js +5 -0
- package/dist/webcomponents/p-e661c024.entry.js +5 -0
- package/dist/webcomponents/p-e6c6f305.entry.js +5 -0
- package/dist/webcomponents/p-e8291be2.entry.js +5 -0
- package/dist/webcomponents/p-eb5806c7.entry.js +5 -0
- package/dist/webcomponents/{p-82759002.entry.js → p-ed3fa8ec.entry.js} +1 -1
- package/dist/webcomponents/p-f9084f16.entry.js +5 -0
- package/dist/webcomponents/{p-4118b878.entry.js → p-fad3aa61.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -2
- package/dist/collection/pages/components/select/remote.js +0 -33
- package/dist/collection/pages/components/select/virtualized.js +0 -13
- package/dist/components/p-0qmYp77w.js +0 -5
- package/dist/components/p-5c3rNBXh.js +0 -5
- package/dist/components/p-B8oIvH3q.js +0 -5
- package/dist/components/p-BECz8XWJ.js +0 -5
- package/dist/components/p-BM4Ys6hX.js +0 -5
- package/dist/components/p-BXWh9s7p.js +0 -5
- package/dist/components/p-BblZlUp2.js +0 -5
- package/dist/components/p-Bezou5CQ.js +0 -5
- package/dist/components/p-BjeUETWJ.js +0 -5
- package/dist/components/p-Cd6udSDt.js +0 -5
- package/dist/components/p-Ci0_RqAE.js +0 -5
- package/dist/components/p-CuBgClZm.js +0 -5
- package/dist/components/p-D0QYZSoP.js +0 -5
- package/dist/components/p-D3usVJE2.js +0 -16
- package/dist/components/p-D4SWpW6-.js +0 -5
- package/dist/components/p-D579DS7x.js +0 -5
- package/dist/components/p-D8K7rhHd.js +0 -5
- package/dist/components/p-D9nXlCuS.js +0 -5
- package/dist/components/p-DKFO6Q_g.js +0 -5
- package/dist/components/p-DNJSSCNi.js +0 -5
- package/dist/components/p-DYI30IZL.js +0 -5
- package/dist/components/p-DcVldfL0.js +0 -5
- package/dist/components/p-DhvmHPp4.js +0 -5
- package/dist/components/p-DwgiHL0b.js +0 -5
- package/dist/components/p-WxDB6Dk4.js +0 -5
- package/dist/components/p-ZLoeVagg.js +0 -5
- package/dist/components/p-gbYJ9sfc.js +0 -5
- package/dist/components/p-uc8ABlC_.js +0 -5
- package/dist/components/p-v60ypfxD.js +0 -5
- package/dist/webcomponents/p-078bd760.entry.js +0 -5
- package/dist/webcomponents/p-07c2cdff.entry.js +0 -5
- package/dist/webcomponents/p-09817344.entry.js +0 -5
- package/dist/webcomponents/p-0d79ca44.entry.js +0 -5
- package/dist/webcomponents/p-0fe3c47b.entry.js +0 -5
- package/dist/webcomponents/p-116b53c9.entry.js +0 -5
- package/dist/webcomponents/p-1240dae7.entry.js +0 -5
- package/dist/webcomponents/p-14ff5865.entry.js +0 -5
- package/dist/webcomponents/p-15743a02.entry.js +0 -5
- package/dist/webcomponents/p-16cebf49.entry.js +0 -5
- package/dist/webcomponents/p-1884b9d3.entry.js +0 -5
- package/dist/webcomponents/p-1d36c8fa.entry.js +0 -5
- package/dist/webcomponents/p-1fa4b5b2.entry.js +0 -5
- package/dist/webcomponents/p-212c069b.entry.js +0 -5
- package/dist/webcomponents/p-23f37cd6.entry.js +0 -5
- package/dist/webcomponents/p-24502b63.entry.js +0 -5
- package/dist/webcomponents/p-27fb81f3.entry.js +0 -5
- package/dist/webcomponents/p-28844490.entry.js +0 -5
- package/dist/webcomponents/p-2b41bdcc.entry.js +0 -5
- package/dist/webcomponents/p-2cb1e09b.entry.js +0 -5
- package/dist/webcomponents/p-2fcda70b.entry.js +0 -5
- package/dist/webcomponents/p-3378300c.entry.js +0 -5
- package/dist/webcomponents/p-3ae9cf69.entry.js +0 -5
- package/dist/webcomponents/p-3b79cd49.entry.js +0 -5
- package/dist/webcomponents/p-3c1513ec.entry.js +0 -5
- package/dist/webcomponents/p-4534a3c3.entry.js +0 -5
- package/dist/webcomponents/p-48abf568.entry.js +0 -5
- package/dist/webcomponents/p-4e5ea05c.entry.js +0 -5
- package/dist/webcomponents/p-521a1076.entry.js +0 -5
- package/dist/webcomponents/p-59fc52c0.entry.js +0 -5
- package/dist/webcomponents/p-5a9f4ea2.entry.js +0 -5
- package/dist/webcomponents/p-71853dfc.entry.js +0 -5
- package/dist/webcomponents/p-76d51654.entry.js +0 -5
- package/dist/webcomponents/p-77e242f3.entry.js +0 -5
- package/dist/webcomponents/p-7b849472.entry.js +0 -5
- package/dist/webcomponents/p-7dbfb875.entry.js +0 -5
- package/dist/webcomponents/p-7fa7f052.entry.js +0 -5
- package/dist/webcomponents/p-81c65747.entry.js +0 -5
- package/dist/webcomponents/p-91a5329f.entry.js +0 -5
- package/dist/webcomponents/p-966773a9.entry.js +0 -5
- package/dist/webcomponents/p-9abb5a53.entry.js +0 -5
- package/dist/webcomponents/p-9bf2e325.entry.js +0 -5
- package/dist/webcomponents/p-9c943b40.entry.js +0 -5
- package/dist/webcomponents/p-9ec3ca00.entry.js +0 -5
- package/dist/webcomponents/p-B0PbhaxL.js +0 -5
- package/dist/webcomponents/p-D3usVJE2.js +0 -16
- package/dist/webcomponents/p-ad91f149.entry.js +0 -5
- package/dist/webcomponents/p-aeea1f17.entry.js +0 -5
- package/dist/webcomponents/p-c2ca0289.entry.js +0 -5
- package/dist/webcomponents/p-c8af334e.entry.js +0 -5
- package/dist/webcomponents/p-cac49c6a.entry.js +0 -5
- package/dist/webcomponents/p-cb9ebfbe.entry.js +0 -5
- package/dist/webcomponents/p-ce3d689c.entry.js +0 -5
- package/dist/webcomponents/p-d11f95a0.entry.js +0 -5
- package/dist/webcomponents/p-dad03b49.entry.js +0 -5
- package/dist/webcomponents/p-db8e6322.entry.js +0 -5
- package/dist/webcomponents/p-dea8015f.entry.js +0 -5
- package/dist/webcomponents/p-e07e309d.entry.js +0 -5
- package/dist/webcomponents/p-e53d874b.entry.js +0 -5
- package/dist/webcomponents/p-e5540387.entry.js +0 -5
- package/dist/webcomponents/p-e9be4d3f.entry.js +0 -5
- package/dist/webcomponents/p-e9db9381.entry.js +0 -5
- package/dist/webcomponents/p-edca5de1.entry.js +0 -5
- package/dist/webcomponents/p-ee5b9fc9.entry.js +0 -5
- package/dist/webcomponents/p-f4ef8c63.entry.js +0 -5
- /package/dist/components/{p-5z6jgH1D.js → p-BNckUhK6.js} +0 -0
- /package/dist/webcomponents/{p-BIG-yees.js → p-Bt01zQ7-.js} +0 -0
|
@@ -9,48 +9,48 @@ import { set } from "date-fns/set";
|
|
|
9
9
|
import { toDate } from "date-fns/toDate";
|
|
10
10
|
import { dispatchNativeFormEvent } from "../../shared/utils/event";
|
|
11
11
|
import { getFormValidationState, isFormControlDisabled, setFormValidity, } from "../../shared/utils/form";
|
|
12
|
-
import
|
|
13
|
-
import { reportInvalidPropValue } from "../../shared/utils/prop-warning";
|
|
12
|
+
import Helpers from "../../shared/utils/helpers";
|
|
14
13
|
import { hasAssignedSlotContent } from "../../shared/utils/slot";
|
|
15
14
|
import { resolveSsrLocalDate } from "../../shared/utils/ssr-date";
|
|
16
15
|
import { resolveFormValidator, runFormValidator } from "../../shared/utils/validator";
|
|
17
|
-
import { DATETIME_PICKER_LOCALE, DATETIME_PICKER_MODE } from "./datetime-picker-constants";
|
|
16
|
+
import { DATETIME_PICKER_LOCALE, DATETIME_PICKER_MODE, DATETIME_RANGE_ORDER_MESSAGE, } from "./datetime-picker-constants";
|
|
18
17
|
import { hasDatetimePickerMissingValue, parseDatetimePickerSerializedRange, parseDatetimePickerSerializedValue, serializeDatetimePickerFormValue, } from "./datetime-picker-form-associated";
|
|
19
|
-
import {
|
|
18
|
+
import { normalizeDatetimePickerDisabledDates, normalizeDatetimePickerInitialMoment, normalizeDatetimePickerMode, normalizeDatetimePickerSelectionMode, normalizeDatetimePickerWeekStartsOn, } from "./datetime-picker-props-validation";
|
|
20
19
|
/**
|
|
21
|
-
* O
|
|
20
|
+
* O `br-datetime-picker` é um campo para informar data, hora ou data e hora. A pessoa pode digitar ou escolher no calendário e nos controles de horário.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
22
|
+
* Escolha o tipo em `mode`: `date`, `time` ou `datetime`. Para início e fim, use `selection-mode="range"`.
|
|
24
23
|
*
|
|
25
|
-
*
|
|
26
|
-
* -
|
|
27
|
-
* - **Validação e formulários nativos:** Valida datas mínimas (`min`), máximas (`max`), formatos permitidos e comunica valores estruturados diretamente ao formulário pai.
|
|
24
|
+
* ```html
|
|
25
|
+
* <br-datetime-picker mode="date" name="nascimento" required></br-datetime-picker>
|
|
28
26
|
*
|
|
29
|
-
*
|
|
27
|
+
* <br-datetime-picker mode="date" selection-mode="range" name="periodo"></br-datetime-picker>
|
|
28
|
+
* ```
|
|
30
29
|
*
|
|
31
|
-
*
|
|
32
|
-
* - O formulário exigir preenchimento de datas ou horários onde tanto a digitação manual rápida quanto a exploração visual no calendário agreguem valor à experiência.
|
|
33
|
-
* - For necessário selecionar um período com data de início e fim.
|
|
34
|
-
* - **Evite e prefira outro componente quando:**
|
|
35
|
-
* - A data for estritamente de nascimento ou emissão de documento onde a pessoa usuária sabe os dígitos de cor e prefere digitar apenas números (prefira `br-input` com máscara numérica).
|
|
30
|
+
* ### Ler o valor
|
|
36
31
|
*
|
|
37
|
-
*
|
|
32
|
+
* | Onde | Formato |
|
|
33
|
+
* | --- | --- |
|
|
34
|
+
* | `value` | `Date` (ou `null`) |
|
|
35
|
+
* | `rangeValue` | `{ start, end }` com `Date` |
|
|
36
|
+
* | `serialized-value` e envio do formulário | `2026-05-20` (data), `14:30` (hora), `2026-05-20T14:30:00-03:00` (data e hora), `início/fim` (intervalo) |
|
|
38
37
|
*
|
|
39
|
-
*
|
|
40
|
-
* | --- | --- | --- |
|
|
41
|
-
* | `br-datetime-picker` | **Orquestrador principal.** Gerencia valor consolidado, validação, abertura do popup e sincronização entre input e calendário. | Deve ser o único controle declarado no template da aplicação na quase totalidade dos casos. |
|
|
42
|
-
* | `br-datetime-input` | **Campo com máscara.** Exibe o valor formatado e permite digitação manual. | Coordenado automaticamente pelo pai; use avulso apenas em composições customizadas. |
|
|
43
|
-
* | `br-date-picker` | **Calendário de datas.** Painel visual com grade de dias, meses e anos. | Coordenado pelo pai; use avulso se precisar de calendário estático embutido. |
|
|
44
|
-
* | `br-time-picker` | **Seletor de horário.** Controle de escolha de horas e minutos. | Coordenado pelo pai; use avulso se precisar apenas de seletor de hora sem data. |
|
|
38
|
+
* Atribua valores do tipo `Date` pelo JavaScript (`picker.value = new Date()`), não por atributo. Para restringir datas, use `min`, `max` e `disabled-dates`.
|
|
45
39
|
*
|
|
46
|
-
* ###
|
|
40
|
+
* ### Quando usar
|
|
47
41
|
*
|
|
48
|
-
*
|
|
42
|
+
* - Formulários que pedem uma data, um horário ou um período.
|
|
49
43
|
*
|
|
50
|
-
*
|
|
44
|
+
* ### Quando evitar
|
|
51
45
|
*
|
|
52
|
-
|
|
53
|
-
*
|
|
46
|
+
* - Para só exibir uma data: use texto formatado.
|
|
47
|
+
* - Para escolher várias datas soltas: o componente aceita uma data ou um intervalo.
|
|
48
|
+
*
|
|
49
|
+
* O calendário (`br-date-picker`), os controles de horário (`br-time-picker`) e o campo de texto (`br-datetime-input`) são criados pelo próprio componente; não é preciso declará-los.
|
|
50
|
+
*
|
|
51
|
+
* Consulte as [diretrizes de design do GovBR](https://www.gov.br/ds/components/datetimepicker?tab=designer).
|
|
52
|
+
*
|
|
53
|
+
* @category Formulários
|
|
54
54
|
* @status stable
|
|
55
55
|
* @slot feedback - Mensagem de validação, normalmente um `br-message`.
|
|
56
56
|
* @part container - Parte para o container base do seletor.
|
|
@@ -63,188 +63,334 @@ import { isValidDatetimePickerDateRange, normalizeDatetimePickerDisabledDates, n
|
|
|
63
63
|
export class DatetimePicker {
|
|
64
64
|
constructor() {
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
68
|
-
this.isPickerOpen = false;
|
|
69
|
-
this.formDisabled = false;
|
|
70
|
-
this.hasFeedbackSlot = false;
|
|
71
|
-
this.customValidationMessage = '';
|
|
72
|
-
this.validatorMessage = null;
|
|
73
|
-
this.isValidating = false;
|
|
74
|
-
this.feedbackId = generateUniqueId('br-datetime-picker-feedback');
|
|
75
|
-
/** Lista normalizada de datas indisponíveis para seleção. */
|
|
76
|
-
this.normalizedDisabledDates = [];
|
|
77
|
-
/** Data final selecionada no modo de intervalo. */
|
|
78
|
-
this.rangeEnd = null;
|
|
79
|
-
/** Data inicial selecionada no modo de intervalo. */
|
|
80
|
-
this.rangeStart = null;
|
|
81
|
-
/**
|
|
82
|
-
* Mantém a data de referência que orienta a navegação visual do calendário.
|
|
83
|
-
*/
|
|
84
|
-
this.referenceDate = new Date();
|
|
85
|
-
/**
|
|
86
|
-
* Define o modo de seleção exibido pelo componente: data, horário ou ambos.
|
|
66
|
+
* Modo exibido pelo componente.
|
|
87
67
|
*
|
|
88
|
-
* Valores
|
|
89
|
-
* Valores inválidos são
|
|
90
|
-
* mantendo o atributo refletido sempre consistente com o modo exibido.
|
|
68
|
+
* Valores: `date` | `time` | `datetime`.
|
|
69
|
+
* Valores inválidos são normalizados para o padrão.
|
|
91
70
|
*
|
|
92
71
|
* @default 'datetime'
|
|
93
72
|
*/
|
|
94
73
|
this.mode = DATETIME_PICKER_MODE.DEFAULT;
|
|
95
74
|
/**
|
|
96
|
-
*
|
|
75
|
+
* Locale usado para formatação e rótulos.
|
|
97
76
|
*
|
|
98
77
|
* @default 'pt-BR'
|
|
99
78
|
*/
|
|
100
79
|
this.locale = DATETIME_PICKER_LOCALE.DEFAULT;
|
|
101
80
|
/**
|
|
102
|
-
*
|
|
81
|
+
* Texto placeholder exibido no input.
|
|
103
82
|
*
|
|
104
83
|
* @default ''
|
|
105
84
|
*/
|
|
106
85
|
this.placeholder = '';
|
|
107
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* Nome do campo para submissão em formulários nativos.
|
|
88
|
+
*
|
|
89
|
+
* @default ''
|
|
90
|
+
*/
|
|
108
91
|
this.name = '';
|
|
109
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* Indica se o campo é requerido para submissão do formulário.
|
|
94
|
+
*
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
110
97
|
this.required = false;
|
|
111
98
|
/**
|
|
112
|
-
* Menor data/
|
|
113
|
-
* Aceita texto no atributo HTML ou uma instância de `Date` por property binding.
|
|
99
|
+
* Menor data/hora aceito (Date | string | null).
|
|
114
100
|
*
|
|
115
|
-
* @
|
|
116
|
-
* ```html
|
|
117
|
-
* <br-datetime-picker mode="date" min="2026-01-01"></br-datetime-picker>
|
|
118
|
-
* ```
|
|
101
|
+
* @default null
|
|
119
102
|
*/
|
|
120
103
|
this.min = null;
|
|
121
104
|
/**
|
|
122
|
-
* Maior data/
|
|
123
|
-
* Aceita texto no atributo HTML ou uma instância de `Date` por property binding.
|
|
105
|
+
* Maior data/hora aceito (Date | string | null).
|
|
124
106
|
*
|
|
125
|
-
* @
|
|
126
|
-
* ```html
|
|
127
|
-
* <br-datetime-picker mode="date" max="2026-12-31"></br-datetime-picker>
|
|
128
|
-
* ```
|
|
107
|
+
* @default null
|
|
129
108
|
*/
|
|
130
109
|
this.max = null;
|
|
131
110
|
/**
|
|
132
|
-
*
|
|
111
|
+
* Tipo de seleção: `single` ou `range`.
|
|
133
112
|
*
|
|
134
|
-
*
|
|
135
|
-
* Se `selectionMode="range"` for informado, o componente ajusta automaticamente
|
|
136
|
-
* `mode` para `date`. Se `mode` mudar para `time` ou `datetime`, o componente
|
|
137
|
-
* normaliza `selectionMode` para `single` quando necessário.
|
|
138
|
-
* Valores inválidos usam `single`.
|
|
113
|
+
* @default 'single'
|
|
139
114
|
*/
|
|
140
115
|
this.selectionMode = 'single';
|
|
141
116
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* Valores suportados: 0 (domingo) a 6 (sábado).
|
|
117
|
+
* Dia inicial da semana exibido no calendário (0 = Dom, 6 = Sáb).
|
|
145
118
|
*
|
|
146
119
|
* @default 0
|
|
147
120
|
*/
|
|
148
121
|
this.weekStartsOn = 0;
|
|
149
122
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* Aceita:
|
|
153
|
-
* - `'now'`: seleciona o momento atual.
|
|
154
|
-
* - `Date` ou `string`: seleciona uma data arbitrária.
|
|
155
|
-
* - `null`: inicia sem seleção.
|
|
156
|
-
*
|
|
157
|
-
* Reativo em runtime: mudanças na prop atualizam estado e subcomponentes.
|
|
123
|
+
* Valor inicial da seleção: `'now' | Date | string | null`.
|
|
158
124
|
*
|
|
159
125
|
* @default null
|
|
160
|
-
* @example
|
|
161
|
-
* ```html
|
|
162
|
-
* <br-datetime-picker initial-moment="now"></br-datetime-picker>
|
|
163
|
-
* ```
|
|
164
126
|
*/
|
|
165
127
|
this.initialMoment = null;
|
|
166
128
|
/**
|
|
167
|
-
*
|
|
168
|
-
* Pode ser controlada por property binding e é atualizada pelo evento `valueChange`.
|
|
169
|
-
* Para formulários e atributos textuais, use `serializedValue`.
|
|
129
|
+
* Valor selecionado pelo usuário (Date | null).
|
|
170
130
|
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* picker.value = new Date(2026, 8, 7, 14, 30);
|
|
175
|
-
* ```
|
|
131
|
+
* Pode ser controlado externamente e é refletido internamente.
|
|
132
|
+
*
|
|
133
|
+
* @default null
|
|
176
134
|
*/
|
|
177
135
|
this.value = null;
|
|
178
136
|
/**
|
|
179
137
|
* Desabilita toda a interação do componente.
|
|
180
138
|
*
|
|
181
|
-
* Quando `true`, impede abrir o picker, alterar valores e navegar entre datas/horários.
|
|
182
|
-
*
|
|
183
139
|
* @default false
|
|
184
140
|
*/
|
|
185
141
|
this.disabled = false;
|
|
186
142
|
/**
|
|
187
|
-
*
|
|
143
|
+
* Datas indisponíveis para seleção. Aceita `Date[]`, `string` ou `null`.
|
|
188
144
|
*
|
|
189
|
-
*
|
|
190
|
-
* separadas por espaço em branco. Datas inválidas são ignoradas com warning.
|
|
191
|
-
* A comparação considera apenas o dia (ano/mês/dia), ignorando hora.
|
|
145
|
+
* Datas inválidas são ignoradas. A comparação considera apenas o dia.
|
|
192
146
|
*
|
|
193
147
|
* @default null
|
|
194
|
-
* @example
|
|
195
|
-
* ```html
|
|
196
|
-
* <br-datetime-picker mode="date" disabled-dates="2026-09-07 2026-09-08"></br-datetime-picker>
|
|
197
|
-
* ```
|
|
198
|
-
* @example
|
|
199
|
-
* ```js
|
|
200
|
-
* const picker = document.querySelector('br-datetime-picker');
|
|
201
|
-
* picker.disabledDates = [new Date(2026, 8, 7), '2026-09-08'];
|
|
202
|
-
* ```
|
|
203
148
|
*/
|
|
204
149
|
this.disabledDates = null;
|
|
205
150
|
/**
|
|
206
|
-
*
|
|
207
|
-
* ou variar conforme o mês.
|
|
208
|
-
*
|
|
209
|
-
* Quando `true`, o calendário sempre exibe 6 semanas completas.
|
|
210
|
-
* Quando `false`, o calendário adapta-se ao mês, exibindo apenas as semanas necessárias.
|
|
151
|
+
* Mantém número fixo de linhas no calendário (6 semanas) quando `true`.
|
|
211
152
|
*
|
|
212
153
|
* @default false
|
|
213
154
|
*/
|
|
214
155
|
this.fixedRowCount = false;
|
|
215
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* Controla se o conteúdo do picker está visível.
|
|
158
|
+
*
|
|
159
|
+
* @internal Estado reativo interno; não usar externamente.
|
|
160
|
+
*/
|
|
161
|
+
this.isPickerOpen = false;
|
|
162
|
+
/**
|
|
163
|
+
* Indica se o formulário associado desabilitou o componente.
|
|
164
|
+
*
|
|
165
|
+
* @internal Estado reativo interno.
|
|
166
|
+
*/
|
|
167
|
+
this.formDisabled = false;
|
|
168
|
+
/**
|
|
169
|
+
* Indica se existe slot `feedback` presente no host.
|
|
170
|
+
*
|
|
171
|
+
* @internal Estado reativo interno.
|
|
172
|
+
*/
|
|
173
|
+
this.hasFeedbackSlot = false;
|
|
174
|
+
/**
|
|
175
|
+
* Mensagem de validação customizada definida por `setCustomValidity`.
|
|
176
|
+
*
|
|
177
|
+
* @internal Estado reativo interno.
|
|
178
|
+
*/
|
|
179
|
+
this.customValidationMessage = '';
|
|
180
|
+
/**
|
|
181
|
+
* Mensagem retornada pelo validator customizado, se houver.
|
|
182
|
+
*
|
|
183
|
+
* @internal Estado reativo interno.
|
|
184
|
+
*/
|
|
185
|
+
this.validatorMessage = null;
|
|
186
|
+
/**
|
|
187
|
+
* Mensagem textual de validação proveniente do input interno.
|
|
188
|
+
*
|
|
189
|
+
* @internal Estado reativo interno.
|
|
190
|
+
*/
|
|
191
|
+
this.inputValidationMessage = '';
|
|
192
|
+
/**
|
|
193
|
+
* Indica que o usuário está editando o texto do input e que a validação
|
|
194
|
+
* textual está pendente (mensagem escondida até commit/blur).
|
|
195
|
+
*
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
this.inputValidationPending = false;
|
|
199
|
+
/**
|
|
200
|
+
* Indicador de execução do validator assíncrono.
|
|
201
|
+
*
|
|
202
|
+
* @internal Estado reativo interno.
|
|
203
|
+
*/
|
|
204
|
+
this.isValidating = false;
|
|
205
|
+
/**
|
|
206
|
+
* Lista normalizada de datas indisponíveis para seleção.
|
|
207
|
+
*
|
|
208
|
+
* @internal Mantida em formato `Date[]` para uso interno pelo calendário.
|
|
209
|
+
*/
|
|
210
|
+
this.normalizedDisabledDates = [];
|
|
211
|
+
/**
|
|
212
|
+
* Data final selecionada no modo de intervalo.
|
|
213
|
+
*
|
|
214
|
+
* @internal Estado reativo interno.
|
|
215
|
+
*/
|
|
216
|
+
this.rangeEnd = null;
|
|
217
|
+
/**
|
|
218
|
+
* Data inicial selecionada no modo de intervalo.
|
|
219
|
+
*
|
|
220
|
+
* @internal Estado reativo interno.
|
|
221
|
+
*/
|
|
222
|
+
this.rangeStart = null;
|
|
223
|
+
/**
|
|
224
|
+
* Data de referência usada para navegação visual (mês/semana exibidos).
|
|
225
|
+
*
|
|
226
|
+
* @internal Controle de navegação do calendário.
|
|
227
|
+
*/
|
|
228
|
+
this.referenceDate = new Date();
|
|
229
|
+
/**
|
|
230
|
+
* ID único do contêiner de feedback interno.
|
|
231
|
+
* Gerado por `Helpers.generateUniqueId` no momento da criação da instância
|
|
232
|
+
* e usado para associar mensagens de validação ao input interno.
|
|
233
|
+
*
|
|
234
|
+
* @internal
|
|
235
|
+
*/
|
|
236
|
+
this.feedbackId = Helpers.generateUniqueId('br-datetime-picker-feedback');
|
|
237
|
+
/**
|
|
238
|
+
* Snapshot da seleção inicial usada para restaurar em reset de formulário.
|
|
239
|
+
* Mantém uma cópia imutável do valor original para `formResetCallback`.
|
|
240
|
+
*
|
|
241
|
+
* @internal
|
|
242
|
+
*/
|
|
216
243
|
this.initialFormValue = null;
|
|
244
|
+
/**
|
|
245
|
+
* Contador monótono usado para invalidar execuções assíncronas de validação.
|
|
246
|
+
* Incrementado antes de cada execução; resultados com `runId` diferente são ignorados.
|
|
247
|
+
*
|
|
248
|
+
* @internal
|
|
249
|
+
*/
|
|
217
250
|
this.validationRunId = 0;
|
|
251
|
+
/**
|
|
252
|
+
* Indica se o componente já completou o ciclo `componentDidLoad`.
|
|
253
|
+
* Evita executar lógica de inicialização mais de uma vez.
|
|
254
|
+
*
|
|
255
|
+
* @internal
|
|
256
|
+
*/
|
|
218
257
|
this.isInitialized = false;
|
|
258
|
+
/**
|
|
259
|
+
* Flag para evitar loops de sincronização entre `value`, `valueAsDate` e `serializedValue`.
|
|
260
|
+
* Setada temporariamente durante operações programáticas de sincronização.
|
|
261
|
+
*
|
|
262
|
+
* @internal
|
|
263
|
+
*/
|
|
219
264
|
this.syncingCanonicalValues = false;
|
|
220
|
-
/**
|
|
265
|
+
/**
|
|
266
|
+
* Flag que sinaliza atualizações internas em `rangeValue`.
|
|
267
|
+
* Usada para distinguir atribuições programáticas de alterações externas.
|
|
268
|
+
*
|
|
269
|
+
* @internal
|
|
270
|
+
*/
|
|
271
|
+
this.syncingRangeValueInternally = false;
|
|
272
|
+
/**
|
|
273
|
+
* Mapeia cada modo para a função responsável por renderizar seu conteúdo.
|
|
274
|
+
* Facilita seleção de renderer sem condicionais espalhadas pelo código.
|
|
275
|
+
*
|
|
276
|
+
* @internal
|
|
277
|
+
*/
|
|
221
278
|
this.modeRendererMap = {
|
|
222
279
|
[DATETIME_PICKER_MODE.DATE]: () => this.renderDatePicker(),
|
|
223
|
-
[DATETIME_PICKER_MODE.TIME]: () => this.renderTimePicker(),
|
|
280
|
+
[DATETIME_PICKER_MODE.TIME]: () => this.selectionMode === 'range' ? this.renderRangeTimePickers() : this.renderTimePicker(),
|
|
224
281
|
[DATETIME_PICKER_MODE.DATETIME]: () => this.renderDateTimePicker(),
|
|
225
282
|
};
|
|
226
283
|
/**
|
|
227
|
-
*
|
|
284
|
+
* Indica se o listener global de clique fora do componente está anexado.
|
|
285
|
+
* Evita anexações/remoções redundantes do mesmo handler.
|
|
286
|
+
*
|
|
287
|
+
* @internal
|
|
288
|
+
*/
|
|
289
|
+
this.outsideClickListenerAttached = false;
|
|
290
|
+
/**
|
|
291
|
+
* Handler disparado por `br-datetime-input` para propagar mensagens de
|
|
292
|
+
* validação do input interno para o estado do componente.
|
|
293
|
+
*
|
|
294
|
+
* @param event CustomEvent<{ valid: boolean; message: string }> — detalhe com `valid` e `message`.
|
|
295
|
+
* @returns void
|
|
296
|
+
*/
|
|
297
|
+
this.handleInputValidationChange = (event) => {
|
|
298
|
+
event.stopPropagation();
|
|
299
|
+
const valid = event.detail.valid;
|
|
300
|
+
if (valid === null) {
|
|
301
|
+
// usuário está editando: escondemos a mensagem visual, mas mantemos
|
|
302
|
+
// o estado de validade indefinido até commit/blur/enter
|
|
303
|
+
this.inputValidationMessage = '';
|
|
304
|
+
this.inputValidationPending = true;
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
this.inputValidationMessage = valid ? '' : event.detail.message;
|
|
308
|
+
this.inputValidationPending = false;
|
|
309
|
+
}
|
|
310
|
+
this.syncFormValidity();
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* Handler principal que consolida eventos de `br-date-picker` / `br-time-picker`.
|
|
314
|
+
* Contém lógica de proteção contra valores desabilitados, navegação e emissão
|
|
315
|
+
* de eventos públicos apropriados.
|
|
228
316
|
*
|
|
229
|
-
* @param event
|
|
317
|
+
* @param event CustomEvent<DatetimePickerDateState> — detalhe com `referenceDate`, `value` e `range`.
|
|
230
318
|
*/
|
|
231
319
|
this.handleDateStateChange = (event) => {
|
|
232
|
-
// Evita que o evento interno dos subcomponentes vaze para fora do host.
|
|
233
320
|
event.stopPropagation();
|
|
234
321
|
if (this.isDisabled()) {
|
|
235
322
|
return;
|
|
236
323
|
}
|
|
324
|
+
const origin = event.detail.origin;
|
|
325
|
+
if (origin !== 'BR-DATETIME-INPUT') {
|
|
326
|
+
this.inputValidationMessage = '';
|
|
327
|
+
}
|
|
237
328
|
const { referenceDate, value, range } = event.detail;
|
|
329
|
+
if (this.isRangeNavigationState(value, range)) {
|
|
330
|
+
this.referenceDate = toDate(referenceDate);
|
|
331
|
+
this.updateFormInternals();
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
238
334
|
const selectedDate = this.resolveSelectedDateFromEvent(range, value);
|
|
239
335
|
if (selectedDate !== null && this.isDateDisabled(selectedDate)) {
|
|
240
336
|
return;
|
|
241
337
|
}
|
|
242
338
|
this.referenceDate = toDate(referenceDate);
|
|
243
339
|
const shouldEmitPublicEvent = this.resolvePublicEventEmissionForRange(range);
|
|
244
|
-
|
|
340
|
+
const nextValue = value === null ? null : toDate(value);
|
|
341
|
+
if (this.sameDate(this.value, nextValue)) {
|
|
342
|
+
this.handleUnchangedDateState(range, shouldEmitPublicEvent);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
this.setComponentValue(nextValue, shouldEmitPublicEvent && this.isInitialized);
|
|
346
|
+
this.emitPendingRangeChange(range, shouldEmitPublicEvent);
|
|
245
347
|
};
|
|
348
|
+
/**
|
|
349
|
+
* Atualiza somente o horário de um dos limites do intervalo.
|
|
350
|
+
*
|
|
351
|
+
* @param boundary 'start' | 'end' — qual limite será atualizado.
|
|
352
|
+
* @param event CustomEvent<DatetimePickerDateState> — detalhe com novo `value`.
|
|
353
|
+
*/
|
|
354
|
+
this.handleRangeTimeStateChange = (boundary, event) => {
|
|
355
|
+
event.stopPropagation();
|
|
356
|
+
if (this.isDisabled() || event.detail.value === null)
|
|
357
|
+
return;
|
|
358
|
+
const displayedStart = this.cloneDate(this.rangeStart ?? this.referenceDate);
|
|
359
|
+
const displayedEnd = this.cloneDate(this.rangeEnd ?? this.referenceDate);
|
|
360
|
+
if (this.rangeStart === null)
|
|
361
|
+
this.rangeStart = displayedStart;
|
|
362
|
+
if (this.rangeEnd === null)
|
|
363
|
+
this.rangeEnd = displayedEnd;
|
|
364
|
+
const selected = toDate(event.detail.value);
|
|
365
|
+
const current = boundary === 'start' ? this.rangeStart : this.rangeEnd;
|
|
366
|
+
const base = current ?? this.referenceDate;
|
|
367
|
+
const next = set(base, {
|
|
368
|
+
hours: selected.getHours(),
|
|
369
|
+
minutes: selected.getMinutes(),
|
|
370
|
+
seconds: 0,
|
|
371
|
+
milliseconds: 0,
|
|
372
|
+
});
|
|
373
|
+
if (boundary === 'start')
|
|
374
|
+
this.rangeStart = next;
|
|
375
|
+
else
|
|
376
|
+
this.rangeEnd = next;
|
|
377
|
+
const nextComponentValue = this.rangeEnd ?? this.rangeStart;
|
|
378
|
+
if (!this.sameDate(this.value, nextComponentValue)) {
|
|
379
|
+
this.value = this.cloneDate(nextComponentValue);
|
|
380
|
+
}
|
|
381
|
+
this.syncCanonicalValues();
|
|
382
|
+
if (this.isInitialized) {
|
|
383
|
+
this.emitDateStateChange();
|
|
384
|
+
void this.validate();
|
|
385
|
+
}
|
|
386
|
+
this.updateFormInternals();
|
|
387
|
+
};
|
|
388
|
+
this.handleRangeStartTimeStateChange = (event) => this.handleRangeTimeStateChange('start', event);
|
|
389
|
+
this.handleRangeEndTimeStateChange = (event) => this.handleRangeTimeStateChange('end', event);
|
|
246
390
|
/**
|
|
247
391
|
* Alterna visibilidade do picker quando o input solicita.
|
|
392
|
+
*
|
|
393
|
+
* @param event Event — evento de toggle vindo do input.
|
|
248
394
|
*/
|
|
249
395
|
this.handleTogglePicker = (event) => {
|
|
250
396
|
if (this.isDisabled()) {
|
|
@@ -254,11 +400,14 @@ export class DatetimePicker {
|
|
|
254
400
|
const willOpen = !this.isPickerOpen;
|
|
255
401
|
if (willOpen) {
|
|
256
402
|
this.referenceDate = this.value === null ? toDate(new Date()) : toDate(this.value);
|
|
403
|
+
this.initializeTimeRangeBoundaries();
|
|
257
404
|
}
|
|
258
405
|
this.isPickerOpen = willOpen;
|
|
259
406
|
};
|
|
260
407
|
/**
|
|
261
408
|
* Fecha o picker quando o clique acontece fora do host.
|
|
409
|
+
*
|
|
410
|
+
* @param event MouseEvent — clique ocorrido no documento.
|
|
262
411
|
*/
|
|
263
412
|
this.handleOutsideClick = (event) => {
|
|
264
413
|
const eventPath = event.composedPath();
|
|
@@ -267,7 +416,6 @@ export class DatetimePicker {
|
|
|
267
416
|
}
|
|
268
417
|
this.isPickerOpen = false;
|
|
269
418
|
};
|
|
270
|
-
this.outsideClickListenerAttached = false;
|
|
271
419
|
/**
|
|
272
420
|
* Fecha o picker ao pressionar Escape, devolvendo o foco ao input interno.
|
|
273
421
|
*
|
|
@@ -278,42 +426,17 @@ export class DatetimePicker {
|
|
|
278
426
|
return;
|
|
279
427
|
event.stopPropagation();
|
|
280
428
|
this.isPickerOpen = false;
|
|
281
|
-
|
|
429
|
+
this.getNativeInputElement()?.focus();
|
|
282
430
|
};
|
|
283
431
|
}
|
|
284
|
-
formDisabledCallback(disabled) {
|
|
285
|
-
this.formDisabled = disabled;
|
|
286
|
-
}
|
|
287
|
-
/** API nativa de reset de form-associated custom elements. */
|
|
288
|
-
formResetCallback() {
|
|
289
|
-
this.customValidationMessage = '';
|
|
290
|
-
this.validatorMessage = null;
|
|
291
|
-
this.validationRunId++;
|
|
292
|
-
this.restoreSelection(this.initialFormValue);
|
|
293
|
-
}
|
|
294
|
-
/** API nativa de restauração de estado (histórico/autofill) do formulário. */
|
|
295
|
-
formStateRestoreCallback(state) {
|
|
296
|
-
if (typeof state !== 'string') {
|
|
297
|
-
this.restoreSelection(null);
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
if (this.isRangeRestoreMode()) {
|
|
301
|
-
this.restoreRangeStateFromSerialized(state);
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
this.restoreSingleStateFromSerialized(state);
|
|
305
|
-
}
|
|
306
432
|
/**
|
|
307
433
|
* Revalida o modo sempre que a prop mudar.
|
|
308
434
|
*
|
|
309
|
-
* @param newValue - Valor recebido via atributo/prop.
|
|
435
|
+
* @param {string} newValue - Valor recebido via atributo/prop.
|
|
310
436
|
*/
|
|
311
437
|
handleModeChange(newValue) {
|
|
312
438
|
this.ensureValidMode(newValue);
|
|
313
|
-
|
|
314
|
-
this.selectionMode = 'single';
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
439
|
+
this.initializeTimeRangeBoundaries();
|
|
317
440
|
this.updateFormInternals();
|
|
318
441
|
}
|
|
319
442
|
/** Revalida o estado do formulário quando required mudar. */
|
|
@@ -330,14 +453,11 @@ export class DatetimePicker {
|
|
|
330
453
|
/** Reage a mudanças no modo de seleção e limpa intervalo quando necessário. */
|
|
331
454
|
handleSelectionModeChange(newValue) {
|
|
332
455
|
this.ensureValidSelectionMode(newValue);
|
|
333
|
-
if (this.selectionMode === 'range' && this.mode !== DATETIME_PICKER_MODE.DATE) {
|
|
334
|
-
this.mode = DATETIME_PICKER_MODE.DATE;
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
456
|
if (this.selectionMode === 'single') {
|
|
338
457
|
this.clearRangeState();
|
|
339
458
|
return;
|
|
340
459
|
}
|
|
460
|
+
this.initializeTimeRangeBoundaries();
|
|
341
461
|
this.updateFormInternals();
|
|
342
462
|
}
|
|
343
463
|
/** Revalida o dia inicial da semana sempre que a prop mudar. */
|
|
@@ -347,13 +467,16 @@ export class DatetimePicker {
|
|
|
347
467
|
/**
|
|
348
468
|
* Aplica ou limpa a seleção da data atual conforme o novo valor da prop.
|
|
349
469
|
*
|
|
350
|
-
* @param newValue - Novo estado da prop.
|
|
470
|
+
* @param {DatetimePickerInitialMoment} newValue - Novo estado da prop.
|
|
351
471
|
*/
|
|
352
472
|
handleInitialMomentChange(newValue) {
|
|
353
473
|
this.applyInitialMoment(newValue, this.isInitialized);
|
|
354
474
|
this.initialFormValue = this.cloneDate(this.value);
|
|
355
475
|
}
|
|
356
476
|
/** Sincroniza alterações externas do valor com o estado visual e o formulário nativo. */
|
|
477
|
+
/**
|
|
478
|
+
* @param {Date | null} newValue - Novo valor recebido via prop.
|
|
479
|
+
*/
|
|
357
480
|
handleValueChange(newValue) {
|
|
358
481
|
const normalizedValue = newValue instanceof Date && !Number.isNaN(newValue.getTime()) ? toDate(newValue) : null;
|
|
359
482
|
if (newValue !== null && normalizedValue === null) {
|
|
@@ -398,45 +521,33 @@ export class DatetimePicker {
|
|
|
398
521
|
this.syncDisabledDates(newValue);
|
|
399
522
|
}
|
|
400
523
|
handleRangeValueChange(newValue) {
|
|
401
|
-
if (!newValue || this.selectionMode !== 'range')
|
|
524
|
+
if (this.syncingRangeValueInternally || !newValue || this.selectionMode !== 'range')
|
|
402
525
|
return;
|
|
403
|
-
if (!isValidDatetimePickerDateRange(newValue)) {
|
|
404
|
-
reportInvalidPropValue(this.el, 'rangeValue', newValue, 'Informe um objeto com `start` e `end` como Date válido ou null.', 'Mantendo o último intervalo efetivo.');
|
|
405
|
-
return;
|
|
406
|
-
}
|
|
407
526
|
this.rangeStart = this.cloneDate(newValue.start);
|
|
408
527
|
this.rangeEnd = this.cloneDate(newValue.end);
|
|
409
|
-
const nextValue =
|
|
410
|
-
this.
|
|
411
|
-
this.setComponentValue(nextValue);
|
|
528
|
+
const nextValue = this.rangeEnd ?? this.rangeStart;
|
|
529
|
+
this.setComponentValue(nextValue, false);
|
|
412
530
|
}
|
|
413
|
-
/** Registra o listener global somente enquanto o picker está aberto. */
|
|
414
531
|
connectedCallback() {
|
|
415
532
|
if (this.isPickerOpen)
|
|
416
533
|
this.attachOutsideClickListener();
|
|
417
534
|
}
|
|
418
|
-
/** Remove o listener global para evitar vazamento de eventos ao desmontar. */
|
|
419
|
-
disconnectedCallback() {
|
|
420
|
-
this.detachOutsideClickListener();
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* Normaliza o modo antes da primeira renderização e aplica a data atual quando solicitado.
|
|
424
|
-
*/
|
|
425
535
|
componentWillLoad() {
|
|
426
|
-
|
|
427
|
-
const
|
|
536
|
+
const initialSerializedValue = this.serializedValue;
|
|
537
|
+
const initialValueAsDate = this.valueAsDate;
|
|
428
538
|
this.referenceDate = resolveSsrLocalDate(this.el, this.referenceDate);
|
|
429
539
|
this.initializeMode();
|
|
430
540
|
this.initializeSelectionMode();
|
|
431
541
|
this.initializeWeekStartsOn();
|
|
432
542
|
this.initializeDisabledDates();
|
|
433
543
|
this.initializeDefaultValue();
|
|
434
|
-
if (
|
|
435
|
-
this.restoreSerializedValue(
|
|
544
|
+
if (initialSerializedValue !== undefined) {
|
|
545
|
+
this.restoreSerializedValue(initialSerializedValue);
|
|
436
546
|
}
|
|
437
|
-
else if (
|
|
438
|
-
this.handleValueAsDateChange(
|
|
547
|
+
else if (initialValueAsDate !== undefined) {
|
|
548
|
+
this.handleValueAsDateChange(initialValueAsDate);
|
|
439
549
|
}
|
|
550
|
+
this.initializeTimeRangeBoundaries(true);
|
|
440
551
|
this.initialFormValue = this.cloneDate(this.value);
|
|
441
552
|
this.syncCanonicalValues();
|
|
442
553
|
this.updateFormInternals();
|
|
@@ -445,18 +556,58 @@ export class DatetimePicker {
|
|
|
445
556
|
this.isInitialized = true;
|
|
446
557
|
this.hasFeedbackSlot = this.el.querySelector('[slot="feedback"]') !== null;
|
|
447
558
|
}
|
|
559
|
+
disconnectedCallback() {
|
|
560
|
+
this.detachOutsideClickListener();
|
|
561
|
+
}
|
|
562
|
+
formDisabledCallback(disabled) {
|
|
563
|
+
this.formDisabled = disabled;
|
|
564
|
+
}
|
|
565
|
+
/** Restaura o estado do componente quando o formulário é restaurado. */
|
|
566
|
+
formResetCallback() {
|
|
567
|
+
this.customValidationMessage = '';
|
|
568
|
+
this.validatorMessage = null;
|
|
569
|
+
this.inputValidationMessage = '';
|
|
570
|
+
this.validationRunId++;
|
|
571
|
+
this.restoreSelection(this.initialFormValue);
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Restaura o estado do formulário (autofill / histórico).
|
|
575
|
+
*
|
|
576
|
+
* @param {string | File | FormData | null} state Estado serializado fornecido pelo navegador.
|
|
577
|
+
*/
|
|
578
|
+
formStateRestoreCallback(state) {
|
|
579
|
+
if (typeof state !== 'string') {
|
|
580
|
+
this.restoreSelection(null);
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
if (this.isRangeRestoreMode()) {
|
|
584
|
+
this.restoreRangeStateFromSerialized(state);
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
this.restoreSingleStateFromSerialized(state);
|
|
588
|
+
}
|
|
448
589
|
/**
|
|
449
|
-
* Define programaticamente as datas desabilitadas
|
|
590
|
+
* Define programaticamente as datas desabilitadas.
|
|
450
591
|
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
592
|
+
* Use quando scripts externos precisam fornecer uma lista tipada de
|
|
593
|
+
* datas a bloquear no calendário. Substitui a prop `disabledDates` para
|
|
594
|
+
* atualizações imperativas.
|
|
453
595
|
*
|
|
454
|
-
* @param dates
|
|
596
|
+
* @param dates Lista de datas (`Date` | `string`) a bloquear, ou `null` para limpar.
|
|
597
|
+
* @returns Promise<void> — resolve quando a atualização interna for aplicada.
|
|
455
598
|
*/
|
|
456
599
|
async setDisabledDates(dates) {
|
|
457
600
|
this.syncDisabledDates(dates);
|
|
458
601
|
}
|
|
459
|
-
/**
|
|
602
|
+
/**
|
|
603
|
+
* Define o valor do componente de forma imperativa.
|
|
604
|
+
*
|
|
605
|
+
* Aceita `Date`, string compatível com o `mode`, ou `null` para limpar a seleção.
|
|
606
|
+
* Validação de datas desabilitadas é aplicada antes da atribuição.
|
|
607
|
+
*
|
|
608
|
+
* @param value Date | string | null — valor a aplicar; `null` limpa a seleção.
|
|
609
|
+
* @returns Promise<void> — resolve quando o componente aplicar e sincronizar o valor.
|
|
610
|
+
*/
|
|
460
611
|
async setValue(value) {
|
|
461
612
|
if (this.isDisabled()) {
|
|
462
613
|
return;
|
|
@@ -473,18 +624,32 @@ export class DatetimePicker {
|
|
|
473
624
|
this.referenceDate = nextValue === null ? toDate(new Date()) : toDate(nextValue);
|
|
474
625
|
this.setComponentValue(nextValue);
|
|
475
626
|
}
|
|
476
|
-
/**
|
|
627
|
+
/**
|
|
628
|
+
* Retorna uma cópia do valor selecionado atualmente.
|
|
629
|
+
*
|
|
630
|
+
* @returns Promise<Date | null> — cópia imutável do `value` atual, ou `null`.
|
|
631
|
+
*/
|
|
477
632
|
async getValue() {
|
|
478
633
|
return this.cloneDate(this.value);
|
|
479
634
|
}
|
|
480
|
-
/**
|
|
635
|
+
/**
|
|
636
|
+
* Limpa valor e intervalo selecionados.
|
|
637
|
+
*
|
|
638
|
+
* Remove seleção atual e restaura a referência de navegação para a data atual.
|
|
639
|
+
*
|
|
640
|
+
* @returns Promise<void> — resolve após a limpeza e sincronização internas.
|
|
641
|
+
*/
|
|
481
642
|
async clear() {
|
|
482
643
|
this.rangeStart = null;
|
|
483
644
|
this.rangeEnd = null;
|
|
484
645
|
this.referenceDate = toDate(new Date());
|
|
485
646
|
this.setComponentValue(null);
|
|
486
647
|
}
|
|
487
|
-
/**
|
|
648
|
+
/**
|
|
649
|
+
* Abre o picker quando o componente estiver habilitado.
|
|
650
|
+
*
|
|
651
|
+
* @returns Promise<void> — resolve quando o estado visual for atualizado.
|
|
652
|
+
*/
|
|
488
653
|
async open() {
|
|
489
654
|
if (this.isDisabled()) {
|
|
490
655
|
return;
|
|
@@ -492,11 +657,19 @@ export class DatetimePicker {
|
|
|
492
657
|
this.referenceDate = this.value === null ? toDate(new Date()) : toDate(this.value);
|
|
493
658
|
this.isPickerOpen = true;
|
|
494
659
|
}
|
|
495
|
-
/**
|
|
660
|
+
/**
|
|
661
|
+
* Fecha o picker.
|
|
662
|
+
*
|
|
663
|
+
* @returns Promise<void> — resolve após atualização do estado de visibilidade.
|
|
664
|
+
*/
|
|
496
665
|
async close() {
|
|
497
666
|
this.isPickerOpen = false;
|
|
498
667
|
}
|
|
499
|
-
/**
|
|
668
|
+
/**
|
|
669
|
+
* Alterna o estado de abertura do picker.
|
|
670
|
+
*
|
|
671
|
+
* @returns Promise<void> — resolve quando a transição de estado terminar.
|
|
672
|
+
*/
|
|
500
673
|
async toggle() {
|
|
501
674
|
if (this.isPickerOpen) {
|
|
502
675
|
await this.close();
|
|
@@ -504,20 +677,32 @@ export class DatetimePicker {
|
|
|
504
677
|
}
|
|
505
678
|
await this.open();
|
|
506
679
|
}
|
|
507
|
-
/**
|
|
680
|
+
/**
|
|
681
|
+
* Move o foco para o input nativo interno.
|
|
682
|
+
*
|
|
683
|
+
* @returns Promise<void> — resolve imediatamente após tentar focar o elemento.
|
|
684
|
+
*/
|
|
508
685
|
async focusInput() {
|
|
509
|
-
|
|
510
|
-
await input?.focusInput?.();
|
|
686
|
+
this.getNativeInputElement()?.focus();
|
|
511
687
|
}
|
|
512
|
-
/**
|
|
688
|
+
/**
|
|
689
|
+
* Define um intervalo no modo atual e ativa `selectionMode="range"`.
|
|
690
|
+
*
|
|
691
|
+
* Valida datas contra bloqueios e sincroniza estado visual e de formulário.
|
|
692
|
+
* Em `datetime`, mantém os limites informados e sinaliza intervalo inválido
|
|
693
|
+
* quando o término precede o início, sem ajustar datas automaticamente.
|
|
694
|
+
*
|
|
695
|
+
* @param start Date | string | null — data inicial do intervalo.
|
|
696
|
+
* @param end Date | string | null — data final do intervalo.
|
|
697
|
+
* @returns Promise<void> — resolve quando o intervalo for aplicado e sincronizado.
|
|
698
|
+
*/
|
|
513
699
|
async setRange(start, end) {
|
|
514
700
|
if (this.isDisabled()) {
|
|
515
701
|
return;
|
|
516
702
|
}
|
|
517
703
|
this.selectionMode = 'range';
|
|
518
|
-
|
|
519
|
-
const
|
|
520
|
-
const normalizedEnd = this.parseMethodValue(end, DATETIME_PICKER_MODE.DATE);
|
|
704
|
+
const normalizedStart = this.parseMethodValue(start, this.mode);
|
|
705
|
+
const normalizedEnd = this.parseMethodValue(end, this.mode);
|
|
521
706
|
if ((normalizedStart !== null && this.isDateDisabled(normalizedStart)) ||
|
|
522
707
|
(normalizedEnd !== null && this.isDateDisabled(normalizedEnd))) {
|
|
523
708
|
this.clearRangeState();
|
|
@@ -525,17 +710,18 @@ export class DatetimePicker {
|
|
|
525
710
|
}
|
|
526
711
|
this.rangeStart = this.cloneDate(normalizedStart);
|
|
527
712
|
this.rangeEnd = this.cloneDate(normalizedEnd);
|
|
528
|
-
const nextValue =
|
|
713
|
+
const nextValue = this.rangeEnd ?? this.rangeStart;
|
|
529
714
|
this.referenceDate = nextValue === null ? toDate(new Date()) : toDate(nextValue);
|
|
530
715
|
this.setComponentValue(nextValue);
|
|
531
716
|
}
|
|
532
717
|
/**
|
|
533
718
|
* Retorna o intervalo de datas selecionado quando em modo `selectionMode="range"`.
|
|
534
719
|
*
|
|
535
|
-
* @returns
|
|
720
|
+
* @returns Promise<{ start: Date | null; end: Date | null } | null> — objeto com `start`/`end` ou `null` quando
|
|
721
|
+
* não estiver em modo `range`.
|
|
536
722
|
*/
|
|
537
723
|
async getRange() {
|
|
538
|
-
if (this.selectionMode !== 'range'
|
|
724
|
+
if (this.selectionMode !== 'range') {
|
|
539
725
|
return null;
|
|
540
726
|
}
|
|
541
727
|
return {
|
|
@@ -546,29 +732,52 @@ export class DatetimePicker {
|
|
|
546
732
|
/**
|
|
547
733
|
* Consulta se o picker está atualmente aberto.
|
|
548
734
|
*
|
|
549
|
-
* @returns `true` se o picker está visível, `false` caso contrário.
|
|
735
|
+
* @returns Promise<boolean> — `true` se o picker está visível, `false` caso contrário.
|
|
550
736
|
*/
|
|
551
737
|
async isOpen() {
|
|
552
738
|
return this.isPickerOpen;
|
|
553
739
|
}
|
|
554
|
-
/**
|
|
740
|
+
/**
|
|
741
|
+
* Restaura o estado inicial atualmente registrado para reset.
|
|
742
|
+
*
|
|
743
|
+
* @returns Promise<void> — resolve quando a seleção inicial for restaurada.
|
|
744
|
+
*/
|
|
555
745
|
async resetToInitial() {
|
|
556
746
|
this.restoreSelection(this.initialFormValue);
|
|
557
747
|
}
|
|
558
|
-
/**
|
|
748
|
+
/**
|
|
749
|
+
* Permite que consumidores acionem validação nativa do formulário via host.
|
|
750
|
+
*
|
|
751
|
+
* @returns Promise<boolean> — resultado da Constraint Validation API para o host.
|
|
752
|
+
*/
|
|
559
753
|
async checkValidity() {
|
|
560
754
|
return this.elementInternals.checkValidity();
|
|
561
755
|
}
|
|
562
|
-
/**
|
|
756
|
+
/**
|
|
757
|
+
* Permite exibir mensagens nativas de validação no host.
|
|
758
|
+
*
|
|
759
|
+
* @returns Promise<boolean> — `true` se a mensagem foi exibida e o formulário é válido.
|
|
760
|
+
*/
|
|
563
761
|
async reportValidity() {
|
|
564
762
|
return this.elementInternals.reportValidity();
|
|
565
763
|
}
|
|
566
|
-
/**
|
|
764
|
+
/**
|
|
765
|
+
* Define ou limpa uma mensagem de validade customizada.
|
|
766
|
+
*
|
|
767
|
+
* @param message string — mensagem de validação; string vazia remove a mensagem.
|
|
768
|
+
* @returns Promise<void> — resolve após sincronizar a validade no host.
|
|
769
|
+
*/
|
|
567
770
|
async setCustomValidity(message) {
|
|
568
771
|
this.customValidationMessage = message;
|
|
569
772
|
this.syncFormValidity();
|
|
570
773
|
}
|
|
571
|
-
/**
|
|
774
|
+
/**
|
|
775
|
+
* Executa o validator customizado (se houver) e valida o controle.
|
|
776
|
+
*
|
|
777
|
+
* Emite eventos de início/conclusão da validação e atualiza mensagens internas.
|
|
778
|
+
*
|
|
779
|
+
* @returns Promise<boolean> — `true` se a seleção for considerada válida.
|
|
780
|
+
*/
|
|
572
781
|
async validate() {
|
|
573
782
|
const validator = resolveFormValidator(this.validator);
|
|
574
783
|
if (!validator || this.isDisabled())
|
|
@@ -577,9 +786,16 @@ export class DatetimePicker {
|
|
|
577
786
|
this.isValidating = true;
|
|
578
787
|
this.validatorMessage = null;
|
|
579
788
|
this.syncFormValidity();
|
|
580
|
-
this.brDatetimePickerValidationChange.emit({
|
|
789
|
+
this.brDatetimePickerValidationChange.emit({
|
|
790
|
+
validating: true,
|
|
791
|
+
valid: null,
|
|
792
|
+
message: null,
|
|
793
|
+
});
|
|
581
794
|
const value = this.selectionMode === 'range'
|
|
582
|
-
? {
|
|
795
|
+
? {
|
|
796
|
+
start: this.cloneDate(this.rangeStart),
|
|
797
|
+
end: this.cloneDate(this.rangeEnd),
|
|
798
|
+
}
|
|
583
799
|
: this.cloneDate(this.value);
|
|
584
800
|
const message = await runFormValidator(validator, value);
|
|
585
801
|
if (runId !== this.validationRunId)
|
|
@@ -588,10 +804,19 @@ export class DatetimePicker {
|
|
|
588
804
|
this.isValidating = false;
|
|
589
805
|
this.syncFormValidity();
|
|
590
806
|
const valid = message === null && (await this.checkValidity());
|
|
591
|
-
this.brDatetimePickerValidationChange.emit({
|
|
807
|
+
this.brDatetimePickerValidationChange.emit({
|
|
808
|
+
validating: false,
|
|
809
|
+
valid,
|
|
810
|
+
message,
|
|
811
|
+
});
|
|
592
812
|
return valid;
|
|
593
813
|
}
|
|
594
|
-
/**
|
|
814
|
+
/**
|
|
815
|
+
* Retorna um snapshot serializável da Constraint Validation API.
|
|
816
|
+
*
|
|
817
|
+
* @returns Promise<FormValidationState> — estado atual de validação do host,
|
|
818
|
+
* pronto para conversão e restauração via `formStateRestoreCallback`.
|
|
819
|
+
*/
|
|
595
820
|
async getValidationState() {
|
|
596
821
|
return getFormValidationState(this.elementInternals);
|
|
597
822
|
}
|
|
@@ -603,36 +828,52 @@ export class DatetimePicker {
|
|
|
603
828
|
ensureValidSelectionMode(value) {
|
|
604
829
|
this.selectionMode = normalizeDatetimePickerSelectionMode(value);
|
|
605
830
|
}
|
|
606
|
-
/**
|
|
607
|
-
* Normaliza o modo de seleção logo na inicialização.
|
|
608
|
-
*/
|
|
609
831
|
initializeSelectionMode() {
|
|
610
832
|
this.handleSelectionModeChange(this.selectionMode);
|
|
611
833
|
}
|
|
612
|
-
/** Normaliza o dia inicial da semana logo na inicialização. */
|
|
613
834
|
initializeWeekStartsOn() {
|
|
614
835
|
this.handleWeekStartsOnChange(this.weekStartsOn);
|
|
615
836
|
}
|
|
616
|
-
/**
|
|
837
|
+
/**
|
|
838
|
+
* Valida o dia inicial da semana e corrige para padrão quando necessário.
|
|
839
|
+
*
|
|
840
|
+
* @param value unknown — valor recebido via prop/atributo a ser normalizado.
|
|
841
|
+
*/
|
|
617
842
|
ensureValidWeekStartsOn(value) {
|
|
618
843
|
this.weekStartsOn = normalizeDatetimePickerWeekStartsOn(value);
|
|
619
844
|
}
|
|
620
|
-
/**
|
|
621
|
-
* Limpa o estado do intervalo de datas ao mudar para modo single.
|
|
622
|
-
*/
|
|
623
845
|
clearRangeState() {
|
|
624
846
|
this.rangeStart = null;
|
|
625
847
|
this.rangeEnd = null;
|
|
626
848
|
this.updateFormInternals();
|
|
627
849
|
}
|
|
628
|
-
/**
|
|
850
|
+
/**
|
|
851
|
+
* Materializa os horários exibidos pelos dois timers como limites reais.
|
|
852
|
+
* Assim o range de horário já nasce completo, o input pode representá-lo na
|
|
853
|
+
* primeira renderização e nenhum timer depende da referência do outro.
|
|
854
|
+
*/
|
|
855
|
+
initializeTimeRangeBoundaries(duringInitialization = false) {
|
|
856
|
+
if ((!this.isInitialized && !duringInitialization) ||
|
|
857
|
+
this.selectionMode !== 'range' ||
|
|
858
|
+
this.mode !== DATETIME_PICKER_MODE.TIME) {
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
const fallback = this.cloneDate(this.value ?? this.referenceDate);
|
|
862
|
+
if (this.rangeStart === null)
|
|
863
|
+
this.rangeStart = this.cloneDate(fallback);
|
|
864
|
+
if (this.rangeEnd === null)
|
|
865
|
+
this.rangeEnd = this.cloneDate(fallback);
|
|
866
|
+
this.value = this.cloneDate(this.rangeEnd);
|
|
867
|
+
}
|
|
629
868
|
isRangeDateSelectionMode() {
|
|
630
|
-
return this.selectionMode === 'range'
|
|
869
|
+
return this.selectionMode === 'range';
|
|
631
870
|
}
|
|
632
871
|
/**
|
|
633
|
-
*
|
|
872
|
+
* Decide se um evento público deve ser emitido após atualização vinda de
|
|
873
|
+
* subcomponentes (calendário/relógio).
|
|
634
874
|
*
|
|
635
|
-
*
|
|
875
|
+
* @param range DatetimePickerDateRange | undefined — estado parcial do range vindo do subcomponente.
|
|
876
|
+
* @returns boolean — `true` quando o evento deve ser emitido externamente.
|
|
636
877
|
*/
|
|
637
878
|
resolvePublicEventEmissionForRange(range) {
|
|
638
879
|
if (!this.isRangeDateSelectionMode()) {
|
|
@@ -645,13 +886,63 @@ export class DatetimePicker {
|
|
|
645
886
|
this.setRangeState(range);
|
|
646
887
|
return isFinalRangeClick;
|
|
647
888
|
}
|
|
648
|
-
/**
|
|
889
|
+
/**
|
|
890
|
+
* Resolve a data efetivamente selecionada no evento para validações e bloqueios.
|
|
891
|
+
*
|
|
892
|
+
* @param range DatetimePickerDateRange | undefined — intervalo parcial (quando aplicável).
|
|
893
|
+
* @param value Date | null — valor principal vindo do subcomponente.
|
|
894
|
+
* @returns Date | null — data final a ser considerada para validação.
|
|
895
|
+
*/
|
|
649
896
|
resolveSelectedDateFromEvent(range, value) {
|
|
650
897
|
if (!this.isRangeDateSelectionMode() || range === undefined) {
|
|
651
898
|
return value;
|
|
652
899
|
}
|
|
653
900
|
return range.end ?? range.start ?? value;
|
|
654
901
|
}
|
|
902
|
+
/**
|
|
903
|
+
* Identifica navegação visual que preserva integralmente o range selecionado.
|
|
904
|
+
*
|
|
905
|
+
* @param value Date | null — valor principal do evento.
|
|
906
|
+
* @param range DatetimePickerDateRange | undefined — range parcial do evento.
|
|
907
|
+
* @returns boolean — `true` quando a navegação não altera a seleção atual.
|
|
908
|
+
*/
|
|
909
|
+
isRangeNavigationState(value, range) {
|
|
910
|
+
return (range !== undefined &&
|
|
911
|
+
this.sameDate(range.start, this.rangeStart) &&
|
|
912
|
+
this.sameDate(range.end, this.rangeEnd) &&
|
|
913
|
+
this.sameDate(value, this.value));
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Consolida um evento cujo valor principal permaneceu inalterado.
|
|
917
|
+
*
|
|
918
|
+
* @param range DatetimePickerDateRange | undefined — estado parcial do range.
|
|
919
|
+
* @param shouldEmitPublicEvent boolean — indica se o evento público deve ser emitido.
|
|
920
|
+
*/
|
|
921
|
+
handleUnchangedDateState(range, shouldEmitPublicEvent) {
|
|
922
|
+
this.syncCanonicalValues();
|
|
923
|
+
const shouldNotifyRange = this.isInitialized && this.isRangeDateSelectionMode() && range !== undefined;
|
|
924
|
+
if (shouldNotifyRange && shouldEmitPublicEvent) {
|
|
925
|
+
this.emitDateStateChange();
|
|
926
|
+
void this.validate();
|
|
927
|
+
}
|
|
928
|
+
else if (shouldNotifyRange) {
|
|
929
|
+
this.emitCanonicalChange(range);
|
|
930
|
+
}
|
|
931
|
+
this.updateFormInternals();
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* Emite a seleção parcial de range quando os eventos públicos foram adiados
|
|
935
|
+
* para evitar duplicidade com listeners legados.
|
|
936
|
+
*
|
|
937
|
+
* @param range DatetimePickerDateRange | undefined — snapshot parcial do range.
|
|
938
|
+
* @param shouldEmitPublicEvent boolean — se deve ser emitido publicamente.
|
|
939
|
+
*/
|
|
940
|
+
emitPendingRangeChange(range, shouldEmitPublicEvent) {
|
|
941
|
+
if (shouldEmitPublicEvent || !this.isInitialized || !this.isRangeDateSelectionMode() || range === undefined) {
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
this.emitCanonicalChange(range);
|
|
945
|
+
}
|
|
655
946
|
attachOutsideClickListener() {
|
|
656
947
|
if (this.outsideClickListenerAttached)
|
|
657
948
|
return;
|
|
@@ -664,15 +955,9 @@ export class DatetimePicker {
|
|
|
664
955
|
document.removeEventListener('click', this.handleOutsideClick);
|
|
665
956
|
this.outsideClickListenerAttached = false;
|
|
666
957
|
}
|
|
667
|
-
/**
|
|
668
|
-
* Garante que o componente inicie com um modo suportado.
|
|
669
|
-
*/
|
|
670
958
|
initializeMode() {
|
|
671
959
|
this.ensureValidMode(this.mode);
|
|
672
960
|
}
|
|
673
|
-
/**
|
|
674
|
-
* Normaliza a coleção de datas desabilitadas na inicialização.
|
|
675
|
-
*/
|
|
676
961
|
initializeDisabledDates() {
|
|
677
962
|
this.syncDisabledDates(this.disabledDates);
|
|
678
963
|
}
|
|
@@ -693,9 +978,6 @@ export class DatetimePicker {
|
|
|
693
978
|
this.setComponentValue(null);
|
|
694
979
|
}
|
|
695
980
|
}
|
|
696
|
-
/**
|
|
697
|
-
* Aplica a seleção inicial configurada na prop.
|
|
698
|
-
*/
|
|
699
981
|
initializeDefaultValue() {
|
|
700
982
|
if (this.value instanceof Date && !Number.isNaN(this.value.getTime())) {
|
|
701
983
|
this.referenceDate = toDate(this.value);
|
|
@@ -736,13 +1018,16 @@ export class DatetimePicker {
|
|
|
736
1018
|
this.rangeEnd = null;
|
|
737
1019
|
this.setComponentValue(selectedDate, shouldEmitEvents);
|
|
738
1020
|
}
|
|
739
|
-
/** Indica se o estado serializado deve ser interpretado como intervalo. */
|
|
740
1021
|
isRangeRestoreMode() {
|
|
741
|
-
return this.selectionMode === 'range'
|
|
1022
|
+
return this.selectionMode === 'range';
|
|
742
1023
|
}
|
|
743
|
-
/**
|
|
1024
|
+
/**
|
|
1025
|
+
* Restaura estado de intervalo a partir do valor serializado do formulário.
|
|
1026
|
+
*
|
|
1027
|
+
* @param serializedState string — valor serializado vindo do formulário.
|
|
1028
|
+
*/
|
|
744
1029
|
restoreRangeStateFromSerialized(serializedState) {
|
|
745
|
-
const restoredRange = parseDatetimePickerSerializedRange(serializedState);
|
|
1030
|
+
const restoredRange = parseDatetimePickerSerializedRange(serializedState, this.mode, this.referenceDate);
|
|
746
1031
|
if (restoredRange === null) {
|
|
747
1032
|
this.restoreSelection(null);
|
|
748
1033
|
return;
|
|
@@ -752,7 +1037,11 @@ export class DatetimePicker {
|
|
|
752
1037
|
this.rangeEnd = end;
|
|
753
1038
|
this.restoreSelection(end);
|
|
754
1039
|
}
|
|
755
|
-
/**
|
|
1040
|
+
/**
|
|
1041
|
+
* Restaura estado de seleção única a partir do valor serializado do formulário.
|
|
1042
|
+
*
|
|
1043
|
+
* @param serializedState string — valor serializado vindo do formulário.
|
|
1044
|
+
*/
|
|
756
1045
|
restoreSingleStateFromSerialized(serializedState) {
|
|
757
1046
|
const restoredValue = parseDatetimePickerSerializedValue(serializedState, this.mode, this.referenceDate);
|
|
758
1047
|
if (restoredValue !== null && this.isDateDisabled(restoredValue)) {
|
|
@@ -761,7 +1050,13 @@ export class DatetimePicker {
|
|
|
761
1050
|
}
|
|
762
1051
|
this.restoreSelection(restoredValue);
|
|
763
1052
|
}
|
|
764
|
-
/**
|
|
1053
|
+
/**
|
|
1054
|
+
* Converte entradas aceitas por métodos públicos em `Date | null`.
|
|
1055
|
+
*
|
|
1056
|
+
* @param value Date | string | null — valor bruto recebido pelo método público.
|
|
1057
|
+
* @param mode DatetimePickerMode — modo atual para parsing de strings.
|
|
1058
|
+
* @returns Date | null — representação normalizada ou `null` se inválida.
|
|
1059
|
+
*/
|
|
765
1060
|
parseMethodValue(value, mode) {
|
|
766
1061
|
if (value === null) {
|
|
767
1062
|
return null;
|
|
@@ -771,7 +1066,11 @@ export class DatetimePicker {
|
|
|
771
1066
|
}
|
|
772
1067
|
return parseDatetimePickerSerializedValue(value, mode, this.referenceDate);
|
|
773
1068
|
}
|
|
774
|
-
/**
|
|
1069
|
+
/**
|
|
1070
|
+
* Aplica a ponte serializada usando os mesmos parsers já usados por restore de formulário.
|
|
1071
|
+
*
|
|
1072
|
+
* @param serializedValue string — valor serializado a ser restaurado.
|
|
1073
|
+
*/
|
|
775
1074
|
restoreSerializedValue(serializedValue) {
|
|
776
1075
|
if (this.isRangeRestoreMode()) {
|
|
777
1076
|
this.restoreRangeStateFromSerialized(serializedValue);
|
|
@@ -779,7 +1078,7 @@ export class DatetimePicker {
|
|
|
779
1078
|
}
|
|
780
1079
|
this.restoreSingleStateFromSerialized(serializedValue);
|
|
781
1080
|
}
|
|
782
|
-
/** Atualiza os nomes
|
|
1081
|
+
/** Atualiza os nomes padrão sem emitir eventos adicionais ou criar ciclos de watchers. */
|
|
783
1082
|
syncCanonicalValues() {
|
|
784
1083
|
const nextSerializedValue = this.getSerializedValue();
|
|
785
1084
|
const nextValueAsDate = this.cloneDate(this.value);
|
|
@@ -790,7 +1089,11 @@ export class DatetimePicker {
|
|
|
790
1089
|
this.valueAsDate = nextValueAsDate;
|
|
791
1090
|
this.syncingCanonicalValues = false;
|
|
792
1091
|
}
|
|
793
|
-
/**
|
|
1092
|
+
/**
|
|
1093
|
+
* Retorna o mesmo valor que será submetido pelo ElementInternals.
|
|
1094
|
+
*
|
|
1095
|
+
* @returns string — valor serializado pronto para `setFormValue`.
|
|
1096
|
+
*/
|
|
794
1097
|
getSerializedValue() {
|
|
795
1098
|
const zero = (date) => (date === null ? null : set(date, { seconds: 0, milliseconds: 0 }));
|
|
796
1099
|
return (serializeDatetimePickerFormValue(this.value === null ? null : zero(this.value), {
|
|
@@ -804,11 +1107,24 @@ export class DatetimePicker {
|
|
|
804
1107
|
sameDate(left, right) {
|
|
805
1108
|
return left === right || (left !== null && right !== null && left.getTime() === right.getTime());
|
|
806
1109
|
}
|
|
807
|
-
/**
|
|
1110
|
+
/**
|
|
1111
|
+
* Busca o input nativo interno para ações imperativas de foco.
|
|
1112
|
+
*
|
|
1113
|
+
* @returns HTMLElement | undefined — elemento `input` nativo interno, quando disponível.
|
|
1114
|
+
*/
|
|
808
1115
|
getNativeInputElement() {
|
|
809
|
-
return
|
|
1116
|
+
return this.el.shadowRoot
|
|
1117
|
+
?.querySelector('br-datetime-input')
|
|
1118
|
+
?.shadowRoot?.querySelector('br-input')
|
|
1119
|
+
?.shadowRoot?.querySelector('input');
|
|
810
1120
|
}
|
|
811
|
-
/**
|
|
1121
|
+
/**
|
|
1122
|
+
* Atualiza estado interno, FormData e validação com uma única chamada.
|
|
1123
|
+
*
|
|
1124
|
+
* @param nextValue Date | null — próximo valor a ser aplicado no componente.
|
|
1125
|
+
* @param shouldEmitPublicEvent boolean — controla emissão de eventos públicos.
|
|
1126
|
+
* @returns void
|
|
1127
|
+
*/
|
|
812
1128
|
setComponentValue(nextValue, shouldEmitPublicEvent = true) {
|
|
813
1129
|
this.value = this.cloneDate(nextValue);
|
|
814
1130
|
this.syncCanonicalValues();
|
|
@@ -820,13 +1136,13 @@ export class DatetimePicker {
|
|
|
820
1136
|
}
|
|
821
1137
|
/** Propaga o estado atual consolidado para consumidores externos do componente raiz. */
|
|
822
1138
|
emitDateStateChange() {
|
|
823
|
-
const range = this.selectionMode === 'range'
|
|
1139
|
+
const range = this.selectionMode === 'range'
|
|
824
1140
|
? {
|
|
825
1141
|
start: this.cloneDate(this.rangeStart),
|
|
826
1142
|
end: this.cloneDate(this.rangeEnd),
|
|
827
1143
|
}
|
|
828
1144
|
: undefined;
|
|
829
|
-
const rangeDates = range !== undefined && range.start !== null && range.end !== null
|
|
1145
|
+
const rangeDates = this.mode === DATETIME_PICKER_MODE.DATE && range !== undefined && range.start !== null && range.end !== null
|
|
830
1146
|
? this.buildRangeDatesState(range.start, range.end)
|
|
831
1147
|
: undefined;
|
|
832
1148
|
this.dateStateChange.emit({
|
|
@@ -835,13 +1151,118 @@ export class DatetimePicker {
|
|
|
835
1151
|
range,
|
|
836
1152
|
rangeDates,
|
|
837
1153
|
});
|
|
838
|
-
|
|
839
|
-
this.rangeValue = range;
|
|
1154
|
+
this.emitCanonicalChange(range);
|
|
840
1155
|
this.valueChange.emit(this.cloneDate(this.value));
|
|
841
1156
|
dispatchNativeFormEvent(this.el, 'input');
|
|
842
1157
|
dispatchNativeFormEvent(this.el, 'change');
|
|
843
1158
|
}
|
|
844
|
-
/**
|
|
1159
|
+
/** Emite o contrato público sem expor detalhes incidentais do estado interno. */
|
|
1160
|
+
emitCanonicalChange(rangeSnapshot) {
|
|
1161
|
+
const serializedValue = this.getSerializedValue();
|
|
1162
|
+
if (this.selectionMode === 'range') {
|
|
1163
|
+
const range = rangeSnapshot ?? {
|
|
1164
|
+
start: this.rangeStart,
|
|
1165
|
+
end: this.rangeEnd,
|
|
1166
|
+
};
|
|
1167
|
+
const rangeValue = {
|
|
1168
|
+
start: this.cloneDate(range.start),
|
|
1169
|
+
end: this.cloneDate(range.end),
|
|
1170
|
+
};
|
|
1171
|
+
this.syncingRangeValueInternally = true;
|
|
1172
|
+
this.rangeValue = rangeValue;
|
|
1173
|
+
this.syncingRangeValueInternally = false;
|
|
1174
|
+
const value = {
|
|
1175
|
+
start: this.serializeRangeBoundary(rangeValue.start),
|
|
1176
|
+
end: this.serializeRangeBoundary(rangeValue.end),
|
|
1177
|
+
};
|
|
1178
|
+
const detail = {
|
|
1179
|
+
selectionMode: 'range',
|
|
1180
|
+
value,
|
|
1181
|
+
serializedValue,
|
|
1182
|
+
complete: value.start !== null && value.end !== null,
|
|
1183
|
+
};
|
|
1184
|
+
if (this.mode === DATETIME_PICKER_MODE.DATE) {
|
|
1185
|
+
this.brDatetimePickerChange.emit({ mode: 'date', ...detail });
|
|
1186
|
+
}
|
|
1187
|
+
else if (this.mode === DATETIME_PICKER_MODE.TIME) {
|
|
1188
|
+
this.brDatetimePickerChange.emit({ mode: 'time', ...detail });
|
|
1189
|
+
}
|
|
1190
|
+
else {
|
|
1191
|
+
this.brDatetimePickerChange.emit({ mode: 'datetime', ...detail });
|
|
1192
|
+
}
|
|
1193
|
+
return;
|
|
1194
|
+
}
|
|
1195
|
+
if (this.mode === DATETIME_PICKER_MODE.TIME) {
|
|
1196
|
+
this.brDatetimePickerChange.emit({
|
|
1197
|
+
mode: 'time',
|
|
1198
|
+
selectionMode: 'single',
|
|
1199
|
+
value: this.value === null
|
|
1200
|
+
? null
|
|
1201
|
+
: {
|
|
1202
|
+
hours: this.value.getHours(),
|
|
1203
|
+
minutes: this.value.getMinutes(),
|
|
1204
|
+
},
|
|
1205
|
+
serializedValue,
|
|
1206
|
+
});
|
|
1207
|
+
return;
|
|
1208
|
+
}
|
|
1209
|
+
if (this.mode === DATETIME_PICKER_MODE.DATE) {
|
|
1210
|
+
this.brDatetimePickerChange.emit({
|
|
1211
|
+
mode: 'date',
|
|
1212
|
+
selectionMode: 'single',
|
|
1213
|
+
value: this.cloneDate(this.value),
|
|
1214
|
+
serializedValue,
|
|
1215
|
+
});
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
this.brDatetimePickerChange.emit({
|
|
1219
|
+
mode: 'datetime',
|
|
1220
|
+
selectionMode: 'single',
|
|
1221
|
+
value: this.cloneDate(this.value),
|
|
1222
|
+
serializedValue,
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
/**
|
|
1226
|
+
* Serializa uma data civil sem conversão para UTC ou mudança de dia.
|
|
1227
|
+
*
|
|
1228
|
+
* @param value Date — data a serializar (somente componente civil).
|
|
1229
|
+
* @returns string — formato `YYYY-MM-DD`.
|
|
1230
|
+
*/
|
|
1231
|
+
serializeDateOnly(value) {
|
|
1232
|
+
const year = String(value.getFullYear()).padStart(4, '0');
|
|
1233
|
+
const month = String(value.getMonth() + 1).padStart(2, '0');
|
|
1234
|
+
const day = String(value.getDate()).padStart(2, '0');
|
|
1235
|
+
return `${year}-${month}-${day}`;
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* Serializa um limite do intervalo conforme o modo sem expor objetos Date no payload.
|
|
1239
|
+
*
|
|
1240
|
+
* @param value Date | null — limite a serializar.
|
|
1241
|
+
* @returns string | null — representação serializada do limite ou `null`.
|
|
1242
|
+
*/
|
|
1243
|
+
serializeRangeBoundary(value) {
|
|
1244
|
+
if (value === null)
|
|
1245
|
+
return null;
|
|
1246
|
+
if (this.mode === DATETIME_PICKER_MODE.DATE)
|
|
1247
|
+
return this.serializeDateOnly(value);
|
|
1248
|
+
if (this.mode === DATETIME_PICKER_MODE.TIME) {
|
|
1249
|
+
return `${String(value.getHours()).padStart(2, '0')}:${String(value.getMinutes()).padStart(2, '0')}`;
|
|
1250
|
+
}
|
|
1251
|
+
return serializeDatetimePickerFormValue(value, {
|
|
1252
|
+
mode: DATETIME_PICKER_MODE.DATETIME,
|
|
1253
|
+
selectionMode: 'single',
|
|
1254
|
+
rangeStart: null,
|
|
1255
|
+
rangeEnd: null,
|
|
1256
|
+
referenceDate: value,
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* Expande o intervalo completo e marca quais dias estão desabilitados.
|
|
1261
|
+
*
|
|
1262
|
+
* @param start Date — início do intervalo.
|
|
1263
|
+
* @param end Date — fim do intervalo.
|
|
1264
|
+
* @returns Array<{date: Date, disabled: boolean}> — lista diária com flags.
|
|
1265
|
+
*/
|
|
845
1266
|
buildRangeDatesState(start, end) {
|
|
846
1267
|
const intervalStart = start.getTime() <= end.getTime() ? start : end;
|
|
847
1268
|
const intervalEnd = start.getTime() <= end.getTime() ? end : start;
|
|
@@ -853,8 +1274,13 @@ export class DatetimePicker {
|
|
|
853
1274
|
disabled: this.isDateDisabled(date),
|
|
854
1275
|
}));
|
|
855
1276
|
}
|
|
856
|
-
/**
|
|
1277
|
+
/**
|
|
1278
|
+
* Restaura seleção e data de referência a partir de uma data já validada.
|
|
1279
|
+
*
|
|
1280
|
+
* @param nextValue Date | null — valor validado a ser restaurado como seleção.
|
|
1281
|
+
*/
|
|
857
1282
|
restoreSelection(nextValue) {
|
|
1283
|
+
this.inputValidationMessage = '';
|
|
858
1284
|
this.value = this.cloneDate(nextValue);
|
|
859
1285
|
if (this.selectionMode === 'single') {
|
|
860
1286
|
this.rangeStart = null;
|
|
@@ -864,12 +1290,15 @@ export class DatetimePicker {
|
|
|
864
1290
|
this.syncCanonicalValues();
|
|
865
1291
|
this.updateFormInternals();
|
|
866
1292
|
}
|
|
867
|
-
/**
|
|
1293
|
+
/**
|
|
1294
|
+
* Atualiza o estado local de intervalo a partir do evento do calendário.
|
|
1295
|
+
*
|
|
1296
|
+
* @param nextRange DatetimePickerDateRange | undefined — novo snapshot do intervalo.
|
|
1297
|
+
*/
|
|
868
1298
|
setRangeState(nextRange) {
|
|
869
1299
|
this.rangeStart = this.cloneDate(nextRange?.start ?? null);
|
|
870
1300
|
this.rangeEnd = this.cloneDate(nextRange?.end ?? null);
|
|
871
1301
|
}
|
|
872
|
-
/** Mantém ElementInternals sincronizado com estado e regras do componente. */
|
|
873
1302
|
updateFormInternals() {
|
|
874
1303
|
this.syncFormValue();
|
|
875
1304
|
this.syncFormValidity();
|
|
@@ -889,9 +1318,20 @@ export class DatetimePicker {
|
|
|
889
1318
|
});
|
|
890
1319
|
this.elementInternals.setFormValue(nextValue);
|
|
891
1320
|
}
|
|
892
|
-
catch {
|
|
893
|
-
|
|
894
|
-
|
|
1321
|
+
catch { }
|
|
1322
|
+
}
|
|
1323
|
+
/** Deriva o erro de ordenação sem modificar os limites escolhidos. */
|
|
1324
|
+
getRangeOrderValidationMessage() {
|
|
1325
|
+
const invalidRange = this.selectionMode === 'range' &&
|
|
1326
|
+
this.mode !== DATETIME_PICKER_MODE.TIME &&
|
|
1327
|
+
this.rangeStart !== null &&
|
|
1328
|
+
this.rangeEnd !== null &&
|
|
1329
|
+
this.rangeStart.getTime() > this.rangeEnd.getTime();
|
|
1330
|
+
if (!invalidRange)
|
|
1331
|
+
return '';
|
|
1332
|
+
return this.mode === DATETIME_PICKER_MODE.DATETIME
|
|
1333
|
+
? DATETIME_RANGE_ORDER_MESSAGE
|
|
1334
|
+
: 'A data inicial deve anteceder a data final.';
|
|
895
1335
|
}
|
|
896
1336
|
/** Espelha a regra de required no mecanismo nativo de validade. */
|
|
897
1337
|
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: consolida flags nativos relacionados sem esconder a precedência das mensagens.
|
|
@@ -907,50 +1347,40 @@ export class DatetimePicker {
|
|
|
907
1347
|
rangeEnd: this.rangeEnd,
|
|
908
1348
|
referenceDate: this.referenceDate,
|
|
909
1349
|
});
|
|
910
|
-
const min = this.parseConstraintValue(this.min
|
|
911
|
-
const max = this.parseConstraintValue(this.max
|
|
1350
|
+
const min = this.parseConstraintValue(this.min);
|
|
1351
|
+
const max = this.parseConstraintValue(this.max);
|
|
912
1352
|
const values = this.selectionMode === 'range' ? [this.rangeStart, this.rangeEnd] : [this.value];
|
|
913
1353
|
const rangeUnderflow = min !== null && values.some((value) => value !== null && value.getTime() < min.getTime());
|
|
914
1354
|
const rangeOverflow = max !== null && values.some((value) => value !== null && value.getTime() > max.getTime());
|
|
915
|
-
const
|
|
916
|
-
this.rangeStart !== null &&
|
|
917
|
-
this.rangeEnd !== null &&
|
|
918
|
-
this.rangeStart.getTime() > this.rangeEnd.getTime();
|
|
1355
|
+
const rangeOrderMessage = this.getRangeOrderValidationMessage();
|
|
919
1356
|
const flags = {
|
|
920
|
-
customError: this.customValidationMessage !== '' ||
|
|
1357
|
+
customError: this.customValidationMessage !== '' ||
|
|
1358
|
+
this.inputValidationMessage !== '' ||
|
|
1359
|
+
Boolean(this.validatorMessage) ||
|
|
1360
|
+
rangeOrderMessage !== '' ||
|
|
1361
|
+
this.inputValidationPending,
|
|
921
1362
|
rangeOverflow,
|
|
922
1363
|
rangeUnderflow,
|
|
923
1364
|
valueMissing: missing,
|
|
924
1365
|
};
|
|
925
1366
|
const message = this.customValidationMessage ||
|
|
1367
|
+
this.inputValidationMessage ||
|
|
926
1368
|
this.validatorMessage ||
|
|
927
1369
|
(missing
|
|
928
1370
|
? 'Preencha este campo.'
|
|
929
|
-
:
|
|
930
|
-
?
|
|
1371
|
+
: rangeOrderMessage
|
|
1372
|
+
? rangeOrderMessage
|
|
931
1373
|
: rangeUnderflow
|
|
932
1374
|
? 'Selecione uma data igual ou posterior ao mínimo.'
|
|
933
1375
|
: rangeOverflow
|
|
934
1376
|
? 'Selecione uma data igual ou anterior ao máximo.'
|
|
935
1377
|
: '');
|
|
936
|
-
setFormValidity(this.elementInternals, flags, message, this.getNativeInputElement());
|
|
937
|
-
}
|
|
938
|
-
catch {
|
|
939
|
-
// Ambientes sem ElementInternals completo não devem falhar.
|
|
1378
|
+
setFormValidity(this.elementInternals, flags, message, this.getNativeInputElement() ?? undefined);
|
|
940
1379
|
}
|
|
1380
|
+
catch { }
|
|
941
1381
|
}
|
|
942
|
-
parseConstraintValue(value
|
|
943
|
-
|
|
944
|
-
return null;
|
|
945
|
-
if (!(value instanceof Date) && typeof value !== 'string') {
|
|
946
|
-
reportInvalidPropValue(this.el, propertyName, value, 'Informe uma data válida como Date ou string compatível com o modo atual.', 'Aplicando fallback null (sem limite).');
|
|
947
|
-
return null;
|
|
948
|
-
}
|
|
949
|
-
const parsedValue = this.parseMethodValue(value, this.mode);
|
|
950
|
-
if (parsedValue !== null)
|
|
951
|
-
return parsedValue;
|
|
952
|
-
reportInvalidPropValue(this.el, propertyName, value, 'Informe uma data válida como Date ou string compatível com o modo atual.', 'Aplicando fallback null (sem limite).');
|
|
953
|
-
return null;
|
|
1382
|
+
parseConstraintValue(value) {
|
|
1383
|
+
return value === null ? null : this.parseMethodValue(value, this.mode);
|
|
954
1384
|
}
|
|
955
1385
|
isDisabled() {
|
|
956
1386
|
return isFormControlDisabled(this.disabled, this.formDisabled);
|
|
@@ -1008,24 +1438,35 @@ export class DatetimePicker {
|
|
|
1008
1438
|
}
|
|
1009
1439
|
/** Renderiza o campo de entrada responsável por abrir e sincronizar o picker. */
|
|
1010
1440
|
renderInputField() {
|
|
1011
|
-
return (h("br-datetime-input", {
|
|
1012
|
-
this.datetimeInputElement = element;
|
|
1013
|
-
}, referenceDate: this.referenceDate, value: this.value, selectionMode: this.selectionMode, rangeStart: this.rangeStart, rangeEnd: this.rangeEnd, placeholder: this.placeholder, mode: this.mode, disabled: this.isDisabled(), onDateStateChange: this.handleDateStateChange, onTogglePicker: this.handleTogglePicker, exportparts: "container: input-container, input: input-field, icon: input-icon" }));
|
|
1441
|
+
return (h("br-datetime-input", { referenceDate: this.referenceDate, value: this.value, selectionMode: this.selectionMode, rangeStart: this.rangeStart, rangeEnd: this.rangeEnd, placeholder: this.placeholder, mode: this.mode, disabled: this.isDisabled(), onDateStateChange: this.handleDateStateChange, onInputValidationChange: this.handleInputValidationChange, onTogglePicker: this.handleTogglePicker, exportparts: "container: input-container, input: input-field, icon: input-icon" }));
|
|
1014
1442
|
}
|
|
1015
1443
|
/** Renderiza apenas o seletor de data. */
|
|
1016
1444
|
renderDatePicker() {
|
|
1017
|
-
const effectiveSelectionMode = this.
|
|
1445
|
+
const effectiveSelectionMode = this.selectionMode;
|
|
1018
1446
|
return (h("br-date-picker", { ...this.getSharedDateStateBindings(), selectionMode: effectiveSelectionMode, weekStartsOn: this.weekStartsOn, locale: this.locale, disabled: this.isDisabled(), disabledDates: this.normalizedDisabledDates, fixedRowCount: this.fixedRowCount }));
|
|
1019
1447
|
}
|
|
1020
|
-
/** Renderiza
|
|
1021
|
-
renderTimePicker() {
|
|
1022
|
-
|
|
1448
|
+
/** Renderiza um seletor de hora simples ou um limite do intervalo. */
|
|
1449
|
+
renderTimePicker(boundary) {
|
|
1450
|
+
const rangeValue = boundary === 'start' ? this.rangeStart : this.rangeEnd;
|
|
1451
|
+
const referenceDate = this.cloneDate(rangeValue ?? this.referenceDate);
|
|
1452
|
+
const selectedValue = this.cloneDate(rangeValue);
|
|
1453
|
+
const timerKey = boundary === undefined ? 'single' : `${boundary}-${rangeValue?.getTime() ?? `empty-${referenceDate.getTime()}`}`;
|
|
1454
|
+
const handler = boundary === 'start'
|
|
1455
|
+
? this.handleRangeStartTimeStateChange
|
|
1456
|
+
: boundary === 'end'
|
|
1457
|
+
? this.handleRangeEndTimeStateChange
|
|
1458
|
+
: this.handleDateStateChange;
|
|
1459
|
+
return (h("br-time-picker", { key: timerKey, referenceDate: referenceDate, value: boundary === undefined ? this.cloneDate(this.value) : selectedValue, onDateStateChange: handler, disabled: this.isDisabled() }));
|
|
1460
|
+
}
|
|
1461
|
+
/** Renderiza os horários inicial e final lado a lado no modo range. */
|
|
1462
|
+
renderRangeTimePickers() {
|
|
1463
|
+
return (h("div", { class: "range-time-pickers", role: "group", "aria-label": "Intervalo de hor\u00E1rios" }, h("div", { class: "range-time-picker" }, h("span", { class: "range-time-label" }, "In\u00EDcio"), this.renderTimePicker('start')), h("span", { class: "range-time-separator", "aria-hidden": "true" }, "-"), h("div", { class: "range-time-picker" }, h("span", { class: "range-time-label" }, "Fim"), this.renderTimePicker('end'))));
|
|
1023
1464
|
}
|
|
1024
1465
|
/**
|
|
1025
1466
|
* Renderiza a combinação de data e horário no modo `datetime`.
|
|
1026
1467
|
*/
|
|
1027
1468
|
renderDateTimePicker() {
|
|
1028
|
-
return (h(Fragment, null, this.renderDatePicker(), this.renderDivider(), this.renderTimePicker()));
|
|
1469
|
+
return (h(Fragment, null, this.renderDatePicker(), this.renderDivider(), this.selectionMode === 'range' ? this.renderRangeTimePickers() : this.renderTimePicker()));
|
|
1029
1470
|
}
|
|
1030
1471
|
/** Renderiza o separador visual entre data e hora no modo combinado. */
|
|
1031
1472
|
renderDivider() {
|
|
@@ -1045,7 +1486,11 @@ export class DatetimePicker {
|
|
|
1045
1486
|
* Renderização principal do componente.
|
|
1046
1487
|
*/
|
|
1047
1488
|
render() {
|
|
1048
|
-
|
|
1489
|
+
const validationMessage = this.customValidationMessage ||
|
|
1490
|
+
this.inputValidationMessage ||
|
|
1491
|
+
this.validatorMessage ||
|
|
1492
|
+
(this.inputValidationPending ? '' : this.getRangeOrderValidationMessage());
|
|
1493
|
+
return (h(Host, { key: '84fb00b49ddc94c38ccb60d6473008ef6f966c0a', onKeyDown: this.handlePickerKeydown, "aria-busy": this.isValidating ? 'true' : null, "aria-describedby": this.hasFeedbackSlot || validationMessage ? this.feedbackId : null, "aria-errormessage": validationMessage || this.hasFeedbackSlot ? this.feedbackId : null }, h("div", { key: '4c16fee0aa4a44ceb5b4097a3189ab9a427f00a3', class: this.getCssClassMap(), part: "container" }, this.renderInputField(), this.renderPickerContent()), h("div", { key: '1906aed19809ab4a5da12bef5d5a71fbe807be1b', id: this.feedbackId, part: "feedback", hidden: !this.hasFeedbackSlot && !validationMessage }, h("slot", { key: 'b3544c63edfcaf84f48f91e4105874ff7ebe4b01', name: "feedback", onSlotchange: (event) => (this.hasFeedbackSlot = hasAssignedSlotContent(event.currentTarget)) }), !this.hasFeedbackSlot && validationMessage ? (h("br-message", { state: "danger", "attr:message": validationMessage, feedback: true })) : null)));
|
|
1049
1494
|
}
|
|
1050
1495
|
static get is() { return "br-datetime-picker"; }
|
|
1051
1496
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1084,7 +1529,7 @@ export class DatetimePicker {
|
|
|
1084
1529
|
"name": "default",
|
|
1085
1530
|
"text": "'datetime'"
|
|
1086
1531
|
}],
|
|
1087
|
-
"text": "
|
|
1532
|
+
"text": "Modo exibido pelo componente.\n\nValores: `date` | `time` | `datetime`.\nValores inv\u00E1lidos s\u00E3o normalizados para o padr\u00E3o."
|
|
1088
1533
|
},
|
|
1089
1534
|
"getter": false,
|
|
1090
1535
|
"setter": false,
|
|
@@ -1114,7 +1559,7 @@ export class DatetimePicker {
|
|
|
1114
1559
|
"name": "default",
|
|
1115
1560
|
"text": "'pt-BR'"
|
|
1116
1561
|
}],
|
|
1117
|
-
"text": "
|
|
1562
|
+
"text": "Locale usado para formata\u00E7\u00E3o e r\u00F3tulos."
|
|
1118
1563
|
},
|
|
1119
1564
|
"getter": false,
|
|
1120
1565
|
"setter": false,
|
|
@@ -1137,7 +1582,7 @@ export class DatetimePicker {
|
|
|
1137
1582
|
"name": "default",
|
|
1138
1583
|
"text": "''"
|
|
1139
1584
|
}],
|
|
1140
|
-
"text": "
|
|
1585
|
+
"text": "Texto placeholder exibido no input."
|
|
1141
1586
|
},
|
|
1142
1587
|
"getter": false,
|
|
1143
1588
|
"setter": false,
|
|
@@ -1156,7 +1601,10 @@ export class DatetimePicker {
|
|
|
1156
1601
|
"required": false,
|
|
1157
1602
|
"optional": false,
|
|
1158
1603
|
"docs": {
|
|
1159
|
-
"tags": [
|
|
1604
|
+
"tags": [{
|
|
1605
|
+
"name": "default",
|
|
1606
|
+
"text": "''"
|
|
1607
|
+
}],
|
|
1160
1608
|
"text": "Nome do campo para submiss\u00E3o em formul\u00E1rios nativos."
|
|
1161
1609
|
},
|
|
1162
1610
|
"getter": false,
|
|
@@ -1176,8 +1624,11 @@ export class DatetimePicker {
|
|
|
1176
1624
|
"required": false,
|
|
1177
1625
|
"optional": false,
|
|
1178
1626
|
"docs": {
|
|
1179
|
-
"tags": [
|
|
1180
|
-
|
|
1627
|
+
"tags": [{
|
|
1628
|
+
"name": "default",
|
|
1629
|
+
"text": "false"
|
|
1630
|
+
}],
|
|
1631
|
+
"text": "Indica se o campo \u00E9 requerido para submiss\u00E3o do formul\u00E1rio."
|
|
1181
1632
|
},
|
|
1182
1633
|
"getter": false,
|
|
1183
1634
|
"setter": false,
|
|
@@ -1202,10 +1653,10 @@ export class DatetimePicker {
|
|
|
1202
1653
|
"optional": false,
|
|
1203
1654
|
"docs": {
|
|
1204
1655
|
"tags": [{
|
|
1205
|
-
"name": "
|
|
1206
|
-
"text": "
|
|
1656
|
+
"name": "default",
|
|
1657
|
+
"text": "null"
|
|
1207
1658
|
}],
|
|
1208
|
-
"text": "Menor data/
|
|
1659
|
+
"text": "Menor data/hora aceito (Date | string | null)."
|
|
1209
1660
|
},
|
|
1210
1661
|
"getter": false,
|
|
1211
1662
|
"setter": false,
|
|
@@ -1230,10 +1681,10 @@ export class DatetimePicker {
|
|
|
1230
1681
|
"optional": false,
|
|
1231
1682
|
"docs": {
|
|
1232
1683
|
"tags": [{
|
|
1233
|
-
"name": "
|
|
1234
|
-
"text": "
|
|
1684
|
+
"name": "default",
|
|
1685
|
+
"text": "null"
|
|
1235
1686
|
}],
|
|
1236
|
-
"text": "Maior data/
|
|
1687
|
+
"text": "Maior data/hora aceito (Date | string | null)."
|
|
1237
1688
|
},
|
|
1238
1689
|
"getter": false,
|
|
1239
1690
|
"setter": false,
|
|
@@ -1260,10 +1711,10 @@ export class DatetimePicker {
|
|
|
1260
1711
|
"optional": true,
|
|
1261
1712
|
"docs": {
|
|
1262
1713
|
"tags": [{
|
|
1263
|
-
"name": "
|
|
1264
|
-
"text": "
|
|
1714
|
+
"name": "default",
|
|
1715
|
+
"text": "undefined"
|
|
1265
1716
|
}],
|
|
1266
|
-
"text": "
|
|
1717
|
+
"text": "Validador customizado (s\u00EDncrono ou ass\u00EDncrono) para a sele\u00E7\u00E3o.\n\nRecebe `Date | DatetimePickerDateRange | null` como valor."
|
|
1267
1718
|
},
|
|
1268
1719
|
"getter": false,
|
|
1269
1720
|
"setter": false
|
|
@@ -1286,8 +1737,11 @@ export class DatetimePicker {
|
|
|
1286
1737
|
"required": false,
|
|
1287
1738
|
"optional": false,
|
|
1288
1739
|
"docs": {
|
|
1289
|
-
"tags": [
|
|
1290
|
-
|
|
1740
|
+
"tags": [{
|
|
1741
|
+
"name": "default",
|
|
1742
|
+
"text": "'single'"
|
|
1743
|
+
}],
|
|
1744
|
+
"text": "Tipo de sele\u00E7\u00E3o: `single` ou `range`."
|
|
1291
1745
|
},
|
|
1292
1746
|
"getter": false,
|
|
1293
1747
|
"setter": false,
|
|
@@ -1317,7 +1771,7 @@ export class DatetimePicker {
|
|
|
1317
1771
|
"name": "default",
|
|
1318
1772
|
"text": "0"
|
|
1319
1773
|
}],
|
|
1320
|
-
"text": "
|
|
1774
|
+
"text": "Dia inicial da semana exibido no calend\u00E1rio (0 = Dom, 6 = S\u00E1b)."
|
|
1321
1775
|
},
|
|
1322
1776
|
"getter": false,
|
|
1323
1777
|
"setter": false,
|
|
@@ -1346,11 +1800,8 @@ export class DatetimePicker {
|
|
|
1346
1800
|
"tags": [{
|
|
1347
1801
|
"name": "default",
|
|
1348
1802
|
"text": "null"
|
|
1349
|
-
}, {
|
|
1350
|
-
"name": "example",
|
|
1351
|
-
"text": "```html\n<br-datetime-picker initial-moment=\"now\"></br-datetime-picker>\n```"
|
|
1352
1803
|
}],
|
|
1353
|
-
"text": "
|
|
1804
|
+
"text": "Valor inicial da sele\u00E7\u00E3o: `'now' | Date | string | null`."
|
|
1354
1805
|
},
|
|
1355
1806
|
"getter": false,
|
|
1356
1807
|
"setter": false,
|
|
@@ -1375,10 +1826,10 @@ export class DatetimePicker {
|
|
|
1375
1826
|
"optional": false,
|
|
1376
1827
|
"docs": {
|
|
1377
1828
|
"tags": [{
|
|
1378
|
-
"name": "
|
|
1379
|
-
"text": "
|
|
1829
|
+
"name": "default",
|
|
1830
|
+
"text": "null"
|
|
1380
1831
|
}],
|
|
1381
|
-
"text": "
|
|
1832
|
+
"text": "Valor selecionado pelo usu\u00E1rio (Date | null).\n\nPode ser controlado externamente e \u00E9 refletido internamente."
|
|
1382
1833
|
},
|
|
1383
1834
|
"getter": false,
|
|
1384
1835
|
"setter": false,
|
|
@@ -1396,10 +1847,10 @@ export class DatetimePicker {
|
|
|
1396
1847
|
"optional": true,
|
|
1397
1848
|
"docs": {
|
|
1398
1849
|
"tags": [{
|
|
1399
|
-
"name": "
|
|
1400
|
-
"text": "
|
|
1850
|
+
"name": "default",
|
|
1851
|
+
"text": "undefined"
|
|
1401
1852
|
}],
|
|
1402
|
-
"text": "Representa\u00E7\u00E3o serializada compat\u00EDvel com
|
|
1853
|
+
"text": "Representa\u00E7\u00E3o serializada compat\u00EDvel com controles HTML.\n\nFormatos variam conforme `mode`. Em intervalos, usa `in\u00EDcio/fim`."
|
|
1403
1854
|
},
|
|
1404
1855
|
"getter": false,
|
|
1405
1856
|
"setter": false,
|
|
@@ -1423,10 +1874,13 @@ export class DatetimePicker {
|
|
|
1423
1874
|
"optional": true,
|
|
1424
1875
|
"docs": {
|
|
1425
1876
|
"tags": [{
|
|
1426
|
-
"name": "
|
|
1427
|
-
"text": "
|
|
1877
|
+
"name": "internal",
|
|
1878
|
+
"text": "Mant\u00E9m compatibilidade com APIs legadas."
|
|
1879
|
+
}, {
|
|
1880
|
+
"name": "default",
|
|
1881
|
+
"text": "undefined"
|
|
1428
1882
|
}],
|
|
1429
|
-
"text": "Espelho tipado da sele\u00E7\u00E3o atual
|
|
1883
|
+
"text": "Espelho tipado da sele\u00E7\u00E3o atual (`valueAsDate`)."
|
|
1430
1884
|
},
|
|
1431
1885
|
"getter": false,
|
|
1432
1886
|
"setter": false
|
|
@@ -1450,10 +1904,10 @@ export class DatetimePicker {
|
|
|
1450
1904
|
"optional": true,
|
|
1451
1905
|
"docs": {
|
|
1452
1906
|
"tags": [{
|
|
1453
|
-
"name": "
|
|
1454
|
-
"text": "
|
|
1907
|
+
"name": "default",
|
|
1908
|
+
"text": "undefined"
|
|
1455
1909
|
}],
|
|
1456
|
-
"text": "Intervalo controlado quando `selectionMode=\"range\"`.\
|
|
1910
|
+
"text": "Intervalo controlado quando `selectionMode=\"range\"`.\n\nEm `datetime`, preserva as datas e hor\u00E1rios informados; t\u00E9rmino anterior ao\nin\u00EDcio torna o controle inv\u00E1lido, sem reordenar ou avan\u00E7ar datas."
|
|
1457
1911
|
},
|
|
1458
1912
|
"getter": false,
|
|
1459
1913
|
"setter": false
|
|
@@ -1473,7 +1927,7 @@ export class DatetimePicker {
|
|
|
1473
1927
|
"name": "default",
|
|
1474
1928
|
"text": "false"
|
|
1475
1929
|
}],
|
|
1476
|
-
"text": "Desabilita toda a intera\u00E7\u00E3o do componente
|
|
1930
|
+
"text": "Desabilita toda a intera\u00E7\u00E3o do componente."
|
|
1477
1931
|
},
|
|
1478
1932
|
"getter": false,
|
|
1479
1933
|
"setter": false,
|
|
@@ -1502,14 +1956,8 @@ export class DatetimePicker {
|
|
|
1502
1956
|
"tags": [{
|
|
1503
1957
|
"name": "default",
|
|
1504
1958
|
"text": "null"
|
|
1505
|
-
}, {
|
|
1506
|
-
"name": "example",
|
|
1507
|
-
"text": "```html\n<br-datetime-picker mode=\"date\" disabled-dates=\"2026-09-07 2026-09-08\"></br-datetime-picker>\n```"
|
|
1508
|
-
}, {
|
|
1509
|
-
"name": "example",
|
|
1510
|
-
"text": "```js\nconst picker = document.querySelector('br-datetime-picker');\npicker.disabledDates = [new Date(2026, 8, 7), '2026-09-08'];\n```"
|
|
1511
1959
|
}],
|
|
1512
|
-
"text": "
|
|
1960
|
+
"text": "Datas indispon\u00EDveis para sele\u00E7\u00E3o. Aceita `Date[]`, `string` ou `null`.\n\nDatas inv\u00E1lidas s\u00E3o ignoradas. A compara\u00E7\u00E3o considera apenas o dia."
|
|
1513
1961
|
},
|
|
1514
1962
|
"getter": false,
|
|
1515
1963
|
"setter": false,
|
|
@@ -1532,7 +1980,7 @@ export class DatetimePicker {
|
|
|
1532
1980
|
"name": "default",
|
|
1533
1981
|
"text": "false"
|
|
1534
1982
|
}],
|
|
1535
|
-
"text": "
|
|
1983
|
+
"text": "Mant\u00E9m n\u00FAmero fixo de linhas no calend\u00E1rio (6 semanas) quando `true`."
|
|
1536
1984
|
},
|
|
1537
1985
|
"getter": false,
|
|
1538
1986
|
"setter": false,
|
|
@@ -1549,6 +1997,8 @@ export class DatetimePicker {
|
|
|
1549
1997
|
"hasFeedbackSlot": {},
|
|
1550
1998
|
"customValidationMessage": {},
|
|
1551
1999
|
"validatorMessage": {},
|
|
2000
|
+
"inputValidationMessage": {},
|
|
2001
|
+
"inputValidationPending": {},
|
|
1552
2002
|
"isValidating": {},
|
|
1553
2003
|
"normalizedDisabledDates": {},
|
|
1554
2004
|
"rangeEnd": {},
|
|
@@ -1564,12 +2014,18 @@ export class DatetimePicker {
|
|
|
1564
2014
|
"cancelable": true,
|
|
1565
2015
|
"composed": true,
|
|
1566
2016
|
"docs": {
|
|
1567
|
-
"tags": [
|
|
1568
|
-
|
|
2017
|
+
"tags": [{
|
|
2018
|
+
"name": "event",
|
|
2019
|
+
"text": "dateStateChange"
|
|
2020
|
+
}, {
|
|
2021
|
+
"name": "type",
|
|
2022
|
+
"text": "{CustomEvent<DatetimePickerDateState>}"
|
|
2023
|
+
}],
|
|
2024
|
+
"text": "Evento p\u00FAblico emitido quando a data de refer\u00EAncia ou a sele\u00E7\u00E3o mudam.\n\nPayload (`DatetimePickerDateState`):\n- `referenceDate`: Date \u2014 data usada para navega\u00E7\u00E3o visual (m\u00EAs/semana exibidos).\n- `value`: Date | null \u2014 valor selecionado atualmente."
|
|
1569
2025
|
},
|
|
1570
2026
|
"complexType": {
|
|
1571
2027
|
"original": "DatetimePickerDateState",
|
|
1572
|
-
"resolved": "{ referenceDate: Date; value: Date; range?: DatetimePickerDateRange; rangeDates?: DatetimePickerRangeDateState[]; }",
|
|
2028
|
+
"resolved": "{ referenceDate: Date; value: Date; range?: DatetimePickerDateRange; rangeDates?: DatetimePickerRangeDateState[]; origin?: string; }",
|
|
1573
2029
|
"references": {
|
|
1574
2030
|
"DatetimePickerDateState": {
|
|
1575
2031
|
"location": "import",
|
|
@@ -1579,6 +2035,34 @@ export class DatetimePicker {
|
|
|
1579
2035
|
}
|
|
1580
2036
|
}
|
|
1581
2037
|
}
|
|
2038
|
+
}, {
|
|
2039
|
+
"method": "brDatetimePickerChange",
|
|
2040
|
+
"name": "brDatetimePickerChange",
|
|
2041
|
+
"bubbles": true,
|
|
2042
|
+
"cancelable": true,
|
|
2043
|
+
"composed": true,
|
|
2044
|
+
"docs": {
|
|
2045
|
+
"tags": [{
|
|
2046
|
+
"name": "event",
|
|
2047
|
+
"text": "brDatetimePickerChange"
|
|
2048
|
+
}, {
|
|
2049
|
+
"name": "type",
|
|
2050
|
+
"text": "{CustomEvent<DatetimePickerChangeDetail>}"
|
|
2051
|
+
}],
|
|
2052
|
+
"text": "Evento emitido quando a sele\u00E7\u00E3o muda.\n\nPayload (`DatetimePickerChangeDetail`):\n- `mode`: DatetimePickerMode \u2014 modo atual do componente (`date` | `time` | `datetime`).\n- `selectionMode`: DatetimePickerSelectionMode \u2014 `single` ou `range`.\n- `value`: Date | null | DatetimePickerDateRange \u2014 sele\u00E7\u00E3o atual (tipo depende de `selectionMode`).\n- `serializedValue`: string | undefined \u2014 representa\u00E7\u00E3o serializada para integra\u00E7\u00E3o com formul\u00E1rios."
|
|
2053
|
+
},
|
|
2054
|
+
"complexType": {
|
|
2055
|
+
"original": "DatetimePickerChangeDetail",
|
|
2056
|
+
"resolved": "{ mode: \"date\"; selectionMode: \"range\"; value: { start: string; end: string; }; serializedValue: string; complete: boolean; } | { mode: \"date\"; selectionMode: \"single\"; value: Date; serializedValue: string; } | { mode: \"datetime\"; selectionMode: \"range\"; value: { start: string; end: string; }; serializedValue: string; complete: boolean; } | { mode: \"datetime\"; selectionMode: \"single\"; value: Date; serializedValue: string; } | { mode: \"time\"; selectionMode: \"range\"; value: { start: string; end: string; }; serializedValue: string; complete: boolean; } | { mode: \"time\"; selectionMode: \"single\"; value: { hours: number; minutes: number; }; serializedValue: string; }",
|
|
2057
|
+
"references": {
|
|
2058
|
+
"DatetimePickerChangeDetail": {
|
|
2059
|
+
"location": "import",
|
|
2060
|
+
"path": "./datetime-picker.types",
|
|
2061
|
+
"id": "src/components/datetime-picker/datetime-picker.types.ts::DatetimePickerChangeDetail",
|
|
2062
|
+
"referenceLocation": "DatetimePickerChangeDetail"
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
1582
2066
|
}, {
|
|
1583
2067
|
"method": "valueChange",
|
|
1584
2068
|
"name": "valueChange",
|
|
@@ -1588,7 +2072,13 @@ export class DatetimePicker {
|
|
|
1588
2072
|
"docs": {
|
|
1589
2073
|
"tags": [{
|
|
1590
2074
|
"name": "deprecated",
|
|
1591
|
-
"text": "Use `
|
|
2075
|
+
"text": "Use `brDatetimePickerChange` para receber a sele\u00E7\u00E3o completa e tipada.\n\nPayload (legacy): `Date | null` \u2014 valor selecionado."
|
|
2076
|
+
}, {
|
|
2077
|
+
"name": "event",
|
|
2078
|
+
"text": "valueChange"
|
|
2079
|
+
}, {
|
|
2080
|
+
"name": "type",
|
|
2081
|
+
"text": "{CustomEvent<Date | null>}"
|
|
1592
2082
|
}],
|
|
1593
2083
|
"text": "Evento emitido quando o valor selecionado muda."
|
|
1594
2084
|
},
|
|
@@ -1609,8 +2099,14 @@ export class DatetimePicker {
|
|
|
1609
2099
|
"cancelable": true,
|
|
1610
2100
|
"composed": true,
|
|
1611
2101
|
"docs": {
|
|
1612
|
-
"tags": [
|
|
1613
|
-
|
|
2102
|
+
"tags": [{
|
|
2103
|
+
"name": "event",
|
|
2104
|
+
"text": "brDatetimePickerValidationChange"
|
|
2105
|
+
}, {
|
|
2106
|
+
"name": "type",
|
|
2107
|
+
"text": "{CustomEvent<FormValidationChangeDetail>}"
|
|
2108
|
+
}],
|
|
2109
|
+
"text": "Emitido ao iniciar e concluir a valida\u00E7\u00E3o customizada.\n\nPayload (`FormValidationChangeDetail`):\n- `validating`: boolean \u2014 indica se a valida\u00E7\u00E3o est\u00E1 em execu\u00E7\u00E3o.\n- `valid`: boolean | null \u2014 resultado da valida\u00E7\u00E3o (`null` enquanto valida).\n- `message`: string | null \u2014 mensagem de valida\u00E7\u00E3o associada."
|
|
1614
2110
|
},
|
|
1615
2111
|
"complexType": {
|
|
1616
2112
|
"original": "FormValidationChangeDetail",
|
|
@@ -1634,7 +2130,7 @@ export class DatetimePicker {
|
|
|
1634
2130
|
"parameters": [{
|
|
1635
2131
|
"name": "dates",
|
|
1636
2132
|
"type": "DatetimePickerDisabledDate[]",
|
|
1637
|
-
"docs": "
|
|
2133
|
+
"docs": "Lista de datas (`Date` | `string`) a bloquear, ou `null` para limpar."
|
|
1638
2134
|
}],
|
|
1639
2135
|
"references": {
|
|
1640
2136
|
"Promise": {
|
|
@@ -1651,10 +2147,13 @@ export class DatetimePicker {
|
|
|
1651
2147
|
"return": "Promise<void>"
|
|
1652
2148
|
},
|
|
1653
2149
|
"docs": {
|
|
1654
|
-
"text": "Define programaticamente as datas desabilitadas
|
|
2150
|
+
"text": "Define programaticamente as datas desabilitadas.\n\nUse quando scripts externos precisam fornecer uma lista tipada de\ndatas a bloquear no calend\u00E1rio. Substitui a prop `disabledDates` para\natualiza\u00E7\u00F5es imperativas.",
|
|
1655
2151
|
"tags": [{
|
|
1656
2152
|
"name": "param",
|
|
1657
|
-
"text": "dates
|
|
2153
|
+
"text": "dates Lista de datas (`Date` | `string`) a bloquear, ou `null` para limpar."
|
|
2154
|
+
}, {
|
|
2155
|
+
"name": "returns",
|
|
2156
|
+
"text": "Promise<void> \u2014 resolve quando a atualiza\u00E7\u00E3o interna for aplicada."
|
|
1658
2157
|
}]
|
|
1659
2158
|
}
|
|
1660
2159
|
},
|
|
@@ -1664,7 +2163,7 @@ export class DatetimePicker {
|
|
|
1664
2163
|
"parameters": [{
|
|
1665
2164
|
"name": "value",
|
|
1666
2165
|
"type": "string | Date",
|
|
1667
|
-
"docs": ""
|
|
2166
|
+
"docs": "Date | string | null \u2014 valor a aplicar; `null` limpa a sele\u00E7\u00E3o."
|
|
1668
2167
|
}],
|
|
1669
2168
|
"references": {
|
|
1670
2169
|
"Promise": {
|
|
@@ -1679,8 +2178,14 @@ export class DatetimePicker {
|
|
|
1679
2178
|
"return": "Promise<void>"
|
|
1680
2179
|
},
|
|
1681
2180
|
"docs": {
|
|
1682
|
-
"text": "Define o valor
|
|
1683
|
-
"tags": [
|
|
2181
|
+
"text": "Define o valor do componente de forma imperativa.\n\nAceita `Date`, string compat\u00EDvel com o `mode`, ou `null` para limpar a sele\u00E7\u00E3o.\nValida\u00E7\u00E3o de datas desabilitadas \u00E9 aplicada antes da atribui\u00E7\u00E3o.",
|
|
2182
|
+
"tags": [{
|
|
2183
|
+
"name": "param",
|
|
2184
|
+
"text": "value Date | string | null \u2014 valor a aplicar; `null` limpa a sele\u00E7\u00E3o."
|
|
2185
|
+
}, {
|
|
2186
|
+
"name": "returns",
|
|
2187
|
+
"text": "Promise<void> \u2014 resolve quando o componente aplicar e sincronizar o valor."
|
|
2188
|
+
}]
|
|
1684
2189
|
}
|
|
1685
2190
|
},
|
|
1686
2191
|
"getValue": {
|
|
@@ -1701,7 +2206,10 @@ export class DatetimePicker {
|
|
|
1701
2206
|
},
|
|
1702
2207
|
"docs": {
|
|
1703
2208
|
"text": "Retorna uma c\u00F3pia do valor selecionado atualmente.",
|
|
1704
|
-
"tags": [
|
|
2209
|
+
"tags": [{
|
|
2210
|
+
"name": "returns",
|
|
2211
|
+
"text": "Promise<Date | null> \u2014 c\u00F3pia imut\u00E1vel do `value` atual, ou `null`."
|
|
2212
|
+
}]
|
|
1705
2213
|
}
|
|
1706
2214
|
},
|
|
1707
2215
|
"clear": {
|
|
@@ -1717,8 +2225,11 @@ export class DatetimePicker {
|
|
|
1717
2225
|
"return": "Promise<void>"
|
|
1718
2226
|
},
|
|
1719
2227
|
"docs": {
|
|
1720
|
-
"text": "Limpa valor e intervalo selecionados.",
|
|
1721
|
-
"tags": [
|
|
2228
|
+
"text": "Limpa valor e intervalo selecionados.\n\nRemove sele\u00E7\u00E3o atual e restaura a refer\u00EAncia de navega\u00E7\u00E3o para a data atual.",
|
|
2229
|
+
"tags": [{
|
|
2230
|
+
"name": "returns",
|
|
2231
|
+
"text": "Promise<void> \u2014 resolve ap\u00F3s a limpeza e sincroniza\u00E7\u00E3o internas."
|
|
2232
|
+
}]
|
|
1722
2233
|
}
|
|
1723
2234
|
},
|
|
1724
2235
|
"open": {
|
|
@@ -1735,7 +2246,10 @@ export class DatetimePicker {
|
|
|
1735
2246
|
},
|
|
1736
2247
|
"docs": {
|
|
1737
2248
|
"text": "Abre o picker quando o componente estiver habilitado.",
|
|
1738
|
-
"tags": [
|
|
2249
|
+
"tags": [{
|
|
2250
|
+
"name": "returns",
|
|
2251
|
+
"text": "Promise<void> \u2014 resolve quando o estado visual for atualizado."
|
|
2252
|
+
}]
|
|
1739
2253
|
}
|
|
1740
2254
|
},
|
|
1741
2255
|
"close": {
|
|
@@ -1752,7 +2266,10 @@ export class DatetimePicker {
|
|
|
1752
2266
|
},
|
|
1753
2267
|
"docs": {
|
|
1754
2268
|
"text": "Fecha o picker.",
|
|
1755
|
-
"tags": [
|
|
2269
|
+
"tags": [{
|
|
2270
|
+
"name": "returns",
|
|
2271
|
+
"text": "Promise<void> \u2014 resolve ap\u00F3s atualiza\u00E7\u00E3o do estado de visibilidade."
|
|
2272
|
+
}]
|
|
1756
2273
|
}
|
|
1757
2274
|
},
|
|
1758
2275
|
"toggle": {
|
|
@@ -1769,7 +2286,10 @@ export class DatetimePicker {
|
|
|
1769
2286
|
},
|
|
1770
2287
|
"docs": {
|
|
1771
2288
|
"text": "Alterna o estado de abertura do picker.",
|
|
1772
|
-
"tags": [
|
|
2289
|
+
"tags": [{
|
|
2290
|
+
"name": "returns",
|
|
2291
|
+
"text": "Promise<void> \u2014 resolve quando a transi\u00E7\u00E3o de estado terminar."
|
|
2292
|
+
}]
|
|
1773
2293
|
}
|
|
1774
2294
|
},
|
|
1775
2295
|
"focusInput": {
|
|
@@ -1780,17 +2300,16 @@ export class DatetimePicker {
|
|
|
1780
2300
|
"Promise": {
|
|
1781
2301
|
"location": "global",
|
|
1782
2302
|
"id": "global::Promise"
|
|
1783
|
-
},
|
|
1784
|
-
"HTMLBrDatetimeInputElement": {
|
|
1785
|
-
"location": "global",
|
|
1786
|
-
"id": "global::HTMLBrDatetimeInputElement"
|
|
1787
2303
|
}
|
|
1788
2304
|
},
|
|
1789
2305
|
"return": "Promise<void>"
|
|
1790
2306
|
},
|
|
1791
2307
|
"docs": {
|
|
1792
2308
|
"text": "Move o foco para o input nativo interno.",
|
|
1793
|
-
"tags": [
|
|
2309
|
+
"tags": [{
|
|
2310
|
+
"name": "returns",
|
|
2311
|
+
"text": "Promise<void> \u2014 resolve imediatamente ap\u00F3s tentar focar o elemento."
|
|
2312
|
+
}]
|
|
1794
2313
|
}
|
|
1795
2314
|
},
|
|
1796
2315
|
"setRange": {
|
|
@@ -1799,11 +2318,11 @@ export class DatetimePicker {
|
|
|
1799
2318
|
"parameters": [{
|
|
1800
2319
|
"name": "start",
|
|
1801
2320
|
"type": "string | Date",
|
|
1802
|
-
"docs": ""
|
|
2321
|
+
"docs": "Date | string | null \u2014 data inicial do intervalo."
|
|
1803
2322
|
}, {
|
|
1804
2323
|
"name": "end",
|
|
1805
2324
|
"type": "string | Date",
|
|
1806
|
-
"docs": ""
|
|
2325
|
+
"docs": "Date | string | null \u2014 data final do intervalo."
|
|
1807
2326
|
}],
|
|
1808
2327
|
"references": {
|
|
1809
2328
|
"Promise": {
|
|
@@ -1818,8 +2337,17 @@ export class DatetimePicker {
|
|
|
1818
2337
|
"return": "Promise<void>"
|
|
1819
2338
|
},
|
|
1820
2339
|
"docs": {
|
|
1821
|
-
"text": "Define intervalo
|
|
1822
|
-
"tags": [
|
|
2340
|
+
"text": "Define um intervalo no modo atual e ativa `selectionMode=\"range\"`.\n\nValida datas contra bloqueios e sincroniza estado visual e de formul\u00E1rio.\nEm `datetime`, mant\u00E9m os limites informados e sinaliza intervalo inv\u00E1lido\nquando o t\u00E9rmino precede o in\u00EDcio, sem ajustar datas automaticamente.",
|
|
2341
|
+
"tags": [{
|
|
2342
|
+
"name": "param",
|
|
2343
|
+
"text": "start Date | string | null \u2014 data inicial do intervalo."
|
|
2344
|
+
}, {
|
|
2345
|
+
"name": "param",
|
|
2346
|
+
"text": "end Date | string | null \u2014 data final do intervalo."
|
|
2347
|
+
}, {
|
|
2348
|
+
"name": "returns",
|
|
2349
|
+
"text": "Promise<void> \u2014 resolve quando o intervalo for aplicado e sincronizado."
|
|
2350
|
+
}]
|
|
1823
2351
|
}
|
|
1824
2352
|
},
|
|
1825
2353
|
"getRange": {
|
|
@@ -1842,7 +2370,7 @@ export class DatetimePicker {
|
|
|
1842
2370
|
"text": "Retorna o intervalo de datas selecionado quando em modo `selectionMode=\"range\"`.",
|
|
1843
2371
|
"tags": [{
|
|
1844
2372
|
"name": "returns",
|
|
1845
|
-
"text": "
|
|
2373
|
+
"text": "Promise<{ start: Date | null; end: Date | null } | null> \u2014 objeto com `start`/`end` ou `null` quando\nn\u00E3o estiver em modo `range`."
|
|
1846
2374
|
}]
|
|
1847
2375
|
}
|
|
1848
2376
|
},
|
|
@@ -1862,7 +2390,7 @@ export class DatetimePicker {
|
|
|
1862
2390
|
"text": "Consulta se o picker est\u00E1 atualmente aberto.",
|
|
1863
2391
|
"tags": [{
|
|
1864
2392
|
"name": "returns",
|
|
1865
|
-
"text": "`true` se o picker est\u00E1 vis\u00EDvel, `false` caso contr\u00E1rio."
|
|
2393
|
+
"text": "Promise<boolean> \u2014 `true` se o picker est\u00E1 vis\u00EDvel, `false` caso contr\u00E1rio."
|
|
1866
2394
|
}]
|
|
1867
2395
|
}
|
|
1868
2396
|
},
|
|
@@ -1880,7 +2408,10 @@ export class DatetimePicker {
|
|
|
1880
2408
|
},
|
|
1881
2409
|
"docs": {
|
|
1882
2410
|
"text": "Restaura o estado inicial atualmente registrado para reset.",
|
|
1883
|
-
"tags": [
|
|
2411
|
+
"tags": [{
|
|
2412
|
+
"name": "returns",
|
|
2413
|
+
"text": "Promise<void> \u2014 resolve quando a sele\u00E7\u00E3o inicial for restaurada."
|
|
2414
|
+
}]
|
|
1884
2415
|
}
|
|
1885
2416
|
},
|
|
1886
2417
|
"checkValidity": {
|
|
@@ -1897,7 +2428,10 @@ export class DatetimePicker {
|
|
|
1897
2428
|
},
|
|
1898
2429
|
"docs": {
|
|
1899
2430
|
"text": "Permite que consumidores acionem valida\u00E7\u00E3o nativa do formul\u00E1rio via host.",
|
|
1900
|
-
"tags": [
|
|
2431
|
+
"tags": [{
|
|
2432
|
+
"name": "returns",
|
|
2433
|
+
"text": "Promise<boolean> \u2014 resultado da Constraint Validation API para o host."
|
|
2434
|
+
}]
|
|
1901
2435
|
}
|
|
1902
2436
|
},
|
|
1903
2437
|
"reportValidity": {
|
|
@@ -1914,7 +2448,10 @@ export class DatetimePicker {
|
|
|
1914
2448
|
},
|
|
1915
2449
|
"docs": {
|
|
1916
2450
|
"text": "Permite exibir mensagens nativas de valida\u00E7\u00E3o no host.",
|
|
1917
|
-
"tags": [
|
|
2451
|
+
"tags": [{
|
|
2452
|
+
"name": "returns",
|
|
2453
|
+
"text": "Promise<boolean> \u2014 `true` se a mensagem foi exibida e o formul\u00E1rio \u00E9 v\u00E1lido."
|
|
2454
|
+
}]
|
|
1918
2455
|
}
|
|
1919
2456
|
},
|
|
1920
2457
|
"setCustomValidity": {
|
|
@@ -1923,7 +2460,7 @@ export class DatetimePicker {
|
|
|
1923
2460
|
"parameters": [{
|
|
1924
2461
|
"name": "message",
|
|
1925
2462
|
"type": "string",
|
|
1926
|
-
"docs": ""
|
|
2463
|
+
"docs": "string \u2014 mensagem de valida\u00E7\u00E3o; string vazia remove a mensagem."
|
|
1927
2464
|
}],
|
|
1928
2465
|
"references": {
|
|
1929
2466
|
"Promise": {
|
|
@@ -1935,7 +2472,13 @@ export class DatetimePicker {
|
|
|
1935
2472
|
},
|
|
1936
2473
|
"docs": {
|
|
1937
2474
|
"text": "Define ou limpa uma mensagem de validade customizada.",
|
|
1938
|
-
"tags": [
|
|
2475
|
+
"tags": [{
|
|
2476
|
+
"name": "param",
|
|
2477
|
+
"text": "message string \u2014 mensagem de valida\u00E7\u00E3o; string vazia remove a mensagem."
|
|
2478
|
+
}, {
|
|
2479
|
+
"name": "returns",
|
|
2480
|
+
"text": "Promise<void> \u2014 resolve ap\u00F3s sincronizar a validade no host."
|
|
2481
|
+
}]
|
|
1939
2482
|
}
|
|
1940
2483
|
},
|
|
1941
2484
|
"validate": {
|
|
@@ -1961,8 +2504,11 @@ export class DatetimePicker {
|
|
|
1961
2504
|
"return": "Promise<boolean>"
|
|
1962
2505
|
},
|
|
1963
2506
|
"docs": {
|
|
1964
|
-
"text": "Executa o validator
|
|
1965
|
-
"tags": [
|
|
2507
|
+
"text": "Executa o validator customizado (se houver) e valida o controle.\n\nEmite eventos de in\u00EDcio/conclus\u00E3o da valida\u00E7\u00E3o e atualiza mensagens internas.",
|
|
2508
|
+
"tags": [{
|
|
2509
|
+
"name": "returns",
|
|
2510
|
+
"text": "Promise<boolean> \u2014 `true` se a sele\u00E7\u00E3o for considerada v\u00E1lida."
|
|
2511
|
+
}]
|
|
1966
2512
|
}
|
|
1967
2513
|
},
|
|
1968
2514
|
"getValidationState": {
|
|
@@ -1985,7 +2531,10 @@ export class DatetimePicker {
|
|
|
1985
2531
|
},
|
|
1986
2532
|
"docs": {
|
|
1987
2533
|
"text": "Retorna um snapshot serializ\u00E1vel da Constraint Validation API.",
|
|
1988
|
-
"tags": [
|
|
2534
|
+
"tags": [{
|
|
2535
|
+
"name": "returns",
|
|
2536
|
+
"text": "Promise<FormValidationState> \u2014 estado atual de valida\u00E7\u00E3o do host,\npronto para convers\u00E3o e restaura\u00E7\u00E3o via `formStateRestoreCallback`."
|
|
2537
|
+
}]
|
|
1989
2538
|
}
|
|
1990
2539
|
}
|
|
1991
2540
|
};
|