@ui5/webcomponents 1.22.0 → 1.23.0-rc.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/CHANGELOG.md +33 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Badge.d.ts +4 -4
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Button.d.ts +2 -1
- package/dist/Button.js +3 -0
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.d.ts +31 -1
- package/dist/Calendar.js +57 -0
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarLegend.d.ts +76 -0
- package/dist/CalendarLegend.js +152 -0
- package/dist/CalendarLegend.js.map +1 -0
- package/dist/CalendarLegendItem.d.ts +45 -0
- package/dist/CalendarLegendItem.js +73 -0
- package/dist/CalendarLegendItem.js.map +1 -0
- package/dist/DatePicker.d.ts +1 -2
- package/dist/DatePicker.js +1 -1
- package/dist/DatePicker.js.map +1 -1
- package/dist/DayPicker.d.ts +8 -2
- package/dist/DayPicker.js +15 -3
- package/dist/DayPicker.js.map +1 -1
- package/dist/Link.d.ts +2 -1
- package/dist/Link.js +3 -0
- package/dist/Link.js.map +1 -1
- package/dist/ListItem.d.ts +2 -3
- package/dist/ListItem.js +1 -1
- package/dist/ListItem.js.map +1 -1
- package/dist/ProgressIndicator.d.ts +2 -0
- package/dist/ProgressIndicator.js +2 -0
- package/dist/ProgressIndicator.js.map +1 -1
- package/dist/SelectMenuOption.d.ts +1 -1
- package/dist/SpecialCalendarDate.d.ts +26 -0
- package/dist/SpecialCalendarDate.js +35 -0
- package/dist/SpecialCalendarDate.js.map +1 -0
- package/dist/StepInput.d.ts +6 -0
- package/dist/StepInput.js +38 -3
- package/dist/StepInput.js.map +1 -1
- package/dist/Tab.js +3 -3
- package/dist/Tab.js.map +1 -1
- package/dist/TabContainer.d.ts +11 -4
- package/dist/TabContainer.js +109 -63
- package/dist/TabContainer.js.map +1 -1
- package/dist/Table.d.ts +1 -0
- package/dist/Table.js +7 -0
- package/dist/Table.js.map +1 -1
- package/dist/Toolbar.d.ts +1 -2
- package/dist/Toolbar.js +1 -1
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarButton.d.ts +1 -1
- package/dist/ToolbarButton.js.map +1 -1
- package/dist/TreeItemBase.d.ts +2 -2
- package/dist/TreeItemBase.js +1 -2
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/bundle.esm.d.ts +0 -1
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/Badge.css +1 -1
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/BusyIndicator.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/CalendarLegend.css +1 -0
- package/dist/css/themes/CalendarLegendItem.css +1 -0
- package/dist/css/themes/Card.css +1 -1
- package/dist/css/themes/CardHeader.css +1 -1
- package/dist/css/themes/Carousel.css +1 -1
- package/dist/css/themes/CheckBox.css +1 -1
- package/dist/css/themes/ColorPalette.css +1 -1
- package/dist/css/themes/ColorPaletteItem.css +1 -1
- package/dist/css/themes/ColorPalettePopover.css +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/ComboBox.css +1 -1
- package/dist/css/themes/CustomListItem.css +1 -1
- package/dist/css/themes/DatePicker.css +1 -1
- package/dist/css/themes/DateTimePickerPopover.css +1 -1
- package/dist/css/themes/DayPicker.css +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/FileUploader.css +1 -1
- package/dist/css/themes/GroupHeaderListItem.css +1 -1
- package/dist/css/themes/GrowingButton.css +1 -1
- package/dist/css/themes/Icon.css +1 -1
- package/dist/css/themes/Input.css +1 -1
- package/dist/css/themes/InputIcon.css +1 -1
- package/dist/css/themes/InputSharedStyles.css +1 -1
- package/dist/css/themes/Link.css +1 -1
- package/dist/css/themes/List.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/ListItemBase.css +1 -1
- package/dist/css/themes/Menu.css +1 -1
- package/dist/css/themes/MessageStrip.css +1 -1
- package/dist/css/themes/MonthPicker.css +1 -1
- package/dist/css/themes/MultiComboBox.css +1 -1
- package/dist/css/themes/MultiComboBoxPopover.css +1 -1
- package/dist/css/themes/MultiInput.css +1 -1
- package/dist/css/themes/NavigationMenu.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/Popover.css +1 -1
- package/dist/css/themes/PopupStaticAreaStyles.css +1 -1
- package/dist/css/themes/PopupsCommon.css +1 -1
- package/dist/css/themes/ProgressIndicator.css +1 -1
- package/dist/css/themes/RadioButton.css +1 -1
- package/dist/css/themes/RangeSlider.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/ResponsivePopover.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/SegmentedButton.css +1 -1
- package/dist/css/themes/Select.css +1 -1
- package/dist/css/themes/SelectMenu.css +1 -1
- package/dist/css/themes/SelectPopover.css +1 -1
- package/dist/css/themes/SliderBase.css +1 -1
- package/dist/css/themes/SplitButton.css +1 -1
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/Switch.css +1 -1
- package/dist/css/themes/TabContainer.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/css/themes/TabInStrip.css +1 -1
- package/dist/css/themes/TabSemanticIcon.css +1 -1
- package/dist/css/themes/TabSeparatorInOverflow.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/css/themes/TableCell.css +1 -1
- package/dist/css/themes/TableColumn.css +1 -1
- package/dist/css/themes/TableGroupRow.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/TimePicker.css +1 -1
- package/dist/css/themes/Toast.css +1 -1
- package/dist/css/themes/ToggleButton.css +1 -1
- package/dist/css/themes/Token.css +1 -1
- package/dist/css/themes/Tokenizer.css +1 -1
- package/dist/css/themes/TokenizerPopover.css +1 -1
- package/dist/css/themes/Toolbar.css +1 -1
- package/dist/css/themes/ToolbarPopover.css +1 -1
- package/dist/css/themes/TreeItem.css +1 -1
- package/dist/css/themes/ValueStateMessage.css +1 -1
- package/dist/css/themes/WheelSlider.css +1 -1
- package/dist/css/themes/YearPicker.css +1 -1
- package/dist/css/themes/sap_belize/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_belize_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_belize_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw_exp/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +566 -16
- package/dist/custom-elements.json +272 -11
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +5 -1
- package/dist/generated/i18n/i18n-defaults.js +5 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/templates/ButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/CalendarLegendItemTemplate.lit.d.ts +4 -0
- package/dist/generated/templates/CalendarLegendItemTemplate.lit.js +5 -0
- package/dist/generated/templates/CalendarLegendItemTemplate.lit.js.map +1 -0
- package/dist/generated/templates/CalendarLegendTemplate.lit.d.ts +4 -0
- package/dist/generated/templates/CalendarLegendTemplate.lit.js +8 -0
- package/dist/generated/templates/CalendarLegendTemplate.lit.js.map +1 -0
- package/dist/generated/templates/CalendarTemplate.lit.js +1 -1
- package/dist/generated/templates/CalendarTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ColorPickerTemplate.lit.js +1 -1
- package/dist/generated/templates/ColorPickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DayPickerTemplate.lit.js +7 -6
- package/dist/generated/templates/DayPickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js.map +1 -1
- package/dist/generated/templates/NavigationMenuTemplate.lit.js +11 -10
- package/dist/generated/templates/NavigationMenuTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ProgressIndicatorTemplate.lit.js +1 -1
- package/dist/generated/templates/ProgressIndicatorTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SplitButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/SplitButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SwitchTemplate.lit.js +1 -1
- package/dist/generated/templates/SwitchTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TabContainerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/TabContainerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TabInOverflowTemplate.lit.js +2 -3
- package/dist/generated/templates/TabInOverflowTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ToggleButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/Badge.css.js +1 -1
- package/dist/generated/themes/Badge.css.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/BusyIndicator.css.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegend.css.d.ts +3 -0
- package/dist/generated/themes/CalendarLegend.css.js +9 -0
- package/dist/generated/themes/CalendarLegend.css.js.map +1 -0
- package/dist/generated/themes/CalendarLegendItem.css.d.ts +3 -0
- package/dist/generated/themes/CalendarLegendItem.css.js +9 -0
- package/dist/generated/themes/CalendarLegendItem.css.js.map +1 -0
- package/dist/generated/themes/Card.css.js +1 -1
- package/dist/generated/themes/Card.css.js.map +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/Carousel.css.js.map +1 -1
- package/dist/generated/themes/CheckBox.css.js +1 -1
- package/dist/generated/themes/CheckBox.css.js.map +1 -1
- package/dist/generated/themes/ColorPalette.css.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js.map +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js.map +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js.map +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/ComboBox.css.js +1 -1
- package/dist/generated/themes/ComboBox.css.js.map +1 -1
- package/dist/generated/themes/CustomListItem.css.js +1 -1
- package/dist/generated/themes/CustomListItem.css.js.map +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js.map +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/DayPicker.css.js +1 -1
- package/dist/generated/themes/DayPicker.css.js.map +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/FileUploader.css.js +1 -1
- package/dist/generated/themes/FileUploader.css.js.map +1 -1
- package/dist/generated/themes/GroupHeaderListItem.css.js +1 -1
- package/dist/generated/themes/GroupHeaderListItem.css.js.map +1 -1
- package/dist/generated/themes/GrowingButton.css.js +1 -1
- package/dist/generated/themes/GrowingButton.css.js.map +1 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +1 -1
- package/dist/generated/themes/Input.css.js +1 -1
- package/dist/generated/themes/Input.css.js.map +1 -1
- package/dist/generated/themes/InputIcon.css.js +1 -1
- package/dist/generated/themes/InputIcon.css.js.map +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js.map +1 -1
- package/dist/generated/themes/Link.css.js +1 -1
- package/dist/generated/themes/Link.css.js.map +1 -1
- package/dist/generated/themes/List.css.js +1 -1
- package/dist/generated/themes/List.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/Menu.css.js +1 -1
- package/dist/generated/themes/Menu.css.js.map +1 -1
- package/dist/generated/themes/MessageStrip.css.js +1 -1
- package/dist/generated/themes/MessageStrip.css.js.map +1 -1
- package/dist/generated/themes/MonthPicker.css.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenu.css.js +1 -1
- package/dist/generated/themes/NavigationMenu.css.js.map +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/Popover.css.js +1 -1
- package/dist/generated/themes/Popover.css.js.map +1 -1
- package/dist/generated/themes/PopupStaticAreaStyles.css.js +1 -1
- package/dist/generated/themes/PopupStaticAreaStyles.css.js.map +1 -1
- package/dist/generated/themes/PopupsCommon.css.js +1 -1
- package/dist/generated/themes/PopupsCommon.css.js.map +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RadioButton.css.js.map +1 -1
- package/dist/generated/themes/RangeSlider.css.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButton.css.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js.map +1 -1
- package/dist/generated/themes/Select.css.js +1 -1
- package/dist/generated/themes/Select.css.js.map +1 -1
- package/dist/generated/themes/SelectMenu.css.js +1 -1
- package/dist/generated/themes/SelectMenu.css.js.map +1 -1
- package/dist/generated/themes/SelectPopover.css.js +1 -1
- package/dist/generated/themes/SelectPopover.css.js.map +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js.map +1 -1
- package/dist/generated/themes/SplitButton.css.js +1 -1
- package/dist/generated/themes/SplitButton.css.js.map +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js.map +1 -1
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.css.js.map +1 -1
- package/dist/generated/themes/TabContainer.css.js +1 -1
- package/dist/generated/themes/TabContainer.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/generated/themes/TabInStrip.css.js +1 -1
- package/dist/generated/themes/TabInStrip.css.js.map +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js.map +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js.map +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCell.css.js +1 -1
- package/dist/generated/themes/TableCell.css.js.map +1 -1
- package/dist/generated/themes/TableColumn.css.js +1 -1
- package/dist/generated/themes/TableColumn.css.js.map +1 -1
- package/dist/generated/themes/TableGroupRow.css.js +1 -1
- package/dist/generated/themes/TableGroupRow.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/TimePicker.css.js +1 -1
- package/dist/generated/themes/TimePicker.css.js.map +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/Toast.css.js.map +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/Tokenizer.css.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js.map +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js.map +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js.map +1 -1
- package/dist/generated/themes/TreeItem.css.js +1 -1
- package/dist/generated/themes/TreeItem.css.js.map +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js.map +1 -1
- package/dist/generated/themes/WheelSlider.css.js +1 -1
- package/dist/generated/themes/WheelSlider.css.js.map +1 -1
- package/dist/generated/themes/YearPicker.css.js +1 -1
- package/dist/generated/themes/YearPicker.css.js.map +1 -1
- package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/dist/types/CalendarLegendItemType.d.ts +133 -0
- package/dist/types/CalendarLegendItemType.js +135 -0
- package/dist/types/CalendarLegendItemType.js.map +1 -0
- package/package.json +9 -9
- package/src/Button.hbs +1 -1
- package/src/Calendar.hbs +8 -0
- package/src/CalendarLegend.hbs +16 -0
- package/src/CalendarLegendItem.hbs +6 -0
- package/src/ColorPicker.hbs +1 -1
- package/src/DayPicker.hbs +4 -0
- package/src/Link.hbs +1 -1
- package/src/NavigationMenu.hbs +75 -83
- package/src/ProgressIndicator.hbs +1 -1
- package/src/SplitButton.hbs +0 -2
- package/src/Switch.hbs +0 -1
- package/src/TabContainerPopover.hbs +1 -1
- package/src/TabInOverflow.hbs +1 -4
- package/src/i18n/messagebundle.properties +12 -0
- package/src/i18n/messagebundle_ar.properties +6 -2
- package/src/i18n/messagebundle_bg.properties +8 -4
- package/src/i18n/messagebundle_ca.properties +7 -3
- package/src/i18n/messagebundle_cnr.properties +4 -0
- package/src/i18n/messagebundle_cs.properties +4 -0
- package/src/i18n/messagebundle_cy.properties +4 -0
- package/src/i18n/messagebundle_da.properties +4 -0
- package/src/i18n/messagebundle_de.properties +4 -0
- package/src/i18n/messagebundle_el.properties +4 -0
- package/src/i18n/messagebundle_en_GB.properties +4 -0
- package/src/i18n/messagebundle_es.properties +8 -4
- package/src/i18n/messagebundle_es_MX.properties +6 -2
- package/src/i18n/messagebundle_et.properties +4 -0
- package/src/i18n/messagebundle_fi.properties +5 -1
- package/src/i18n/messagebundle_fr.properties +4 -0
- package/src/i18n/messagebundle_fr_CA.properties +4 -0
- package/src/i18n/messagebundle_hi.properties +4 -0
- package/src/i18n/messagebundle_hr.properties +4 -0
- package/src/i18n/messagebundle_hu.properties +7 -3
- package/src/i18n/messagebundle_id.properties +5 -1
- package/src/i18n/messagebundle_it.properties +4 -0
- package/src/i18n/messagebundle_iw.properties +4 -0
- package/src/i18n/messagebundle_ja.properties +4 -0
- package/src/i18n/messagebundle_kk.properties +4 -0
- package/src/i18n/messagebundle_ko.properties +4 -0
- package/src/i18n/messagebundle_lt.properties +4 -0
- package/src/i18n/messagebundle_lv.properties +9 -5
- package/src/i18n/messagebundle_mk.properties +4 -0
- package/src/i18n/messagebundle_ms.properties +4 -0
- package/src/i18n/messagebundle_nl.properties +4 -0
- package/src/i18n/messagebundle_no.properties +4 -0
- package/src/i18n/messagebundle_pl.properties +4 -0
- package/src/i18n/messagebundle_pt.properties +6 -2
- package/src/i18n/messagebundle_pt_PT.properties +7 -3
- package/src/i18n/messagebundle_ro.properties +4 -0
- package/src/i18n/messagebundle_ru.properties +4 -0
- package/src/i18n/messagebundle_sh.properties +4 -0
- package/src/i18n/messagebundle_sk.properties +4 -0
- package/src/i18n/messagebundle_sl.properties +4 -0
- package/src/i18n/messagebundle_sr.properties +4 -0
- package/src/i18n/messagebundle_sv.properties +4 -0
- package/src/i18n/messagebundle_th.properties +4 -0
- package/src/i18n/messagebundle_tr.properties +4 -0
- package/src/i18n/messagebundle_uk.properties +4 -0
- package/src/i18n/messagebundle_vi.properties +4 -0
- package/src/i18n/messagebundle_zh_CN.properties +4 -0
- package/src/i18n/messagebundle_zh_TW.properties +4 -0
- package/src/themes/CalendarLegend.css +8 -0
- package/src/themes/CalendarLegendItem.css +158 -0
- package/src/themes/CardHeader.css +2 -0
- package/src/themes/ColorPicker.css +5 -5
- package/src/themes/DayPicker.css +214 -19
- package/src/themes/NavigationMenu.css +7 -1
- package/src/themes/SplitButton.css +1 -1
- package/src/themes/Switch.css +2 -2
- package/src/themes/TreeItem.css +2 -2
- package/src/themes/base/CalendarLegend-parameters.css +4 -0
- package/src/themes/base/CalendarLegendItem-parameters.css +7 -0
- package/src/themes/base/DayPicker-parameters.css +29 -0
- package/src/themes/base/sizes-parameters.css +36 -6
- package/src/themes/sap_belize/DayPicker-parameters.css +1 -1
- package/src/themes/sap_belize/parameters-bundle.css +2 -0
- package/src/themes/sap_belize_hcb/parameters-bundle.css +2 -0
- package/src/themes/sap_belize_hcw/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3/DayPicker-parameters.css +1 -1
- package/src/themes/sap_fiori_3/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3_dark/DayPicker-parameters.css +1 -1
- package/src/themes/sap_fiori_3_dark/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3_hcb/DayPicker-parameters.css +4 -2
- package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3_hcw/DayPicker-parameters.css +4 -2
- package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon/CalendarLegendItem-parameters.css +6 -0
- package/src/themes/sap_horizon/DayPicker-parameters.css +30 -8
- package/src/themes/sap_horizon/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon/sizes-parameters.css +17 -0
- package/src/themes/sap_horizon_dark/CalendarLegendItem-parameters.css +6 -0
- package/src/themes/sap_horizon_dark/DayPicker-parameters.css +33 -9
- package/src/themes/sap_horizon_dark/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon_dark/sizes-parameters.css +17 -3
- package/src/themes/sap_horizon_dark_exp/CalendarLegendItem-parameters.css +6 -0
- package/src/themes/sap_horizon_dark_exp/DayPicker-parameters.css +29 -8
- package/src/themes/sap_horizon_dark_exp/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon_dark_exp/sizes-parameters.css +7 -0
- package/src/themes/sap_horizon_exp/DayPicker-parameters.css +29 -8
- package/src/themes/sap_horizon_exp/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon_exp/sizes-parameters.css +7 -0
- package/src/themes/sap_horizon_hcb/DayPicker-parameters.css +50 -22
- package/src/themes/sap_horizon_hcb/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon_hcb/sizes-parameters.css +7 -0
- package/src/themes/sap_horizon_hcb_exp/DayPicker-parameters.css +49 -22
- package/src/themes/sap_horizon_hcb_exp/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon_hcb_exp/sizes-parameters.css +7 -0
- package/src/themes/sap_horizon_hcw/DayPicker-parameters.css +54 -29
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon_hcw/sizes-parameters.css +7 -0
- package/src/themes/sap_horizon_hcw_exp/DayPicker-parameters.css +53 -29
- package/src/themes/sap_horizon_hcw_exp/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon_hcw_exp/sizes-parameters.css +7 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
3
|
+
import CalendarLegendItemType from "./types/CalendarLegendItemType.js";
|
|
4
|
+
import CalendarLegendItem from "./CalendarLegendItem.js";
|
|
5
|
+
type CalendarLegendItemSelectionChangeEventDetail = {
|
|
6
|
+
item: CalendarLegendItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @class
|
|
10
|
+
*
|
|
11
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
12
|
+
*
|
|
13
|
+
* The <code>ui5-calendar-legend</code> component is designed for use within the <code>ui5-calendar</code> to display a legend.
|
|
14
|
+
* Each <code>ui5-calendar-legend-item</code> represents a unique date type, specifying its visual style
|
|
15
|
+
* and a corresponding textual label.
|
|
16
|
+
*
|
|
17
|
+
* <h3>ES6 Module Import</h3>
|
|
18
|
+
*
|
|
19
|
+
* <code>import "@ui5/webcomponents/dist/CalendarLegend.js";</code>
|
|
20
|
+
*
|
|
21
|
+
* @constructor
|
|
22
|
+
* @extends UI5Element
|
|
23
|
+
* @public
|
|
24
|
+
* @since 1.23.0
|
|
25
|
+
*/
|
|
26
|
+
declare class CalendarLegend extends UI5Element {
|
|
27
|
+
/**
|
|
28
|
+
* Hides the Today item in the legend.
|
|
29
|
+
*
|
|
30
|
+
* @default false
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
hideToday: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Hides the Selected day item in the legend.
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
hideSelectedDay: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Hides the Non-Working day item in the legend.
|
|
43
|
+
*
|
|
44
|
+
* @default false
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
hideNonWorkingDay: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Hides the Working day item in the legend.
|
|
50
|
+
*
|
|
51
|
+
* @default false
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
hideWorkingDay: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Defines the items of the component.
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
items: Array<CalendarLegendItem>;
|
|
60
|
+
_itemNavigation: ItemNavigation;
|
|
61
|
+
_lastFocusedItemIndex: number | null;
|
|
62
|
+
constructor();
|
|
63
|
+
onAfterRendering(): void;
|
|
64
|
+
_onMouseDown(e: MouseEvent): void;
|
|
65
|
+
_onFocusIn(e: FocusEvent): void;
|
|
66
|
+
_onFocusOut(): void;
|
|
67
|
+
_onItemKeyDown(e: KeyboardEvent): void;
|
|
68
|
+
get focusableElements(): CalendarLegendItem[];
|
|
69
|
+
get legendItems(): CalendarLegendItem[];
|
|
70
|
+
get defaultItemsMapping(): {
|
|
71
|
+
type: CalendarLegendItemType[];
|
|
72
|
+
hide: boolean;
|
|
73
|
+
}[];
|
|
74
|
+
}
|
|
75
|
+
export default CalendarLegend;
|
|
76
|
+
export type { CalendarLegendItemSelectionChangeEventDetail, };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
|
+
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
10
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
11
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
12
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
13
|
+
import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
14
|
+
import NavigationMode from "@ui5/webcomponents-base/dist/types/NavigationMode.js";
|
|
15
|
+
import { isDown, isUp, } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
16
|
+
import ItemNavigationBehavior from "@ui5/webcomponents-base/dist/types/ItemNavigationBehavior.js";
|
|
17
|
+
import CalendarLegendItemType from "./types/CalendarLegendItemType.js";
|
|
18
|
+
import CalendarLegendTemplate from "./generated/templates/CalendarLegendTemplate.lit.js";
|
|
19
|
+
import CalendarLegendItem from "./CalendarLegendItem.js";
|
|
20
|
+
// Styles
|
|
21
|
+
import CalendarLegendCss from "./generated/themes/CalendarLegend.css.js";
|
|
22
|
+
/**
|
|
23
|
+
* @class
|
|
24
|
+
*
|
|
25
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
26
|
+
*
|
|
27
|
+
* The <code>ui5-calendar-legend</code> component is designed for use within the <code>ui5-calendar</code> to display a legend.
|
|
28
|
+
* Each <code>ui5-calendar-legend-item</code> represents a unique date type, specifying its visual style
|
|
29
|
+
* and a corresponding textual label.
|
|
30
|
+
*
|
|
31
|
+
* <h3>ES6 Module Import</h3>
|
|
32
|
+
*
|
|
33
|
+
* <code>import "@ui5/webcomponents/dist/CalendarLegend.js";</code>
|
|
34
|
+
*
|
|
35
|
+
* @constructor
|
|
36
|
+
* @extends UI5Element
|
|
37
|
+
* @public
|
|
38
|
+
* @since 1.23.0
|
|
39
|
+
*/
|
|
40
|
+
let CalendarLegend = class CalendarLegend extends UI5Element {
|
|
41
|
+
constructor() {
|
|
42
|
+
super();
|
|
43
|
+
this._lastFocusedItemIndex = null;
|
|
44
|
+
}
|
|
45
|
+
onAfterRendering() {
|
|
46
|
+
if (!this._itemNavigation) {
|
|
47
|
+
this._itemNavigation = new ItemNavigation(this, {
|
|
48
|
+
navigationMode: NavigationMode.Horizontal,
|
|
49
|
+
behavior: ItemNavigationBehavior.Static,
|
|
50
|
+
getItemsCallback: () => this.focusableElements,
|
|
51
|
+
});
|
|
52
|
+
const focusableItemIndex = this._lastFocusedItemIndex !== null ? this._lastFocusedItemIndex : 0;
|
|
53
|
+
this._itemNavigation.setCurrentItem(this.focusableElements[focusableItemIndex]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
_onMouseDown(e) {
|
|
57
|
+
e.stopPropagation();
|
|
58
|
+
const target = e.target;
|
|
59
|
+
this._itemNavigation.setCurrentItem(target);
|
|
60
|
+
this._itemNavigation._focusCurrentItem();
|
|
61
|
+
this._lastFocusedItemIndex = this.focusableElements.indexOf(target);
|
|
62
|
+
}
|
|
63
|
+
_onFocusIn(e) {
|
|
64
|
+
const target = e.target;
|
|
65
|
+
this.fireEvent("_calendar-legend-selection-change", {
|
|
66
|
+
item: target,
|
|
67
|
+
});
|
|
68
|
+
this._lastFocusedItemIndex = this.focusableElements.indexOf(target);
|
|
69
|
+
}
|
|
70
|
+
_onFocusOut() {
|
|
71
|
+
this.fireEvent("_calendar-legend-focus-out");
|
|
72
|
+
}
|
|
73
|
+
_onItemKeyDown(e) {
|
|
74
|
+
const items = this.focusableElements;
|
|
75
|
+
const itemsCount = items.length;
|
|
76
|
+
const currentItem = e.target;
|
|
77
|
+
const currentIndex = items.indexOf(currentItem);
|
|
78
|
+
if (isDown(e)) {
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
const nextIndex = currentIndex + 1;
|
|
81
|
+
if (nextIndex < itemsCount) {
|
|
82
|
+
this._itemNavigation.setCurrentItem(items[nextIndex]);
|
|
83
|
+
this._itemNavigation._focusCurrentItem();
|
|
84
|
+
this._lastFocusedItemIndex = nextIndex;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (isUp(e)) {
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
const nextIndex = currentIndex - 1;
|
|
90
|
+
if (nextIndex >= 0) {
|
|
91
|
+
this._itemNavigation.setCurrentItem(items[nextIndex]);
|
|
92
|
+
this._itemNavigation._focusCurrentItem();
|
|
93
|
+
this._lastFocusedItemIndex = nextIndex;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
get focusableElements() {
|
|
98
|
+
const allFocusableItems = [...this.shadowRoot.querySelectorAll("[ui5-calendar-legend-item]"), ...this.legendItems];
|
|
99
|
+
return allFocusableItems;
|
|
100
|
+
}
|
|
101
|
+
get legendItems() {
|
|
102
|
+
const items = this.getSlottedNodes("items");
|
|
103
|
+
return items.filter(item => item instanceof CalendarLegendItem);
|
|
104
|
+
}
|
|
105
|
+
get defaultItemsMapping() {
|
|
106
|
+
const typeMapping = [
|
|
107
|
+
{ type: [CalendarLegendItemType.Today], hide: this.hideToday },
|
|
108
|
+
{ type: [CalendarLegendItemType.Selected], hide: this.hideSelectedDay },
|
|
109
|
+
{ type: [CalendarLegendItemType.Working], hide: this.hideWorkingDay },
|
|
110
|
+
{ type: [CalendarLegendItemType.NonWorking], hide: this.hideNonWorkingDay },
|
|
111
|
+
];
|
|
112
|
+
return typeMapping;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
__decorate([
|
|
116
|
+
property({ type: Boolean })
|
|
117
|
+
], CalendarLegend.prototype, "hideToday", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
property({ type: Boolean })
|
|
120
|
+
], CalendarLegend.prototype, "hideSelectedDay", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
property({ type: Boolean })
|
|
123
|
+
], CalendarLegend.prototype, "hideNonWorkingDay", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
property({ type: Boolean })
|
|
126
|
+
], CalendarLegend.prototype, "hideWorkingDay", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
slot({
|
|
129
|
+
type: HTMLElement,
|
|
130
|
+
invalidateOnChildChange: true,
|
|
131
|
+
individualSlots: true,
|
|
132
|
+
"default": true,
|
|
133
|
+
})
|
|
134
|
+
], CalendarLegend.prototype, "items", void 0);
|
|
135
|
+
CalendarLegend = __decorate([
|
|
136
|
+
customElement({
|
|
137
|
+
tag: "ui5-calendar-legend",
|
|
138
|
+
renderer: litRender,
|
|
139
|
+
styles: CalendarLegendCss,
|
|
140
|
+
template: CalendarLegendTemplate,
|
|
141
|
+
dependencies: [CalendarLegendItem],
|
|
142
|
+
}),
|
|
143
|
+
event("_calendar-legend-selection-change", {
|
|
144
|
+
detail: {
|
|
145
|
+
item: { type: CalendarLegendItem },
|
|
146
|
+
},
|
|
147
|
+
}),
|
|
148
|
+
event("_calendar-legend-focus-out")
|
|
149
|
+
], CalendarLegend);
|
|
150
|
+
CalendarLegend.define();
|
|
151
|
+
export default CalendarLegend;
|
|
152
|
+
//# sourceMappingURL=CalendarLegend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarLegend.js","sourceRoot":"","sources":["../src/CalendarLegend.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;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CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACF;AAS1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDACA;AAS5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACH;AAYzB;IANC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,uBAAuB,EAAE,IAAI;QAC7B,eAAe,EAAE,IAAI;QACrB,SAAS,EAAE,IAAI;KACd,CAAC;6CAC+B;AA/C7B,cAAc;IAbnB,aAAa,CAAC;QACd,GAAG,EAAE,qBAAqB;QAC1B,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,iBAAiB;QACzB,QAAQ,EAAE,sBAAsB;QAChC,YAAY,EAAE,CAAC,kBAAkB,CAAC;KAClC,CAAC;IACD,KAAK,CAA+C,mCAAmC,EAAE;QACzF,MAAM,EAAE;YACP,IAAI,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE;SAClC;KACD,CAAC;IACD,KAAK,CAAC,4BAA4B,CAAC;GAC9B,cAAc,CA8InB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport NavigationMode from \"@ui5/webcomponents-base/dist/types/NavigationMode.js\";\nimport {\n\tisDown,\n\tisUp,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport ItemNavigationBehavior from \"@ui5/webcomponents-base/dist/types/ItemNavigationBehavior.js\";\nimport CalendarLegendItemType from \"./types/CalendarLegendItemType.js\";\nimport CalendarLegendTemplate from \"./generated/templates/CalendarLegendTemplate.lit.js\";\nimport CalendarLegendItem from \"./CalendarLegendItem.js\";\n\n// Styles\nimport CalendarLegendCss from \"./generated/themes/CalendarLegend.css.js\";\n\ntype CalendarLegendItemSelectionChangeEventDetail = {\n\titem: CalendarLegendItem;\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-calendar-legend</code> component is designed for use within the <code>ui5-calendar</code> to display a legend.\n * Each <code>ui5-calendar-legend-item</code> represents a unique date type, specifying its visual style\n * and a corresponding textual label.\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CalendarLegend.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.23.0\n */\n@customElement({\n\ttag: \"ui5-calendar-legend\",\n\trenderer: litRender,\n\tstyles: CalendarLegendCss,\n\ttemplate: CalendarLegendTemplate,\n\tdependencies: [CalendarLegendItem],\n})\n@event<CalendarLegendItemSelectionChangeEventDetail>(\"_calendar-legend-selection-change\", {\n\tdetail: {\n\t\titem: { type: CalendarLegendItem },\n\t},\n})\n@event(\"_calendar-legend-focus-out\")\nclass CalendarLegend extends UI5Element {\n\t/**\n\t * Hides the Today item in the legend.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideToday!: boolean;\n\n\t/**\n\t * Hides the Selected day item in the legend.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideSelectedDay!: boolean;\n\n\t/**\n\t * Hides the Non-Working day item in the legend.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideNonWorkingDay!: boolean;\n\n\t/**\n\t * Hides the Working day item in the legend.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideWorkingDay!: boolean;\n\n\t/**\n\t * Defines the items of the component.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\tinvalidateOnChildChange: true,\n\t\tindividualSlots: true,\n\t\t\"default\": true,\n\t })\n\titems!: Array<CalendarLegendItem>;\n\n\t_itemNavigation!: ItemNavigation;\n\t_lastFocusedItemIndex: number | null;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._lastFocusedItemIndex = null;\n\t}\n\n\tonAfterRendering(): void {\n\t\tif (!this._itemNavigation) {\n\t\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\t\tnavigationMode: NavigationMode.Horizontal,\n\t\t\t\tbehavior: ItemNavigationBehavior.Static,\n\t\t\t\tgetItemsCallback: () => this.focusableElements,\n\t\t\t});\n\n\t\t\tconst focusableItemIndex = this._lastFocusedItemIndex !== null ? this._lastFocusedItemIndex : 0;\n\t\t\tthis._itemNavigation.setCurrentItem(this.focusableElements[focusableItemIndex]);\n\t\t}\n\t}\n\n\t_onMouseDown(e: MouseEvent) {\n\t\te.stopPropagation();\n\t\tconst target = e.target as CalendarLegendItem;\n\n\t\tthis._itemNavigation.setCurrentItem(target);\n\t\tthis._itemNavigation._focusCurrentItem();\n\t\tthis._lastFocusedItemIndex = this.focusableElements.indexOf(target);\n\t}\n\n\t_onFocusIn(e: FocusEvent) {\n\t\tconst target = e.target as CalendarLegendItem;\n\n\t\tthis.fireEvent<CalendarLegendItemSelectionChangeEventDetail>(\"_calendar-legend-selection-change\", {\n\t\t\titem: target,\n\t\t});\n\t\tthis._lastFocusedItemIndex = this.focusableElements.indexOf(target);\n\t}\n\n\t_onFocusOut() {\n\t\tthis.fireEvent(\"_calendar-legend-focus-out\");\n\t}\n\n\t_onItemKeyDown(e: KeyboardEvent) {\n\t\tconst items = this.focusableElements;\n\t\tconst itemsCount = items.length;\n\t\tconst currentItem = e.target as CalendarLegendItem;\n\t\tconst currentIndex = items.indexOf(currentItem);\n\n\t\tif (isDown(e)) {\n\t\t\te.preventDefault();\n\t\t\tconst nextIndex = currentIndex + 1;\n\n\t\t\tif (nextIndex < itemsCount) {\n\t\t\t\tthis._itemNavigation.setCurrentItem(items[nextIndex]);\n\t\t\t\tthis._itemNavigation._focusCurrentItem();\n\t\t\t\tthis._lastFocusedItemIndex = nextIndex;\n\t\t\t}\n\t\t}\n\n\t\tif (isUp(e)) {\n\t\t\te.preventDefault();\n\t\t\tconst nextIndex = currentIndex - 1;\n\n\t\t\tif (nextIndex >= 0) {\n\t\t\t\tthis._itemNavigation.setCurrentItem(items[nextIndex]);\n\t\t\t\tthis._itemNavigation._focusCurrentItem();\n\t\t\t\tthis._lastFocusedItemIndex = nextIndex;\n\t\t\t}\n\t\t}\n\t}\n\n\tget focusableElements() {\n\t\tconst allFocusableItems = [...this.shadowRoot!.querySelectorAll<CalendarLegendItem>(\"[ui5-calendar-legend-item]\"), ...this.legendItems];\n\t\treturn allFocusableItems;\n\t}\n\n\tget legendItems() {\n\t\tconst items = this.getSlottedNodes<CalendarLegendItem>(\"items\");\n\t\treturn items.filter(item => item instanceof CalendarLegendItem);\n\t}\n\n\tget defaultItemsMapping() {\n\t\tconst typeMapping = [\n\t\t\t{ type: [CalendarLegendItemType.Today], hide: this.hideToday },\n\t\t\t{ type: [CalendarLegendItemType.Selected], hide: this.hideSelectedDay },\n\t\t\t{ type: [CalendarLegendItemType.Working], hide: this.hideWorkingDay },\n\t\t\t{ type: [CalendarLegendItemType.NonWorking], hide: this.hideNonWorkingDay },\n\t\t];\n\n\t\treturn typeMapping;\n\t}\n}\n\nCalendarLegend.define();\n\nexport default CalendarLegend;\nexport type {\n\tCalendarLegendItemSelectionChangeEventDetail,\n};\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
3
|
+
import { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
4
|
+
import CalendarLegendItemType from "./types/CalendarLegendItemType.js";
|
|
5
|
+
/**
|
|
6
|
+
* @class
|
|
7
|
+
*
|
|
8
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
9
|
+
*
|
|
10
|
+
* <h3>Usage</h3>
|
|
11
|
+
* The <code>ui5-calendar-legend-item</code> is intended to be used within the <code>ui5-calendar-legend</code> component.
|
|
12
|
+
*
|
|
13
|
+
* <h3>ES6 Module Import</h3>
|
|
14
|
+
*
|
|
15
|
+
* <code>import "@ui5/webcomponents/dist/CalendarLegendItem.js";</code>
|
|
16
|
+
*
|
|
17
|
+
* @constructor
|
|
18
|
+
* @extends UI5Element
|
|
19
|
+
* @since 1.23.0
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
declare class CalendarLegendItem extends UI5Element implements ITabbable {
|
|
23
|
+
/**
|
|
24
|
+
* Defines the text content of the Calendar Legend Item.
|
|
25
|
+
* @default ""
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
text: string;
|
|
29
|
+
/**
|
|
30
|
+
* Defines the type of the Calendar Legend Item.
|
|
31
|
+
*
|
|
32
|
+
* @default "None"
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
type: `${CalendarLegendItemType}`;
|
|
36
|
+
/**
|
|
37
|
+
* Tab index of the component.
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
forcedTabIndex: string;
|
|
41
|
+
static i18nBundle: I18nBundle;
|
|
42
|
+
static onDefine(): Promise<void>;
|
|
43
|
+
get effectiveText(): string;
|
|
44
|
+
}
|
|
45
|
+
export default CalendarLegendItem;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var CalendarLegendItem_1;
|
|
8
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
9
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
10
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
11
|
+
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
12
|
+
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
13
|
+
import "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
14
|
+
import CalendarLegendItemType from "./types/CalendarLegendItemType.js";
|
|
15
|
+
import { CAL_LEGEND_TODAY_TEXT, CAL_LEGEND_SELECTED_TEXT, CAL_LEGEND_WORKING_DAY_TEXT, CAL_LEGEND_NON_WORKING_DAY_TEXT, } from "./generated/i18n/i18n-defaults.js";
|
|
16
|
+
import CalendarLegendItemTemplate from "./generated/templates/CalendarLegendItemTemplate.lit.js";
|
|
17
|
+
// Styles
|
|
18
|
+
import CalendarLegendItemCss from "./generated/themes/CalendarLegendItem.css.js";
|
|
19
|
+
/**
|
|
20
|
+
* @class
|
|
21
|
+
*
|
|
22
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
23
|
+
*
|
|
24
|
+
* <h3>Usage</h3>
|
|
25
|
+
* The <code>ui5-calendar-legend-item</code> is intended to be used within the <code>ui5-calendar-legend</code> component.
|
|
26
|
+
*
|
|
27
|
+
* <h3>ES6 Module Import</h3>
|
|
28
|
+
*
|
|
29
|
+
* <code>import "@ui5/webcomponents/dist/CalendarLegendItem.js";</code>
|
|
30
|
+
*
|
|
31
|
+
* @constructor
|
|
32
|
+
* @extends UI5Element
|
|
33
|
+
* @since 1.23.0
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
let CalendarLegendItem = CalendarLegendItem_1 = class CalendarLegendItem extends UI5Element {
|
|
37
|
+
static async onDefine() {
|
|
38
|
+
CalendarLegendItem_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
|
|
39
|
+
}
|
|
40
|
+
get effectiveText() {
|
|
41
|
+
const TodayI18n = CalendarLegendItem_1.i18nBundle.getText(CAL_LEGEND_TODAY_TEXT);
|
|
42
|
+
const SelectedI18n = CalendarLegendItem_1.i18nBundle.getText(CAL_LEGEND_SELECTED_TEXT);
|
|
43
|
+
const WorkingI18n = CalendarLegendItem_1.i18nBundle.getText(CAL_LEGEND_WORKING_DAY_TEXT);
|
|
44
|
+
const NonWorkingI18n = CalendarLegendItem_1.i18nBundle.getText(CAL_LEGEND_NON_WORKING_DAY_TEXT);
|
|
45
|
+
const typeMapping = {
|
|
46
|
+
[CalendarLegendItemType.Today]: TodayI18n,
|
|
47
|
+
[CalendarLegendItemType.Selected]: SelectedI18n,
|
|
48
|
+
[CalendarLegendItemType.NonWorking]: NonWorkingI18n,
|
|
49
|
+
[CalendarLegendItemType.Working]: WorkingI18n,
|
|
50
|
+
};
|
|
51
|
+
return typeMapping[this.type] || this.text || this.type;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
__decorate([
|
|
55
|
+
property()
|
|
56
|
+
], CalendarLegendItem.prototype, "text", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
property({ type: CalendarLegendItemType, defaultValue: CalendarLegendItemType.None })
|
|
59
|
+
], CalendarLegendItem.prototype, "type", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
property({ defaultValue: "-1", noAttribute: true })
|
|
62
|
+
], CalendarLegendItem.prototype, "forcedTabIndex", void 0);
|
|
63
|
+
CalendarLegendItem = CalendarLegendItem_1 = __decorate([
|
|
64
|
+
customElement({
|
|
65
|
+
tag: "ui5-calendar-legend-item",
|
|
66
|
+
renderer: litRender,
|
|
67
|
+
styles: CalendarLegendItemCss,
|
|
68
|
+
template: CalendarLegendItemTemplate,
|
|
69
|
+
})
|
|
70
|
+
], CalendarLegendItem);
|
|
71
|
+
CalendarLegendItem.define();
|
|
72
|
+
export default CalendarLegendItem;
|
|
73
|
+
//# sourceMappingURL=CalendarLegendItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarLegendItem.js","sourceRoot":"","sources":["../src/CalendarLegendItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAA0B,yDAAyD,CAAC;AACpF,OAAO,sBAAsB,MAAM,mCAAmC,CAAC;AACvE,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,2BAA2B,EAC3B,+BAA+B,GAC/B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,0BAA0B,MAAM,yDAAyD,CAAC;AAEjG,SAAS;AACT,OAAO,qBAAqB,MAAM,8CAA8C,CAAC;AAEjF;;;;;;;;;;;;;;;;GAgBG;AAQH,IAAM,kBAAkB,0BAAxB,MAAM,kBAAmB,SAAQ,UAAU;IA2B1C,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpB,oBAAkB,CAAC,UAAU,GAAG,MAAM,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,aAAa;QAChB,MAAM,SAAS,GAAG,oBAAkB,CAAC,UAAU,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAC/E,MAAM,YAAY,GAAG,oBAAkB,CAAC,UAAU,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACrF,MAAM,WAAW,GAAG,oBAAkB,CAAC,UAAU,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;QACvF,MAAM,cAAc,GAAG,oBAAkB,CAAC,UAAU,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC;QAE9F,MAAM,WAAW,GAAG;YACnB,CAAC,sBAAsB,CAAC,KAAK,CAAC,EAAE,SAAS;YACzC,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE,YAAY;YAC/C,CAAC,sBAAsB,CAAC,UAAU,CAAC,EAAE,cAAc;YACnD,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,WAAW;SAC7C,CAAC;QAEF,OAAO,WAAW,CAAC,IAAI,CAAC,IAAgC,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC;IACrF,CAAC;CACD,CAAA;AAvCA;IADC,QAAQ,EAAE;gDACG;AASd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,YAAY,EAAE,sBAAsB,CAAC,IAAI,EAAE,CAAC;gDACnD;AAOnC;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0DAC5B;AAvBnB,kBAAkB;IAPvB,aAAa,CAAC;QACd,GAAG,EAAE,0BAA0B;QAC/B,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,qBAAqB;QAC7B,QAAQ,EAAE,0BAA0B;KACpC,CAAC;GAEI,kBAAkB,CA8CvB;AAED,kBAAkB,CAAC,MAAM,EAAE,CAAC;AAE5B,eAAe,kBAAkB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport CalendarLegendItemType from \"./types/CalendarLegendItemType.js\";\nimport {\n\tCAL_LEGEND_TODAY_TEXT,\n\tCAL_LEGEND_SELECTED_TEXT,\n\tCAL_LEGEND_WORKING_DAY_TEXT,\n\tCAL_LEGEND_NON_WORKING_DAY_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport CalendarLegendItemTemplate from \"./generated/templates/CalendarLegendItemTemplate.lit.js\";\n\n// Styles\nimport CalendarLegendItemCss from \"./generated/themes/CalendarLegendItem.css.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * <h3>Usage</h3>\n * The <code>ui5-calendar-legend-item</code> is intended to be used within the <code>ui5-calendar-legend</code> component.\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CalendarLegendItem.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @since 1.23.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-calendar-legend-item\",\n\trenderer: litRender,\n\tstyles: CalendarLegendItemCss,\n\ttemplate: CalendarLegendItemTemplate,\n})\n\nclass CalendarLegendItem extends UI5Element implements ITabbable {\n\t/**\n\t * Defines the text content of the Calendar Legend Item.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\ttext!: string;\n\n\t/**\n\t * Defines the type of the Calendar Legend Item.\n\t *\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property({ type: CalendarLegendItemType, defaultValue: CalendarLegendItemType.None })\n\ttype!: `${CalendarLegendItemType}`;\n\n\t/**\n\t * Tab index of the component.\n\t * @private\n\t */\n\t@property({ defaultValue: \"-1\", noAttribute: true })\n\tforcedTabIndex!: string;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tCalendarLegendItem.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tget effectiveText() {\n\t\tconst TodayI18n = CalendarLegendItem.i18nBundle.getText(CAL_LEGEND_TODAY_TEXT);\n\t\tconst SelectedI18n = CalendarLegendItem.i18nBundle.getText(CAL_LEGEND_SELECTED_TEXT);\n\t\tconst WorkingI18n = CalendarLegendItem.i18nBundle.getText(CAL_LEGEND_WORKING_DAY_TEXT);\n\t\tconst NonWorkingI18n = CalendarLegendItem.i18nBundle.getText(CAL_LEGEND_NON_WORKING_DAY_TEXT);\n\n\t\tconst typeMapping = {\n\t\t\t[CalendarLegendItemType.Today]: TodayI18n,\n\t\t\t[CalendarLegendItemType.Selected]: SelectedI18n,\n\t\t\t[CalendarLegendItemType.NonWorking]: NonWorkingI18n,\n\t\t\t[CalendarLegendItemType.Working]: WorkingI18n,\n\t\t};\n\n\t\treturn typeMapping[this.type as keyof typeof typeMapping] || this.text || this.type;\n\t}\n}\n\nCalendarLegendItem.define();\n\nexport default CalendarLegendItem;\n"]}
|
package/dist/DatePicker.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import type FormSupportT from "./features/InputElementsFormSupport.js";
|
|
|
5
5
|
import type { IFormElement } from "./features/InputElementsFormSupport.js";
|
|
6
6
|
import "@ui5/webcomponents-icons/dist/appointment-2.js";
|
|
7
7
|
import "@ui5/webcomponents-icons/dist/decline.js";
|
|
8
|
-
import HasPopup from "./types/HasPopup.js";
|
|
9
8
|
import DateComponentBase from "./DateComponentBase.js";
|
|
10
9
|
import ResponsivePopover from "./ResponsivePopover.js";
|
|
11
10
|
import type { CalendarSelectedDatesChangeEventDetail } from "./Calendar.js";
|
|
@@ -326,7 +325,7 @@ declare class DatePicker extends DateComponentBase implements IFormElement {
|
|
|
326
325
|
get showFooter(): boolean;
|
|
327
326
|
get accInfo(): {
|
|
328
327
|
ariaRoledescription: string;
|
|
329
|
-
ariaHasPopup:
|
|
328
|
+
ariaHasPopup: string;
|
|
330
329
|
ariaAutoComplete: string;
|
|
331
330
|
ariaRequired: boolean;
|
|
332
331
|
ariaLabel: string | undefined;
|
package/dist/DatePicker.js
CHANGED
|
@@ -397,7 +397,7 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
|
|
|
397
397
|
get accInfo() {
|
|
398
398
|
return {
|
|
399
399
|
"ariaRoledescription": this.dateAriaDescription,
|
|
400
|
-
"ariaHasPopup": HasPopup.Grid,
|
|
400
|
+
"ariaHasPopup": HasPopup.Grid.toLowerCase(),
|
|
401
401
|
"ariaAutoComplete": "none",
|
|
402
402
|
"ariaRequired": this.required,
|
|
403
403
|
"ariaLabel": getEffectiveAriaLabelText(this),
|
package/dist/DatePicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../src/DatePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAuB,oDAAoD,CAAC;AAC5E,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,mBAAmB,MAAM,mEAAmE,CAAC;AACpG,OAAO,oBAAoB,MAAM,oEAAoE,CAAC;AACtG,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EACN,QAAQ,EACR,UAAU,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,EACN,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,EACb,QAAQ,EACR,YAAY,GACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,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AAoB;SACpB;QACD,YAAY,EAAE;YACb,IAAI;YACJ,iBAAiB;YACjB,QAAQ;YACR,qBAAqB;YACrB,KAAK;YACL,MAAM;SACN;KACD,CAAC;IACF;;;;;;;MAOE;;IACD,KAAK,CAA8B,QAAQ,EAAE;QAC7C,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IACF;;;;;;;MAOE;;IACD,KAAK,CAA6B,OAAO,EAAE;QAC3C,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IACF;;;;;;;;;OASG;;IACF,KAAK,CAAwC,oBAAoB,EAAE;QACnE,MAAM,EAAE;YACP;;eAEG;YACH,UAAU,EAAE;gBACX,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;GACI,UAAU,CA8nBf;AAED,UAAU,CAAC,MAAM,EAAE,CAAC;AAEpB,eAAe,UAAU,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport modifyDateBy from \"@ui5/webcomponents-localization/dist/dates/modifyDateBy.js\";\nimport getRoundedTimestamp from \"@ui5/webcomponents-localization/dist/dates/getRoundedTimestamp.js\";\nimport getTodayUTCTimestamp from \"@ui5/webcomponents-localization/dist/dates/getTodayUTCTimestamp.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport {\n\tisPageUp,\n\tisPageDown,\n\tisPageUpShift,\n\tisPageDownShift,\n\tisPageUpShiftCtrl,\n\tisPageDownShiftCtrl,\n\tisShow,\n\tisF4,\n\tisEnter,\n\tisTabNext,\n\tisTabPrevious,\n\tisF6Next,\n\tisF6Previous,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isPhone, isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\nimport type FormSupportT from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\nimport \"@ui5/webcomponents-icons/dist/appointment-2.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport HasPopup from \"./types/HasPopup.js\";\nimport { DATEPICKER_OPEN_ICON_TITLE, DATEPICKER_DATE_DESCRIPTION, INPUT_SUGGESTIONS_TITLE } from \"./generated/i18n/i18n-defaults.js\";\nimport DateComponentBase from \"./DateComponentBase.js\";\nimport Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport Calendar from \"./Calendar.js\";\nimport type { CalendarSelectedDatesChangeEventDetail } from \"./Calendar.js\";\nimport CalendarDateComponent from \"./CalendarDate.js\";\nimport Input from \"./Input.js\";\nimport InputType from \"./types/InputType.js\";\nimport DatePickerTemplate from \"./generated/templates/DatePickerTemplate.lit.js\";\nimport DatePickerPopoverTemplate from \"./generated/templates/DatePickerPopoverTemplate.lit.js\";\n\n// default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Styles\nimport datePickerCss from \"./generated/themes/DatePicker.css.js\";\nimport datePickerPopoverCss from \"./generated/themes/DatePickerPopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\n\ntype DatePickerChangeEventDetail = {\n\tvalue: string,\n\tvalid: boolean,\n}\n\ntype DatePickerValueStateChangeEventDetail = {\n\tvalueState: `${ValueState}`,\n\tvalid: boolean,\n}\n\ntype DatePickerInputEventDetail = {\n\tvalue: string,\n\tvalid: boolean,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-date-picker</code> component provides an input field with assigned calendar which opens on user action.\n * The <code>ui5-date-picker</code> allows users to select a localized date using touch,\n * mouse, or keyboard input. It consists of two parts: the date input field and the\n * date picker.\n *\n * <h3>Usage</h3>\n *\n * The user can enter a date by:\n * <ul>\n * <li>Using the calendar that opens in a popup</li>\n * <li>Typing it in directly in the input field</li>\n * </ul>\n * <br><br>\n * When the user makes an entry and presses the enter key, the calendar shows the corresponding date.\n * When the user directly triggers the calendar display, the actual date is displayed.\n *\n * <h3>Formatting</h3>\n *\n * If a date is entered by typing it into\n * the input field, it must fit to the used date format.\n * <br><br>\n * Supported format options are pattern-based on Unicode LDML Date Format notation.\n * For more information, see <ui5-link target=\"_blank\" href=\"http://unicode.org/reports/tr35/#Date_Field_Symbol_Table\">UTS #35: Unicode Locale Data Markup Language</ui5-link>.\n * <br><br>\n * For example, if the <code>format-pattern</code> is \"yyyy-MM-dd\",\n * a valid value string is \"2015-07-30\" and the same is displayed in the input.\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-date-picker</code> provides advanced keyboard handling.\n * If the <code>ui5-date-picker</code> is focused,\n * you can open or close the drop-down by pressing <code>F4</code>, <code>ALT+UP</code> or <code>ALT+DOWN</code> keys.\n * Once the drop-down is opened, you can use the <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code> arrow keys\n * to navigate through the dates and select one by pressing the <code>Space</code> or <code>Enter</code> keys. Moreover you can\n * use TAB to reach the buttons for changing month and year.\n * <br>\n *\n * If the <code>ui5-date-picker</code> input field is focused and its corresponding picker dialog is not opened,\n * then users can increment or decrement the date referenced by <code>dateValue</code> property\n * by using the following shortcuts:\n * <br>\n * <ul>\n * <li>[PAGEDOWN] - Decrements the corresponding day of the month by one</li>\n * <li>[SHIFT] + [PAGEDOWN] - Decrements the corresponding month by one</li>\n * <li>[SHIFT] + [CTRL] + [PAGEDOWN] - Decrements the corresponding year by one</li>\n * <li>[PAGEUP] - Increments the corresponding day of the month by one</li>\n * <li>[SHIFT] + [PAGEUP] - Increments the corresponding month by one</li>\n * <li>[SHIFT] + [CTRL] + [PAGEUP] - Increments the corresponding year by one</li>\n * </ul>\n *\n * <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <pre><code><script data-id=\"sap-ui-config\" type=\"application/json\">\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * </script></code></pre>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/DatePicker\";</code>\n *\n * @constructor\n * @extends DateComponentBase\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-date-picker\",\n\tlanguageAware: true,\n\ttemplate: DatePickerTemplate,\n\tstaticAreaTemplate: DatePickerPopoverTemplate,\n\tstyles: datePickerCss,\n\tstaticAreaStyles: [\n\t\tResponsivePopoverCommonCss,\n\t\tdatePickerPopoverCss,\n\t],\n\tdependencies: [\n\t\tIcon,\n\t\tResponsivePopover,\n\t\tCalendar,\n\t\tCalendarDateComponent,\n\t\tInput,\n\t\tButton,\n\t],\n})\n/**\n * Fired when the input operation has finished by pressing Enter or on focusout.\n *\n * @allowPreventDefault\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n*/\n@event<DatePickerChangeEventDetail>(\"change\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n/**\n * Fired when the value of the component is changed at each key stroke.\n *\n * @allowPreventDefault\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n*/\n@event<DatePickerInputEventDetail>(\"input\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n/**\n * Fired before the value state of the component is updated internally.\n * The event is preventable, meaning that if it's default action is\n * prevented, the component will not update the value state.\n *\n * @allowPreventDefault\n * @public\n * @param {string} valueState The new <code>valueState</code> that will be set.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n */\n@event<DatePickerValueStateChangeEventDetail>(\"value-state-change\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalueState: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\nclass DatePicker extends DateComponentBase implements IFormElement {\n\t/**\n\t * Defines a formatted date value.\n\t *\n\t * @default \"\"\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue!: string\n\n\t/**\n\t * Defines the value state of the component.\n\t *\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: `${ValueState}`;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @since 1.0.0-rc.9\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t * Determines whether the component is displayed as disabled.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Determines whether the component is displayed as read-only.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Defines a short hint, intended to aid the user with data entry when the\n\t * component has no value.\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When no placeholder is set, the format pattern is displayed as a placeholder.\n\t * Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ defaultValue: undefined })\n\tplaceholder?: string;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Defines the aria-label attribute for the component.\n\t *\n\t * @default \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t *\n\t * @default \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ defaultValue: \"\" })\n\taccessibleNameRef!: string;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_isPickerOpen!: boolean;\n\n\t@property({ type: Object })\n\t_respPopoverConfig!: object;\n\n\t@property({ defaultValue: \"day\" })\n\t_calendarCurrentPicker!: string;\n\n\tliveValue?: string;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> If not specified, a default text (in the respective language) will be displayed.\n\t * <br>\n\t * <b>Note:</b> The <code>valueStateMessage</code> would be displayed,\n\t * when the component is in <code>Information</code>, <code>Warning</code> or <code>Error</code> value state.\n\t *\n\t * @since 1.0.0-rc.7\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t *\n\t * @private\n\t */\n\t@slot({ type: HTMLElement })\n\tformSupport!: Array<HTMLElement>;\n\n\tresponsivePopover?: ResponsivePopover;\n\n\tFormSupport?: typeof FormSupportT;\n\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @protected\n\t */\n\tonResponsivePopoverAfterClose() {\n\t\tthis._isPickerOpen = false;\n\t\tif (isPhone()) {\n\t\t\tthis.blur(); // close device's keyboard and prevent further typing\n\t\t} else {\n\t\t\tthis._getInput()?.focus();\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.FormSupport = getFeature<typeof FormSupportT>(\"FormSupport\");\n\n\t\t[\"minDate\", \"maxDate\"].forEach((prop: string) => {\n\t\t\tconst propValue = this[prop as keyof DatePicker] as string;\n\n\t\t\tif (!this.isValid(propValue)) {\n\t\t\t\tconsole.warn(`Invalid value for property \"${prop}\": ${propValue} is not compatible with the configured format pattern: \"${this._displayFormat}\"`); // eslint-disable-line\n\t\t\t}\n\t\t});\n\n\t\tif (this.FormSupport) {\n\t\t\tthis.FormSupport.syncNativeHiddenInput(this);\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\n\t\tthis.value = this.normalizeValue(this.value) || this.value;\n\t\tthis.liveValue = this.value;\n\t}\n\n\t/**\n\t * Override in derivatives to change calendar selection mode\n\t *\n\t * @protected\n\t */\n\tget _calendarSelectionMode(): string {\n\t\treturn \"Single\";\n\t}\n\n\t/**\n\t * Used to provide a timestamp to the Calendar (to focus it to a relevant date when open) based on the component's state\n\t * Override in derivatives to provide the calendar a timestamp based on their properties\n\t * By default focus the calendar on the selected date if set, or the current day otherwise\n\t *\n\t * @protected\n\t */\n\tget _calendarTimestamp(): number {\n\t\tif (this.value && this.dateValueUTC && this._checkValueValidity(this.value)) {\n\t\t\tconst millisecondsUTC = this.dateValueUTC.getTime();\n\t\t\treturn getRoundedTimestamp(millisecondsUTC);\n\t\t}\n\n\t\treturn getTodayUTCTimestamp(this._primaryCalendarType);\n\t}\n\n\t/**\n\t * Used to provide selectedDates to the calendar based on the component's state\n\t * Override in derivatives to provide different rules for setting the calendar's selected dates\n\t *\n\t * @protected\n\t */\n\tget _calendarSelectedDates(): Array<string> {\n\t\tif (this.value && this._checkValueValidity(this.value)) {\n\t\t\treturn [this.value];\n\t\t}\n\n\t\treturn [];\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isShow(e)) {\n\t\t\te.preventDefault(); // Prevent scroll on Alt/Option + Arrow Up/Down\n\t\t\tif (this.isOpen()) {\n\t\t\t\tif (!isF4(e)) {\n\t\t\t\t\tthis._toggleAndFocusInput();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._toggleAndFocusInput();\n\t\t\t}\n\t\t}\n\n\t\tif ((this._getInput().isEqualNode(e.target as Node) && this.isOpen()) && (isTabNext(e) || isTabPrevious(e) || isF6Next(e) || isF6Previous(e))) {\n\t\t\tthis.closePicker();\n\t\t}\n\n\t\tif (this.isOpen()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tif (this.FormSupport) {\n\t\t\t\tthis.FormSupport.triggerFormSubmit(this);\n\t\t\t}\n\t\t} else if (isPageUpShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"year\");\n\t\t} else if (isPageUpShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"month\");\n\t\t} else if (isPageUp(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"day\");\n\t\t} else if (isPageDownShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"year\");\n\t\t} else if (isPageDownShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"month\");\n\t\t} else if (isPageDown(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"day\");\n\t\t}\n\t}\n\n\t/**\n\t * @param amount\n\t * @param unit\n\t * @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)\n\t * @protected\n\t */\n\t_modifyDateValue(amount: number, unit: string, preserveDate?: boolean) {\n\t\tif (!this.dateValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modifiedDate = modifyDateBy(CalendarDate.fromLocalJSDate(this.dateValue), amount, unit, preserveDate, this._minDate, this._maxDate);\n\t\tconst newValue = this.formatValue(modifiedDate.toUTCJSDate());\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t_updateValueAndFireEvents(value: string, normalizeValue: boolean, events: Array<string>, updateValue = true) {\n\t\tconst valid = this._checkValueValidity(value);\n\n\t\tif (valid && normalizeValue) {\n\t\t\tvalue = this.normalizeValue(value); // transform valid values (in any format) to the correct format\n\t\t}\n\n\t\tlet executeEvent = true;\n\t\tthis.liveValue = value;\n\n\t\tconst previousValue = this.value;\n\n\t\tif (updateValue) {\n\t\t\tthis._getInput().value = value;\n\t\t\tthis.value = value;\n\t\t\tthis._updateValueState(); // Change the value state to Error/None, but only if needed\n\t\t}\n\n\t\tevents.forEach((e: string) => {\n\t\t\tif (!this.fireEvent<DatePickerChangeEventDetail>(e, { value, valid }, true)) {\n\t\t\t\texecuteEvent = false;\n\t\t\t}\n\t\t});\n\n\t\tif (!executeEvent && updateValue) {\n\t\t\tif (this.value !== previousValue && this.value !== this._getInput().value) {\n\t\t\t\treturn; // If the value was changed in the change event, do not revert it\n\t\t\t}\n\n\t\t\tthis._getInput().value = previousValue;\n\n\t\t\tthis.value = previousValue;\n\t\t}\n\t}\n\n\t_updateValueState() {\n\t\tconst valid = this._checkValueValidity(this.value);\n\t\tconst previousValueState = this.valueState;\n\n\t\tthis.valueState = valid ? ValueState.None : ValueState.Error;\n\n\t\tconst eventPrevented = !this.fireEvent<DatePickerValueStateChangeEventDetail>(\"value-state-change\", { valueState: this.valueState, valid }, true);\n\n\t\tif (eventPrevented) {\n\t\t\tthis.valueState = previousValueState;\n\t\t}\n\t}\n\n\t_toggleAndFocusInput() {\n\t\tthis.togglePicker();\n\t\tthis._getInput().focus();\n\t}\n\n\t_getInput(): Input {\n\t\treturn this.shadowRoot!.querySelector<Input>(\"[ui5-input]\")!;\n\t}\n\n\t/**\n\t * The ui5-input \"submit\" event handler - fire change event when the user presses enter\n\t *\n\t * @protected\n\t */\n\t_onInputSubmit() {}\n\n\t/**\n\t * The ui5-input \"change\" event handler - fire change event when the user focuses out of the input\n\t *\n\t * @protected\n\t */\n\t_onInputChange(e: Event) {\n\t\tthis._updateValueAndFireEvents((e.target as DatePicker).value, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t/**\n\t * The ui5-input \"input\" event handler - fire input even when the user types\n\t *\n\t * @protected\n\t */\n\t_onInputInput(e: KeyboardEvent) {\n\t\tthis._updateValueAndFireEvents((e.target as DatePicker).value, false, [\"input\"], false);\n\t}\n\n\t/**\n\t * Checks if the provided value is valid and within valid range.\n\t *\n\t * @protected\n\t * @param value\n\t */\n\t_checkValueValidity(value: string): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn this.isValid(value) && this.isInValidRange(value);\n\t}\n\n\t_click(e: MouseEvent) {\n\t\tif (isPhone()) {\n\t\t\tthis.responsivePopover!.showAt(this);\n\t\t\te.preventDefault(); // prevent immediate selection of any item\n\t\t}\n\t}\n\n\t/**\n\t * Checks if a value is valid against the current date format of the DatePicker.\n\t *\n\t * @public\n\t * @param value A value to be tested against the current date format\n\t */\n\tisValid(value: string): boolean {\n\t\tif (value === \"\" || value === undefined) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn !!this.getFormat().parse(value);\n\t}\n\n\t/**\n\t * Checks if a date is between the minimum and maximum date.\n\t *\n\t * @public\n\t * @param value A value to be checked\n\t */\n\tisInValidRange(value: string): boolean {\n\t\tif (value === \"\" || value === undefined) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst calendarDate = this._getCalendarDateFromString(value);\n\n\t\tif (!calendarDate || !this._minDate || !this._maxDate) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn calendarDate.valueOf() >= this._minDate.valueOf() && calendarDate.valueOf() <= this._maxDate.valueOf();\n\t}\n\n\t/**\n\t * The parser understands many formats, but we need one format\n\t *\n\t * @protected\n\t */\n\tnormalizeValue(value: string) {\n\t\tif (value === \"\") {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn this.getFormat().format(this.getFormat().parse(value, true), true); // it is important to both parse and format the date as UTC\n\t}\n\n\tget _displayFormat(): string {\n\t\t// @ts-ignore oFormatOptions is a private API of DateFormat\n\t\treturn this.getFormat().oFormatOptions.pattern as string;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget _placeholder() {\n\t\treturn this.placeholder !== undefined ? this.placeholder : this._displayFormat;\n\t}\n\n\tget _headerTitleText() {\n\t\treturn DatePicker.i18nBundle.getText(INPUT_SUGGESTIONS_TITLE);\n\t}\n\n\tget phone() {\n\t\treturn isPhone();\n\t}\n\n\tget showHeader() {\n\t\treturn this.phone;\n\t}\n\n\tget showFooter() {\n\t\treturn this.phone;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"ariaRoledescription\": this.dateAriaDescription,\n\t\t\t\"ariaHasPopup\": HasPopup.Grid,\n\t\t\t\"ariaAutoComplete\": \"none\",\n\t\t\t\"ariaRequired\": this.required,\n\t\t\t\"ariaLabel\": getEffectiveAriaLabelText(this),\n\t\t};\n\t}\n\n\tget openIconTitle() {\n\t\treturn DatePicker.i18nBundle.getText(DATEPICKER_OPEN_ICON_TITLE);\n\t}\n\n\tget openIconName() {\n\t\treturn \"appointment-2\";\n\t}\n\n\tget dateAriaDescription() {\n\t\treturn DatePicker.i18nBundle.getText(DATEPICKER_DATE_DESCRIPTION);\n\t}\n\n\t/**\n\t * Defines whether the dialog on mobile should have header\n\t *\n\t * @private\n\t */\n\tget _shouldHideHeader() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Defines whether the value help icon is hidden\n\t *\n\t * @private\n\t */\n\tget _ariaHidden() {\n\t\treturn isDesktop();\n\t}\n\n\tasync _respPopover() {\n\t\tconst staticAreaItem = await this.getStaticAreaItemDomRef();\n\t\treturn staticAreaItem!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t_canOpenPicker() {\n\t\treturn !this.disabled && !this.readonly;\n\t}\n\n\tget _calendarPickersMode() {\n\t\tconst format = this.getFormat() as DateFormat & { aFormatArray: Array<{type: string}> };\n\t\tconst patternSymbolTypes = format.aFormatArray.map(patternSymbolSettings => {\n\t\t\treturn patternSymbolSettings.type.toLowerCase();\n\t\t});\n\n\t\tif (patternSymbolTypes.includes(\"day\")) {\n\t\t\treturn CalendarPickersMode.DAY_MONTH_YEAR;\n\t\t}\n\n\t\tif (patternSymbolTypes.includes(\"month\") || patternSymbolTypes.includes(\"monthstandalone\")) {\n\t\t\treturn CalendarPickersMode.MONTH_YEAR;\n\t\t}\n\n\t\treturn CalendarPickersMode.YEAR;\n\t}\n\n\t/**\n\t * The user selected a new date in the calendar\n\t *\n\t * @param e\n\t * @protected\n\t */\n\tonSelectedDatesChange(e: CustomEvent<CalendarSelectedDatesChangeEventDetail>) {\n\t\te.preventDefault();\n\t\tconst newValue = e.detail.values && e.detail.values[0];\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\n\t\tthis.closePicker();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress() {\n\t\tthis._calendarCurrentPicker = \"month\";\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress() {\n\t\tthis._calendarCurrentPicker = \"year\";\n\t}\n\n\t/**\n\t * Formats a Java Script date object into a string representing a locale date\n\t * according to the <code>formatPattern</code> property of the DatePicker instance\n\t *\n\t * @public\n\t * @param date A Java Script date object to be formatted as string\n\t * @returns The date as string\n\t */\n\tformatValue(date: Date): string {\n\t\treturn this.getFormat().format(date);\n\t}\n\n\t/**\n\t * Closes the picker.\n\t *\n\t * @public\n\t */\n\tclosePicker(): void {\n\t\tthis.responsivePopover!.close();\n\t}\n\n\t/**\n\t * Opens the picker.\n\t *\n\t * @public\n\t * @returns Resolves when the picker is open\n\t */\n\tasync openPicker(): Promise<void> {\n\t\tthis._isPickerOpen = true;\n\t\tthis._calendarCurrentPicker = \"day\";\n\t\tthis.responsivePopover = await this._respPopover();\n\n\t\tthis.responsivePopover.showAt(this);\n\t}\n\n\ttogglePicker() {\n\t\tif (this.isOpen()) {\n\t\t\tthis.closePicker();\n\t\t} else if (this._canOpenPicker()) {\n\t\t\tthis.openPicker();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the picker is open.\n\t *\n\t * @public\n\t * @returns true if the picker is open, false otherwise\n\t */\n\tisOpen(): boolean {\n\t\treturn !!this._isPickerOpen;\n\t}\n\n\t/**\n\t * Currently selected date represented as a Local JavaScript Date instance.\n\t *\n\t * @public\n\t * @default null\n\t */\n\tget dateValue(): Date | null {\n\t\treturn this.liveValue ? this.getFormat().parse(this.liveValue) as Date : this.getFormat().parse(this.value) as Date;\n\t}\n\n\tget dateValueUTC(): Date | null {\n\t\treturn this.liveValue ? this.getFormat().parse(this.liveValue, true) as Date : this.getFormat().parse(this.value) as Date;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\twidth: \"100%\",\n\t\t\t},\n\t\t};\n\t}\n\n\tget type() {\n\t\treturn InputType.Text;\n\t}\n}\n\nDatePicker.define();\n\nexport default DatePicker;\nexport type {\n\tDatePickerChangeEventDetail,\n\tDatePickerInputEventDetail,\n\tDatePickerValueStateChangeEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../src/DatePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAuB,oDAAoD,CAAC;AAC5E,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,mBAAmB,MAAM,mEAAmE,CAAC;AACpG,OAAO,oBAAoB,MAAM,oEAAoE,CAAC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AAY,EAAE,KAAK,EAAE,CAAC;0DACF;AAiBhC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;qDACW;AASvC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;+CACK;AApJ5B,UAAU;IA7Ff,aAAa,CAAC;QACd,GAAG,EAAE,iBAAiB;QACtB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,kBAAkB;QAC5B,kBAAkB,EAAE,yBAAyB;QAC7C,MAAM,EAAE,aAAa;QACrB,gBAAgB,EAAE;YACjB,0BAA0B;YAC1B,oBAAoB;SACpB;QACD,YAAY,EAAE;YACb,IAAI;YACJ,iBAAiB;YACjB,QAAQ;YACR,qBAAqB;YACrB,KAAK;YACL,MAAM;SACN;KACD,CAAC;IACF;;;;;;;MAOE;;IACD,KAAK,CAA8B,QAAQ,EAAE;QAC7C,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IACF;;;;;;;MAOE;;IACD,KAAK,CAA6B,OAAO,EAAE;QAC3C,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IACF;;;;;;;;;OASG;;IACF,KAAK,CAAwC,oBAAoB,EAAE;QACnE,MAAM,EAAE;YACP;;eAEG;YACH,UAAU,EAAE;gBACX,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;GACI,UAAU,CA8nBf;AAED,UAAU,CAAC,MAAM,EAAE,CAAC;AAEpB,eAAe,UAAU,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport modifyDateBy from \"@ui5/webcomponents-localization/dist/dates/modifyDateBy.js\";\nimport getRoundedTimestamp from \"@ui5/webcomponents-localization/dist/dates/getRoundedTimestamp.js\";\nimport getTodayUTCTimestamp from \"@ui5/webcomponents-localization/dist/dates/getTodayUTCTimestamp.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport {\n\tisPageUp,\n\tisPageDown,\n\tisPageUpShift,\n\tisPageDownShift,\n\tisPageUpShiftCtrl,\n\tisPageDownShiftCtrl,\n\tisShow,\n\tisF4,\n\tisEnter,\n\tisTabNext,\n\tisTabPrevious,\n\tisF6Next,\n\tisF6Previous,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isPhone, isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\nimport type FormSupportT from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\nimport \"@ui5/webcomponents-icons/dist/appointment-2.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport HasPopup from \"./types/HasPopup.js\";\nimport { DATEPICKER_OPEN_ICON_TITLE, DATEPICKER_DATE_DESCRIPTION, INPUT_SUGGESTIONS_TITLE } from \"./generated/i18n/i18n-defaults.js\";\nimport DateComponentBase from \"./DateComponentBase.js\";\nimport Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport Calendar from \"./Calendar.js\";\nimport type { CalendarSelectedDatesChangeEventDetail } from \"./Calendar.js\";\nimport CalendarDateComponent from \"./CalendarDate.js\";\nimport Input from \"./Input.js\";\nimport InputType from \"./types/InputType.js\";\nimport DatePickerTemplate from \"./generated/templates/DatePickerTemplate.lit.js\";\nimport DatePickerPopoverTemplate from \"./generated/templates/DatePickerPopoverTemplate.lit.js\";\n\n// default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Styles\nimport datePickerCss from \"./generated/themes/DatePicker.css.js\";\nimport datePickerPopoverCss from \"./generated/themes/DatePickerPopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\n\ntype DatePickerChangeEventDetail = {\n\tvalue: string,\n\tvalid: boolean,\n}\n\ntype DatePickerValueStateChangeEventDetail = {\n\tvalueState: `${ValueState}`,\n\tvalid: boolean,\n}\n\ntype DatePickerInputEventDetail = {\n\tvalue: string,\n\tvalid: boolean,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-date-picker</code> component provides an input field with assigned calendar which opens on user action.\n * The <code>ui5-date-picker</code> allows users to select a localized date using touch,\n * mouse, or keyboard input. It consists of two parts: the date input field and the\n * date picker.\n *\n * <h3>Usage</h3>\n *\n * The user can enter a date by:\n * <ul>\n * <li>Using the calendar that opens in a popup</li>\n * <li>Typing it in directly in the input field</li>\n * </ul>\n * <br><br>\n * When the user makes an entry and presses the enter key, the calendar shows the corresponding date.\n * When the user directly triggers the calendar display, the actual date is displayed.\n *\n * <h3>Formatting</h3>\n *\n * If a date is entered by typing it into\n * the input field, it must fit to the used date format.\n * <br><br>\n * Supported format options are pattern-based on Unicode LDML Date Format notation.\n * For more information, see <ui5-link target=\"_blank\" href=\"http://unicode.org/reports/tr35/#Date_Field_Symbol_Table\">UTS #35: Unicode Locale Data Markup Language</ui5-link>.\n * <br><br>\n * For example, if the <code>format-pattern</code> is \"yyyy-MM-dd\",\n * a valid value string is \"2015-07-30\" and the same is displayed in the input.\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-date-picker</code> provides advanced keyboard handling.\n * If the <code>ui5-date-picker</code> is focused,\n * you can open or close the drop-down by pressing <code>F4</code>, <code>ALT+UP</code> or <code>ALT+DOWN</code> keys.\n * Once the drop-down is opened, you can use the <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code> arrow keys\n * to navigate through the dates and select one by pressing the <code>Space</code> or <code>Enter</code> keys. Moreover you can\n * use TAB to reach the buttons for changing month and year.\n * <br>\n *\n * If the <code>ui5-date-picker</code> input field is focused and its corresponding picker dialog is not opened,\n * then users can increment or decrement the date referenced by <code>dateValue</code> property\n * by using the following shortcuts:\n * <br>\n * <ul>\n * <li>[PAGEDOWN] - Decrements the corresponding day of the month by one</li>\n * <li>[SHIFT] + [PAGEDOWN] - Decrements the corresponding month by one</li>\n * <li>[SHIFT] + [CTRL] + [PAGEDOWN] - Decrements the corresponding year by one</li>\n * <li>[PAGEUP] - Increments the corresponding day of the month by one</li>\n * <li>[SHIFT] + [PAGEUP] - Increments the corresponding month by one</li>\n * <li>[SHIFT] + [CTRL] + [PAGEUP] - Increments the corresponding year by one</li>\n * </ul>\n *\n * <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <pre><code><script data-id=\"sap-ui-config\" type=\"application/json\">\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * </script></code></pre>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/DatePicker\";</code>\n *\n * @constructor\n * @extends DateComponentBase\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-date-picker\",\n\tlanguageAware: true,\n\ttemplate: DatePickerTemplate,\n\tstaticAreaTemplate: DatePickerPopoverTemplate,\n\tstyles: datePickerCss,\n\tstaticAreaStyles: [\n\t\tResponsivePopoverCommonCss,\n\t\tdatePickerPopoverCss,\n\t],\n\tdependencies: [\n\t\tIcon,\n\t\tResponsivePopover,\n\t\tCalendar,\n\t\tCalendarDateComponent,\n\t\tInput,\n\t\tButton,\n\t],\n})\n/**\n * Fired when the input operation has finished by pressing Enter or on focusout.\n *\n * @allowPreventDefault\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n*/\n@event<DatePickerChangeEventDetail>(\"change\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n/**\n * Fired when the value of the component is changed at each key stroke.\n *\n * @allowPreventDefault\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n*/\n@event<DatePickerInputEventDetail>(\"input\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n/**\n * Fired before the value state of the component is updated internally.\n * The event is preventable, meaning that if it's default action is\n * prevented, the component will not update the value state.\n *\n * @allowPreventDefault\n * @public\n * @param {string} valueState The new <code>valueState</code> that will be set.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n */\n@event<DatePickerValueStateChangeEventDetail>(\"value-state-change\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalueState: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\nclass DatePicker extends DateComponentBase implements IFormElement {\n\t/**\n\t * Defines a formatted date value.\n\t *\n\t * @default \"\"\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue!: string\n\n\t/**\n\t * Defines the value state of the component.\n\t *\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: `${ValueState}`;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @since 1.0.0-rc.9\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t * Determines whether the component is displayed as disabled.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Determines whether the component is displayed as read-only.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Defines a short hint, intended to aid the user with data entry when the\n\t * component has no value.\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When no placeholder is set, the format pattern is displayed as a placeholder.\n\t * Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ defaultValue: undefined })\n\tplaceholder?: string;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Defines the aria-label attribute for the component.\n\t *\n\t * @default \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t *\n\t * @default \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ defaultValue: \"\" })\n\taccessibleNameRef!: string;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_isPickerOpen!: boolean;\n\n\t@property({ type: Object })\n\t_respPopoverConfig!: object;\n\n\t@property({ defaultValue: \"day\" })\n\t_calendarCurrentPicker!: string;\n\n\tliveValue?: string;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> If not specified, a default text (in the respective language) will be displayed.\n\t * <br>\n\t * <b>Note:</b> The <code>valueStateMessage</code> would be displayed,\n\t * when the component is in <code>Information</code>, <code>Warning</code> or <code>Error</code> value state.\n\t *\n\t * @since 1.0.0-rc.7\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t *\n\t * @private\n\t */\n\t@slot({ type: HTMLElement })\n\tformSupport!: Array<HTMLElement>;\n\n\tresponsivePopover?: ResponsivePopover;\n\n\tFormSupport?: typeof FormSupportT;\n\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @protected\n\t */\n\tonResponsivePopoverAfterClose() {\n\t\tthis._isPickerOpen = false;\n\t\tif (isPhone()) {\n\t\t\tthis.blur(); // close device's keyboard and prevent further typing\n\t\t} else {\n\t\t\tthis._getInput()?.focus();\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.FormSupport = getFeature<typeof FormSupportT>(\"FormSupport\");\n\n\t\t[\"minDate\", \"maxDate\"].forEach((prop: string) => {\n\t\t\tconst propValue = this[prop as keyof DatePicker] as string;\n\n\t\t\tif (!this.isValid(propValue)) {\n\t\t\t\tconsole.warn(`Invalid value for property \"${prop}\": ${propValue} is not compatible with the configured format pattern: \"${this._displayFormat}\"`); // eslint-disable-line\n\t\t\t}\n\t\t});\n\n\t\tif (this.FormSupport) {\n\t\t\tthis.FormSupport.syncNativeHiddenInput(this);\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\n\t\tthis.value = this.normalizeValue(this.value) || this.value;\n\t\tthis.liveValue = this.value;\n\t}\n\n\t/**\n\t * Override in derivatives to change calendar selection mode\n\t *\n\t * @protected\n\t */\n\tget _calendarSelectionMode(): string {\n\t\treturn \"Single\";\n\t}\n\n\t/**\n\t * Used to provide a timestamp to the Calendar (to focus it to a relevant date when open) based on the component's state\n\t * Override in derivatives to provide the calendar a timestamp based on their properties\n\t * By default focus the calendar on the selected date if set, or the current day otherwise\n\t *\n\t * @protected\n\t */\n\tget _calendarTimestamp(): number {\n\t\tif (this.value && this.dateValueUTC && this._checkValueValidity(this.value)) {\n\t\t\tconst millisecondsUTC = this.dateValueUTC.getTime();\n\t\t\treturn getRoundedTimestamp(millisecondsUTC);\n\t\t}\n\n\t\treturn getTodayUTCTimestamp(this._primaryCalendarType);\n\t}\n\n\t/**\n\t * Used to provide selectedDates to the calendar based on the component's state\n\t * Override in derivatives to provide different rules for setting the calendar's selected dates\n\t *\n\t * @protected\n\t */\n\tget _calendarSelectedDates(): Array<string> {\n\t\tif (this.value && this._checkValueValidity(this.value)) {\n\t\t\treturn [this.value];\n\t\t}\n\n\t\treturn [];\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isShow(e)) {\n\t\t\te.preventDefault(); // Prevent scroll on Alt/Option + Arrow Up/Down\n\t\t\tif (this.isOpen()) {\n\t\t\t\tif (!isF4(e)) {\n\t\t\t\t\tthis._toggleAndFocusInput();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._toggleAndFocusInput();\n\t\t\t}\n\t\t}\n\n\t\tif ((this._getInput().isEqualNode(e.target as Node) && this.isOpen()) && (isTabNext(e) || isTabPrevious(e) || isF6Next(e) || isF6Previous(e))) {\n\t\t\tthis.closePicker();\n\t\t}\n\n\t\tif (this.isOpen()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tif (this.FormSupport) {\n\t\t\t\tthis.FormSupport.triggerFormSubmit(this);\n\t\t\t}\n\t\t} else if (isPageUpShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"year\");\n\t\t} else if (isPageUpShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"month\");\n\t\t} else if (isPageUp(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"day\");\n\t\t} else if (isPageDownShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"year\");\n\t\t} else if (isPageDownShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"month\");\n\t\t} else if (isPageDown(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"day\");\n\t\t}\n\t}\n\n\t/**\n\t * @param amount\n\t * @param unit\n\t * @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)\n\t * @protected\n\t */\n\t_modifyDateValue(amount: number, unit: string, preserveDate?: boolean) {\n\t\tif (!this.dateValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modifiedDate = modifyDateBy(CalendarDate.fromLocalJSDate(this.dateValue), amount, unit, preserveDate, this._minDate, this._maxDate);\n\t\tconst newValue = this.formatValue(modifiedDate.toUTCJSDate());\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t_updateValueAndFireEvents(value: string, normalizeValue: boolean, events: Array<string>, updateValue = true) {\n\t\tconst valid = this._checkValueValidity(value);\n\n\t\tif (valid && normalizeValue) {\n\t\t\tvalue = this.normalizeValue(value); // transform valid values (in any format) to the correct format\n\t\t}\n\n\t\tlet executeEvent = true;\n\t\tthis.liveValue = value;\n\n\t\tconst previousValue = this.value;\n\n\t\tif (updateValue) {\n\t\t\tthis._getInput().value = value;\n\t\t\tthis.value = value;\n\t\t\tthis._updateValueState(); // Change the value state to Error/None, but only if needed\n\t\t}\n\n\t\tevents.forEach((e: string) => {\n\t\t\tif (!this.fireEvent<DatePickerChangeEventDetail>(e, { value, valid }, true)) {\n\t\t\t\texecuteEvent = false;\n\t\t\t}\n\t\t});\n\n\t\tif (!executeEvent && updateValue) {\n\t\t\tif (this.value !== previousValue && this.value !== this._getInput().value) {\n\t\t\t\treturn; // If the value was changed in the change event, do not revert it\n\t\t\t}\n\n\t\t\tthis._getInput().value = previousValue;\n\n\t\t\tthis.value = previousValue;\n\t\t}\n\t}\n\n\t_updateValueState() {\n\t\tconst valid = this._checkValueValidity(this.value);\n\t\tconst previousValueState = this.valueState;\n\n\t\tthis.valueState = valid ? ValueState.None : ValueState.Error;\n\n\t\tconst eventPrevented = !this.fireEvent<DatePickerValueStateChangeEventDetail>(\"value-state-change\", { valueState: this.valueState, valid }, true);\n\n\t\tif (eventPrevented) {\n\t\t\tthis.valueState = previousValueState;\n\t\t}\n\t}\n\n\t_toggleAndFocusInput() {\n\t\tthis.togglePicker();\n\t\tthis._getInput().focus();\n\t}\n\n\t_getInput(): Input {\n\t\treturn this.shadowRoot!.querySelector<Input>(\"[ui5-input]\")!;\n\t}\n\n\t/**\n\t * The ui5-input \"submit\" event handler - fire change event when the user presses enter\n\t *\n\t * @protected\n\t */\n\t_onInputSubmit() {}\n\n\t/**\n\t * The ui5-input \"change\" event handler - fire change event when the user focuses out of the input\n\t *\n\t * @protected\n\t */\n\t_onInputChange(e: Event) {\n\t\tthis._updateValueAndFireEvents((e.target as DatePicker).value, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t/**\n\t * The ui5-input \"input\" event handler - fire input even when the user types\n\t *\n\t * @protected\n\t */\n\t_onInputInput(e: KeyboardEvent) {\n\t\tthis._updateValueAndFireEvents((e.target as DatePicker).value, false, [\"input\"], false);\n\t}\n\n\t/**\n\t * Checks if the provided value is valid and within valid range.\n\t *\n\t * @protected\n\t * @param value\n\t */\n\t_checkValueValidity(value: string): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn this.isValid(value) && this.isInValidRange(value);\n\t}\n\n\t_click(e: MouseEvent) {\n\t\tif (isPhone()) {\n\t\t\tthis.responsivePopover!.showAt(this);\n\t\t\te.preventDefault(); // prevent immediate selection of any item\n\t\t}\n\t}\n\n\t/**\n\t * Checks if a value is valid against the current date format of the DatePicker.\n\t *\n\t * @public\n\t * @param value A value to be tested against the current date format\n\t */\n\tisValid(value: string): boolean {\n\t\tif (value === \"\" || value === undefined) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn !!this.getFormat().parse(value);\n\t}\n\n\t/**\n\t * Checks if a date is between the minimum and maximum date.\n\t *\n\t * @public\n\t * @param value A value to be checked\n\t */\n\tisInValidRange(value: string): boolean {\n\t\tif (value === \"\" || value === undefined) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst calendarDate = this._getCalendarDateFromString(value);\n\n\t\tif (!calendarDate || !this._minDate || !this._maxDate) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn calendarDate.valueOf() >= this._minDate.valueOf() && calendarDate.valueOf() <= this._maxDate.valueOf();\n\t}\n\n\t/**\n\t * The parser understands many formats, but we need one format\n\t *\n\t * @protected\n\t */\n\tnormalizeValue(value: string) {\n\t\tif (value === \"\") {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn this.getFormat().format(this.getFormat().parse(value, true), true); // it is important to both parse and format the date as UTC\n\t}\n\n\tget _displayFormat(): string {\n\t\t// @ts-ignore oFormatOptions is a private API of DateFormat\n\t\treturn this.getFormat().oFormatOptions.pattern as string;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget _placeholder() {\n\t\treturn this.placeholder !== undefined ? this.placeholder : this._displayFormat;\n\t}\n\n\tget _headerTitleText() {\n\t\treturn DatePicker.i18nBundle.getText(INPUT_SUGGESTIONS_TITLE);\n\t}\n\n\tget phone() {\n\t\treturn isPhone();\n\t}\n\n\tget showHeader() {\n\t\treturn this.phone;\n\t}\n\n\tget showFooter() {\n\t\treturn this.phone;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"ariaRoledescription\": this.dateAriaDescription,\n\t\t\t\"ariaHasPopup\": HasPopup.Grid.toLowerCase(),\n\t\t\t\"ariaAutoComplete\": \"none\",\n\t\t\t\"ariaRequired\": this.required,\n\t\t\t\"ariaLabel\": getEffectiveAriaLabelText(this),\n\t\t};\n\t}\n\n\tget openIconTitle() {\n\t\treturn DatePicker.i18nBundle.getText(DATEPICKER_OPEN_ICON_TITLE);\n\t}\n\n\tget openIconName() {\n\t\treturn \"appointment-2\";\n\t}\n\n\tget dateAriaDescription() {\n\t\treturn DatePicker.i18nBundle.getText(DATEPICKER_DATE_DESCRIPTION);\n\t}\n\n\t/**\n\t * Defines whether the dialog on mobile should have header\n\t *\n\t * @private\n\t */\n\tget _shouldHideHeader() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Defines whether the value help icon is hidden\n\t *\n\t * @private\n\t */\n\tget _ariaHidden() {\n\t\treturn isDesktop();\n\t}\n\n\tasync _respPopover() {\n\t\tconst staticAreaItem = await this.getStaticAreaItemDomRef();\n\t\treturn staticAreaItem!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t_canOpenPicker() {\n\t\treturn !this.disabled && !this.readonly;\n\t}\n\n\tget _calendarPickersMode() {\n\t\tconst format = this.getFormat() as DateFormat & { aFormatArray: Array<{type: string}> };\n\t\tconst patternSymbolTypes = format.aFormatArray.map(patternSymbolSettings => {\n\t\t\treturn patternSymbolSettings.type.toLowerCase();\n\t\t});\n\n\t\tif (patternSymbolTypes.includes(\"day\")) {\n\t\t\treturn CalendarPickersMode.DAY_MONTH_YEAR;\n\t\t}\n\n\t\tif (patternSymbolTypes.includes(\"month\") || patternSymbolTypes.includes(\"monthstandalone\")) {\n\t\t\treturn CalendarPickersMode.MONTH_YEAR;\n\t\t}\n\n\t\treturn CalendarPickersMode.YEAR;\n\t}\n\n\t/**\n\t * The user selected a new date in the calendar\n\t *\n\t * @param e\n\t * @protected\n\t */\n\tonSelectedDatesChange(e: CustomEvent<CalendarSelectedDatesChangeEventDetail>) {\n\t\te.preventDefault();\n\t\tconst newValue = e.detail.values && e.detail.values[0];\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\n\t\tthis.closePicker();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress() {\n\t\tthis._calendarCurrentPicker = \"month\";\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress() {\n\t\tthis._calendarCurrentPicker = \"year\";\n\t}\n\n\t/**\n\t * Formats a Java Script date object into a string representing a locale date\n\t * according to the <code>formatPattern</code> property of the DatePicker instance\n\t *\n\t * @public\n\t * @param date A Java Script date object to be formatted as string\n\t * @returns The date as string\n\t */\n\tformatValue(date: Date): string {\n\t\treturn this.getFormat().format(date);\n\t}\n\n\t/**\n\t * Closes the picker.\n\t *\n\t * @public\n\t */\n\tclosePicker(): void {\n\t\tthis.responsivePopover!.close();\n\t}\n\n\t/**\n\t * Opens the picker.\n\t *\n\t * @public\n\t * @returns Resolves when the picker is open\n\t */\n\tasync openPicker(): Promise<void> {\n\t\tthis._isPickerOpen = true;\n\t\tthis._calendarCurrentPicker = \"day\";\n\t\tthis.responsivePopover = await this._respPopover();\n\n\t\tthis.responsivePopover.showAt(this);\n\t}\n\n\ttogglePicker() {\n\t\tif (this.isOpen()) {\n\t\t\tthis.closePicker();\n\t\t} else if (this._canOpenPicker()) {\n\t\t\tthis.openPicker();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the picker is open.\n\t *\n\t * @public\n\t * @returns true if the picker is open, false otherwise\n\t */\n\tisOpen(): boolean {\n\t\treturn !!this._isPickerOpen;\n\t}\n\n\t/**\n\t * Currently selected date represented as a Local JavaScript Date instance.\n\t *\n\t * @public\n\t * @default null\n\t */\n\tget dateValue(): Date | null {\n\t\treturn this.liveValue ? this.getFormat().parse(this.liveValue) as Date : this.getFormat().parse(this.value) as Date;\n\t}\n\n\tget dateValueUTC(): Date | null {\n\t\treturn this.liveValue ? this.getFormat().parse(this.liveValue, true) as Date : this.getFormat().parse(this.value) as Date;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\twidth: \"100%\",\n\t\t\t},\n\t\t};\n\t}\n\n\tget type() {\n\t\treturn InputType.Text;\n\t}\n}\n\nDatePicker.define();\n\nexport default DatePicker;\nexport type {\n\tDatePickerChangeEventDetail,\n\tDatePickerInputEventDetail,\n\tDatePickerValueStateChangeEventDetail,\n};\n"]}
|