@ui5/webcomponents 1.24.4 → 1.24.5
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 +19 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Button.d.ts +2 -0
- package/dist/Button.js +14 -1
- package/dist/Button.js.map +1 -1
- package/dist/DatePicker.d.ts +1 -0
- package/dist/DatePicker.js +4 -1
- package/dist/DatePicker.js.map +1 -1
- package/dist/DateRangePicker.d.ts +7 -0
- package/dist/DateRangePicker.js +10 -1
- package/dist/DateRangePicker.js.map +1 -1
- package/dist/DateTimePicker.d.ts +7 -0
- package/dist/DateTimePicker.js +10 -1
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/ListItem.js +5 -0
- package/dist/ListItem.js.map +1 -1
- package/dist/TabContainer.js +2 -0
- package/dist/TabContainer.js.map +1 -1
- package/dist/TimePicker.d.ts +1 -0
- package/dist/TimePicker.js +4 -1
- package/dist/TimePicker.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 -1
- package/dist/css/themes/CalendarLegendItem.css +1 -1
- 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/MenuListItem.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/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 +2 -2
- package/dist/generated/templates/ButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DatePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/DatePickerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MonthPickerTemplate.lit.js +1 -1
- package/dist/generated/templates/MonthPickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TimePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/TimePickerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleButtonTemplate.lit.js +2 -2
- package/dist/generated/templates/ToggleButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js +2 -2
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/YearPickerTemplate.lit.js +1 -1
- package/dist/generated/templates/YearPickerTemplate.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.js +1 -1
- package/dist/generated/themes/CalendarLegend.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js.map +1 -1
- 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/MenuListItem.css.js +1 -1
- package/dist/generated/themes/MenuListItem.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/web-types.json +1 -1
- package/package.json +8 -8
- package/src/Button.hbs +2 -1
- package/src/DatePickerPopover.hbs +1 -0
- package/src/MonthPicker.hbs +1 -1
- package/src/TimePickerPopover.hbs +1 -0
- package/src/YearPicker.hbs +1 -1
- package/src/i18n/messagebundle.properties +12 -0
- package/src/themes/BusyIndicator.css +4 -0
- package/src/themes/TimePicker.css +1 -24
- package/src/themes/TreeItem.css +5 -6
- package/src/themes/base/BusyIndicator-parameters.css +1 -0
- package/src/themes/sap_fiori_3_hcb/BusyIndicator-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/src/themes/sap_fiori_3_hcw/BusyIndicator-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/src/themes/sap_horizon/ProgressIndicatorLayout-parameters.css +0 -5
- package/src/themes/sap_horizon/rtl-parameters.css +2 -0
- package/src/themes/sap_horizon_hcb/BusyIndicator-parameters.css +1 -0
- package/src/themes/sap_horizon_hcw/BusyIndicator-parameters.css +1 -0
package/dist/Button.d.ts
CHANGED
|
@@ -203,6 +203,7 @@ declare class Button extends UI5Element implements IFormElement, IButton {
|
|
|
203
203
|
* @private
|
|
204
204
|
*/
|
|
205
205
|
_isTouch: boolean;
|
|
206
|
+
_cancelAction: boolean;
|
|
206
207
|
/**
|
|
207
208
|
* Defines the text of the component.
|
|
208
209
|
*
|
|
@@ -235,6 +236,7 @@ declare class Button extends UI5Element implements IFormElement, IButton {
|
|
|
235
236
|
get tabIndexValue(): string;
|
|
236
237
|
get showIconTooltip(): boolean;
|
|
237
238
|
get ariaLabelText(): string | undefined;
|
|
239
|
+
get ariaDescribedbyText(): "ui5-button-hiddenText-type" | undefined;
|
|
238
240
|
get _isSubmit(): boolean;
|
|
239
241
|
get _isReset(): boolean;
|
|
240
242
|
static onDefine(): Promise<void>;
|
package/dist/Button.js
CHANGED
|
@@ -11,7 +11,7 @@ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
|
11
11
|
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
12
12
|
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
13
13
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
14
|
-
import { isSpace, isEnter } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
14
|
+
import { isSpace, isEnter, isEscape, isShift, } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
15
15
|
import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js";
|
|
16
16
|
import { getFeature } from "@ui5/webcomponents-base/dist/FeaturesRegistry.js";
|
|
17
17
|
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
@@ -140,12 +140,19 @@ let Button = Button_1 = class Button extends UI5Element {
|
|
|
140
140
|
markEvent(e, "button");
|
|
141
141
|
}
|
|
142
142
|
_onkeydown(e) {
|
|
143
|
+
this._cancelAction = isShift(e) || isEscape(e);
|
|
143
144
|
markEvent(e, "button");
|
|
144
145
|
if (isSpace(e) || isEnter(e)) {
|
|
145
146
|
this._setActiveState(true);
|
|
146
147
|
}
|
|
148
|
+
else if (this._cancelAction) {
|
|
149
|
+
this._setActiveState(false);
|
|
150
|
+
}
|
|
147
151
|
}
|
|
148
152
|
_onkeyup(e) {
|
|
153
|
+
if (this._cancelAction) {
|
|
154
|
+
e.preventDefault();
|
|
155
|
+
}
|
|
149
156
|
if (isSpace(e) || isEnter(e)) {
|
|
150
157
|
if (this.active) {
|
|
151
158
|
this._setActiveState(false);
|
|
@@ -220,6 +227,9 @@ let Button = Button_1 = class Button extends UI5Element {
|
|
|
220
227
|
get ariaLabelText() {
|
|
221
228
|
return getEffectiveAriaLabelText(this);
|
|
222
229
|
}
|
|
230
|
+
get ariaDescribedbyText() {
|
|
231
|
+
return this.hasButtonType ? "ui5-button-hiddenText-type" : undefined;
|
|
232
|
+
}
|
|
223
233
|
get _isSubmit() {
|
|
224
234
|
return this.type === ButtonType.Submit || this.submits;
|
|
225
235
|
}
|
|
@@ -290,6 +300,9 @@ __decorate([
|
|
|
290
300
|
__decorate([
|
|
291
301
|
property({ type: Boolean })
|
|
292
302
|
], Button.prototype, "_isTouch", void 0);
|
|
303
|
+
__decorate([
|
|
304
|
+
property({ type: Boolean, noAttribute: true })
|
|
305
|
+
], Button.prototype, "_cancelAction", void 0);
|
|
293
306
|
__decorate([
|
|
294
307
|
slot({ type: Node, "default": true })
|
|
295
308
|
], Button.prototype, "text", void 0);
|
package/dist/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAG9E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,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EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;oCACnB;AAvMd,MAAM;IAvBX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE,SAAS;QACjB,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;IACF;;;;;;;;OAQG;;IACF,KAAK,CAAC,OAAO,CAAC;IACf;;;OAGG;;IACF,KAAK,CAAC,sBAAsB,CAAC;GACxB,MAAM,CAqaX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,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 event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport type { PassiveEventListenerObject } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { markEvent } from \"@ui5/webcomponents-base/dist/MarkedEvents.js\";\nimport { getIconAccessibleName } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nimport {\n\tisPhone,\n\tisTablet,\n\tisCombi,\n\tisDesktop,\n\tisSafari,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport willShowContent from \"@ui5/webcomponents-base/dist/util/willShowContent.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\nimport ButtonDesign from \"./types/ButtonDesign.js\";\nimport ButtonType from \"./types/ButtonType.js\";\nimport ButtonAccessibleRole from \"./types/ButtonAccessibleRole.js\";\nimport ButtonTemplate from \"./generated/templates/ButtonTemplate.lit.js\";\nimport Icon from \"./Icon.js\";\nimport HasPopup from \"./types/HasPopup.js\";\n\nimport { BUTTON_ARIA_TYPE_ACCEPT, BUTTON_ARIA_TYPE_REJECT, BUTTON_ARIA_TYPE_EMPHASIZED } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport buttonCss from \"./generated/themes/Button.css.js\";\nimport type FormSupport from \"./features/InputElementsFormSupport.js\";\n\n/**\n * Interface for components that may be used as a button inside numerous higher-order components\n * @public\n */\ninterface IButton extends HTMLElement, ITabbable {\n\tnonInteractive: boolean;\n}\n\nlet isGlobalHandlerAttached = false;\nlet activeButton: Button | null = null;\n\ntype AccessibilityAttributes = {\n\texpanded?: \"true\" | \"false\" | boolean,\n\thasPopup?: `${HasPopup}`,\n\tcontrols?: string\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-button` component represents a simple push button.\n * It enables users to trigger actions by clicking or tapping the `ui5-button`, or by pressing\n * certain keyboard keys, such as Enter.\n *\n * ### Usage\n *\n * For the `ui5-button` UI, you can define text, icon, or both. You can also specify\n * whether the text or the icon is displayed first.\n *\n * You can choose from a set of predefined types that offer different\n * styling to correspond to the triggered action.\n *\n * You can set the `ui5-button` as enabled or disabled. An enabled\n * `ui5-button` can be pressed by clicking or tapping it. The button changes\n * its style to provide visual feedback to the user that it is pressed or hovered over with\n * the mouse cursor. A disabled `ui5-button` appears inactive and cannot be pressed.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Button.js\";`\n * @csspart button - Used to style the native button element\n * @constructor\n * @extends UI5Element\n * @implements { IButton }\n * @public\n */\n@customElement({\n\ttag: \"ui5-button\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: ButtonTemplate,\n\tstyles: buttonCss,\n\tdependencies: [Icon],\n})\n/**\n * Fired when the component is activated either with a\n * mouse/tap or by using the Enter or Space key.\n *\n * **Note:** The event will not be fired if the `disabled`\n * property is set to `true`.\n * @public\n * @native\n */\n@event(\"click\")\n/**\n * Fired whenever the active state of the component changes.\n * @private\n */\n@event(\"_active-state-change\")\nclass Button extends UI5Element implements IFormElement, IButton {\n\t/**\n\t * Defines the component design.\n\t * @default \"Default\"\n\t * @public\n\t */\n\t@property({ type: ButtonDesign, defaultValue: ButtonDesign.Default })\n\tdesign!: `${ButtonDesign}`;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines the icon, displayed as graphical element within the component.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * Example:\n\t * See all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\ticon!: string;\n\n\t/**\n\t * Defines whether the icon should be displayed after the component text.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\ticonEnd!: boolean;\n\n\t/**\n\t * When set to `true`, the component will\n\t * automatically submit the nearest HTML form element on `press`.\n\t *\n\t * **Note:** For the `submits` property to have effect, you must add the following import to your project:\n\t * `import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`\n\t * @default false\n\t * @public\n\t * @deprecated Set the \"type\" property to \"Submit\" to achieve the same result. The \"submits\" property is ignored if \"type\" is set to any value other than \"Button\".\n\t */\n\t@property({ type: Boolean })\n\tsubmits!: boolean;\n\n\t/**\n\t * Defines the tooltip of the component.\n\t *\n\t * **Note:** A tooltip attribute should be provided for icon-only buttons, in order to represent their exact meaning/function.\n\t * @default \"\"\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property()\n\ttooltip!: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ defaultValue: undefined })\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default \"\"\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property({ defaultValue: \"\" })\n\taccessibleNameRef!: string;\n\n\t/**\n\t * An object of strings that defines several additional accessibility attribute values\n\t * for customization depending on the use case.\n\t *\n\t * It supports the following fields:\n\t *\n\t * - `expanded`: Indicates whether the button, or another grouping element it controls, is currently expanded or collapsed. Accepts the following string values:\n\t *\t- `true`\n\t *\t- `false`\n\t *\n\t * - `hasPopup`: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button. Accepts the following string values:\n\t *\t- `Dialog`\n\t *\t- `Grid`\n\t *\t- `ListBox`\n\t *\t- `Menu`\n\t *\t- `Tree`\n\t *\n\t * - `controls`: Identifies the element (or elements) whose contents or presence are controlled by the button element. Accepts a string value.\n\t * @public\n\t * @since 1.2.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes!: AccessibilityAttributes;\n\n\t/**\n\t * Defines whether the button has special form-related functionality.\n\t *\n\t * **Note:** For the `type` property to have effect, you must add the following import to your project:\n\t * `import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`\n\t * @default \"Button\"\n\t * @public\n\t * @since 1.15.0\n\t */\n\t@property({ type: ButtonType, defaultValue: ButtonType.Button })\n\ttype!: `${ButtonType}`;\n\n\t/**\n\t * Describes the accessibility role of the button.\n\t *\n\t * **Note:** Use link role only with a press handler, which performs a navigation. In all other scenarios the default button semantics are recommended.\n\t *\n\t * @default \"Button\"\n\t * @public\n\t * @since 1.23\n\t */\n\t@property({ type: ButtonAccessibleRole, defaultValue: ButtonAccessibleRole.Button })\n\taccessibleRole!: `${ButtonAccessibleRole}`;\n\n\t/**\n\t * Used to switch the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive!: boolean;\n\n\t/**\n\t * Defines if a content has been added to the default slot\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\ticonOnly!: boolean;\n\n\t/**\n\t * Indicates if the elements is on focus\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused!: boolean;\n\n\t/**\n\t * Indicates if the elements has a slotted icon\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thasIcon!: boolean;\n\n\t/**\n\t * Indicates if the element if focusable\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tnonInteractive!: boolean;\n\n\t/**\n\t * The current title of the button, either the tooltip property or the icons tooltip. The tooltip property with higher prio.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tbuttonTitle?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_iconSettings!: object;\n\n\t/**\n\t * Defines the tabIndex of the component.\n\t * @private\n\t */\n\t@property({ defaultValue: \"0\", noAttribute: true })\n\tforcedTabIndex!: string;\n\n\t/**\n\t * @since 1.0.0-rc.13\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isTouch!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true })\n\ttext!: Array<Node>;\n\n\t_deactivate: () => void;\n\n\t_ontouchstart: PassiveEventListenerObject;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeButton) {\n\t\t\t\tactiveButton._setActiveState(false);\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\n\t\tconst handleTouchStartEvent = (e: TouchEvent) => {\n\t\t\tmarkEvent(e, \"button\");\n\n\t\t\tif (this.nonInteractive) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._setActiveState(true);\n\t\t};\n\n\t\tthis._ontouchstart = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\tonEnterDOM() {\n\t\tthis._isTouch = (isPhone() || isTablet()) && !isCombi();\n\t}\n\n\tasync onBeforeRendering() {\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (this.type !== ButtonType.Button && !formSupport) {\n\t\t\tconsole.warn(`In order for the \"type\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\t\tif (this.submits && !formSupport) {\n\t\t\tconsole.warn(`In order for the \"submits\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\n\t\tthis.iconOnly = this.isIconOnly;\n\t\tthis.hasIcon = !!this.icon;\n\n\t\tthis.buttonTitle = this.tooltip || await getIconAccessibleName(this.icon);\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tmarkEvent(e, \"button\");\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport && this._isSubmit) {\n\t\t\tformSupport.triggerFormSubmit(this);\n\t\t}\n\t\tif (formSupport && this._isReset) {\n\t\t\tformSupport.triggerFormReset(this);\n\t\t}\n\n\t\tif (isSafari()) {\n\t\t\tthis.getDomRef()?.focus();\n\t\t}\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tif (this.nonInteractive || this._isTouch) {\n\t\t\treturn;\n\t\t}\n\n\t\tmarkEvent(e, \"button\");\n\t\tthis._setActiveState(true);\n\t\tactiveButton = this; // eslint-disable-line\n\t}\n\n\t_ontouchend(e: TouchEvent) {\n\t\tif (this.disabled) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\tif (this.active) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\n\t\tif (activeButton) {\n\t\t\tactiveButton._setActiveState(false);\n\t\t}\n\t}\n\n\t_onmouseup(e: MouseEvent) {\n\t\tmarkEvent(e, \"button\");\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tmarkEvent(e, \"button\");\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis._setActiveState(true);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tif (this.active) {\n\t\t\t\tthis._setActiveState(false);\n\t\t\t}\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.active) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\n\t\tif (isDesktop()) {\n\t\t\tthis.focused = false;\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tmarkEvent(e, \"button\");\n\t\tif (isDesktop()) {\n\t\t\tthis.focused = true;\n\t\t}\n\t}\n\n\t_setActiveState(active: boolean) {\n\t\tconst eventPrevented = !this.fireEvent(\"_active-state-change\", null, true);\n\n\t\tif (eventPrevented) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = active;\n\t}\n\n\tget _hasPopup() {\n\t\treturn this.accessibilityAttributes.hasPopup?.toLowerCase();\n\t}\n\n\tget hasButtonType() {\n\t\treturn this.design !== ButtonDesign.Default && this.design !== ButtonDesign.Transparent;\n\t}\n\n\tget iconRole() {\n\t\tif (!this.icon) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn \"presentation\";\n\t}\n\n\tget isIconOnly() {\n\t\treturn !willShowContent(this.text);\n\t}\n\n\tstatic typeTextMappings(): Record<string, I18nText> {\n\t\treturn {\n\t\t\t\"Positive\": BUTTON_ARIA_TYPE_ACCEPT,\n\t\t\t\"Negative\": BUTTON_ARIA_TYPE_REJECT,\n\t\t\t\"Emphasized\": BUTTON_ARIA_TYPE_EMPHASIZED,\n\t\t};\n\t}\n\n\tget buttonTypeText() {\n\t\treturn Button.i18nBundle.getText(Button.typeTextMappings()[this.design]);\n\t}\n\n\tget buttonAccessibleRole() {\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\tget tabIndexValue() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\n\t\tif (tabindex) {\n\t\t\treturn tabindex;\n\t\t}\n\n\t\treturn this.nonInteractive ? \"-1\" : this.forcedTabIndex;\n\t}\n\n\tget showIconTooltip() {\n\t\treturn this.iconOnly && !this.tooltip;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget _isSubmit() {\n\t\treturn this.type === ButtonType.Submit || this.submits;\n\t}\n\n\tget _isReset() {\n\t\treturn this.type === ButtonType.Reset;\n\t}\n\n\tstatic async onDefine() {\n\t\tButton.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nButton.define();\n\nexport default Button;\nexport type {\n\tAccessibilityAttributes,\n\tIButton,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,SAAS,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@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisEscape,\n\tisShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport type { PassiveEventListenerObject } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { markEvent } from \"@ui5/webcomponents-base/dist/MarkedEvents.js\";\nimport { getIconAccessibleName } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nimport {\n\tisPhone,\n\tisTablet,\n\tisCombi,\n\tisDesktop,\n\tisSafari,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport willShowContent from \"@ui5/webcomponents-base/dist/util/willShowContent.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\nimport ButtonDesign from \"./types/ButtonDesign.js\";\nimport ButtonType from \"./types/ButtonType.js\";\nimport ButtonAccessibleRole from \"./types/ButtonAccessibleRole.js\";\nimport ButtonTemplate from \"./generated/templates/ButtonTemplate.lit.js\";\nimport Icon from \"./Icon.js\";\nimport HasPopup from \"./types/HasPopup.js\";\n\nimport { BUTTON_ARIA_TYPE_ACCEPT, BUTTON_ARIA_TYPE_REJECT, BUTTON_ARIA_TYPE_EMPHASIZED } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport buttonCss from \"./generated/themes/Button.css.js\";\nimport type FormSupport from \"./features/InputElementsFormSupport.js\";\n\n/**\n * Interface for components that may be used as a button inside numerous higher-order components\n * @public\n */\ninterface IButton extends HTMLElement, ITabbable {\n\tnonInteractive: boolean;\n}\n\nlet isGlobalHandlerAttached = false;\nlet activeButton: Button | null = null;\n\ntype AccessibilityAttributes = {\n\texpanded?: \"true\" | \"false\" | boolean,\n\thasPopup?: `${HasPopup}`,\n\tcontrols?: string\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-button` component represents a simple push button.\n * It enables users to trigger actions by clicking or tapping the `ui5-button`, or by pressing\n * certain keyboard keys, such as Enter.\n *\n * ### Usage\n *\n * For the `ui5-button` UI, you can define text, icon, or both. You can also specify\n * whether the text or the icon is displayed first.\n *\n * You can choose from a set of predefined types that offer different\n * styling to correspond to the triggered action.\n *\n * You can set the `ui5-button` as enabled or disabled. An enabled\n * `ui5-button` can be pressed by clicking or tapping it. The button changes\n * its style to provide visual feedback to the user that it is pressed or hovered over with\n * the mouse cursor. A disabled `ui5-button` appears inactive and cannot be pressed.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Button.js\";`\n * @csspart button - Used to style the native button element\n * @constructor\n * @extends UI5Element\n * @implements { IButton }\n * @public\n */\n@customElement({\n\ttag: \"ui5-button\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: ButtonTemplate,\n\tstyles: buttonCss,\n\tdependencies: [Icon],\n})\n/**\n * Fired when the component is activated either with a\n * mouse/tap or by using the Enter or Space key.\n *\n * **Note:** The event will not be fired if the `disabled`\n * property is set to `true`.\n * @public\n * @native\n */\n@event(\"click\")\n/**\n * Fired whenever the active state of the component changes.\n * @private\n */\n@event(\"_active-state-change\")\nclass Button extends UI5Element implements IFormElement, IButton {\n\t/**\n\t * Defines the component design.\n\t * @default \"Default\"\n\t * @public\n\t */\n\t@property({ type: ButtonDesign, defaultValue: ButtonDesign.Default })\n\tdesign!: `${ButtonDesign}`;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines the icon, displayed as graphical element within the component.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * Example:\n\t * See all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\ticon!: string;\n\n\t/**\n\t * Defines whether the icon should be displayed after the component text.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\ticonEnd!: boolean;\n\n\t/**\n\t * When set to `true`, the component will\n\t * automatically submit the nearest HTML form element on `press`.\n\t *\n\t * **Note:** For the `submits` property to have effect, you must add the following import to your project:\n\t * `import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`\n\t * @default false\n\t * @public\n\t * @deprecated Set the \"type\" property to \"Submit\" to achieve the same result. The \"submits\" property is ignored if \"type\" is set to any value other than \"Button\".\n\t */\n\t@property({ type: Boolean })\n\tsubmits!: boolean;\n\n\t/**\n\t * Defines the tooltip of the component.\n\t *\n\t * **Note:** A tooltip attribute should be provided for icon-only buttons, in order to represent their exact meaning/function.\n\t * @default \"\"\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property()\n\ttooltip!: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ defaultValue: undefined })\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default \"\"\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property({ defaultValue: \"\" })\n\taccessibleNameRef!: string;\n\n\t/**\n\t * An object of strings that defines several additional accessibility attribute values\n\t * for customization depending on the use case.\n\t *\n\t * It supports the following fields:\n\t *\n\t * - `expanded`: Indicates whether the button, or another grouping element it controls, is currently expanded or collapsed. Accepts the following string values:\n\t *\t- `true`\n\t *\t- `false`\n\t *\n\t * - `hasPopup`: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button. Accepts the following string values:\n\t *\t- `Dialog`\n\t *\t- `Grid`\n\t *\t- `ListBox`\n\t *\t- `Menu`\n\t *\t- `Tree`\n\t *\n\t * - `controls`: Identifies the element (or elements) whose contents or presence are controlled by the button element. Accepts a string value.\n\t * @public\n\t * @since 1.2.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes!: AccessibilityAttributes;\n\n\t/**\n\t * Defines whether the button has special form-related functionality.\n\t *\n\t * **Note:** For the `type` property to have effect, you must add the following import to your project:\n\t * `import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`\n\t * @default \"Button\"\n\t * @public\n\t * @since 1.15.0\n\t */\n\t@property({ type: ButtonType, defaultValue: ButtonType.Button })\n\ttype!: `${ButtonType}`;\n\n\t/**\n\t * Describes the accessibility role of the button.\n\t *\n\t * **Note:** Use link role only with a press handler, which performs a navigation. In all other scenarios the default button semantics are recommended.\n\t *\n\t * @default \"Button\"\n\t * @public\n\t * @since 1.23\n\t */\n\t@property({ type: ButtonAccessibleRole, defaultValue: ButtonAccessibleRole.Button })\n\taccessibleRole!: `${ButtonAccessibleRole}`;\n\n\t/**\n\t * Used to switch the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive!: boolean;\n\n\t/**\n\t * Defines if a content has been added to the default slot\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\ticonOnly!: boolean;\n\n\t/**\n\t * Indicates if the elements is on focus\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused!: boolean;\n\n\t/**\n\t * Indicates if the elements has a slotted icon\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thasIcon!: boolean;\n\n\t/**\n\t * Indicates if the element if focusable\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tnonInteractive!: boolean;\n\n\t/**\n\t * The current title of the button, either the tooltip property or the icons tooltip. The tooltip property with higher prio.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tbuttonTitle?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_iconSettings!: object;\n\n\t/**\n\t * Defines the tabIndex of the component.\n\t * @private\n\t */\n\t@property({ defaultValue: \"0\", noAttribute: true })\n\tforcedTabIndex!: string;\n\n\t/**\n\t * @since 1.0.0-rc.13\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isTouch!: boolean;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_cancelAction!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true })\n\ttext!: Array<Node>;\n\n\t_deactivate: () => void;\n\n\t_ontouchstart: PassiveEventListenerObject;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeButton) {\n\t\t\t\tactiveButton._setActiveState(false);\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\n\t\tconst handleTouchStartEvent = (e: TouchEvent) => {\n\t\t\tmarkEvent(e, \"button\");\n\n\t\t\tif (this.nonInteractive) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._setActiveState(true);\n\t\t};\n\n\t\tthis._ontouchstart = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\tonEnterDOM() {\n\t\tthis._isTouch = (isPhone() || isTablet()) && !isCombi();\n\t}\n\n\tasync onBeforeRendering() {\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (this.type !== ButtonType.Button && !formSupport) {\n\t\t\tconsole.warn(`In order for the \"type\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\t\tif (this.submits && !formSupport) {\n\t\t\tconsole.warn(`In order for the \"submits\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\n\t\tthis.iconOnly = this.isIconOnly;\n\t\tthis.hasIcon = !!this.icon;\n\n\t\tthis.buttonTitle = this.tooltip || await getIconAccessibleName(this.icon);\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tmarkEvent(e, \"button\");\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport && this._isSubmit) {\n\t\t\tformSupport.triggerFormSubmit(this);\n\t\t}\n\t\tif (formSupport && this._isReset) {\n\t\t\tformSupport.triggerFormReset(this);\n\t\t}\n\n\t\tif (isSafari()) {\n\t\t\tthis.getDomRef()?.focus();\n\t\t}\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tif (this.nonInteractive || this._isTouch) {\n\t\t\treturn;\n\t\t}\n\n\t\tmarkEvent(e, \"button\");\n\t\tthis._setActiveState(true);\n\t\tactiveButton = this; // eslint-disable-line\n\t}\n\n\t_ontouchend(e: TouchEvent) {\n\t\tif (this.disabled) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\tif (this.active) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\n\t\tif (activeButton) {\n\t\t\tactiveButton._setActiveState(false);\n\t\t}\n\t}\n\n\t_onmouseup(e: MouseEvent) {\n\t\tmarkEvent(e, \"button\");\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tthis._cancelAction = isShift(e) || isEscape(e);\n\t\tmarkEvent(e, \"button\");\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis._setActiveState(true);\n\t\t} else if (this._cancelAction) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this._cancelAction) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tif (this.active) {\n\t\t\t\tthis._setActiveState(false);\n\t\t\t}\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.active) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\n\t\tif (isDesktop()) {\n\t\t\tthis.focused = false;\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tmarkEvent(e, \"button\");\n\t\tif (isDesktop()) {\n\t\t\tthis.focused = true;\n\t\t}\n\t}\n\n\t_setActiveState(active: boolean) {\n\t\tconst eventPrevented = !this.fireEvent(\"_active-state-change\", null, true);\n\n\t\tif (eventPrevented) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = active;\n\t}\n\n\tget _hasPopup() {\n\t\treturn this.accessibilityAttributes.hasPopup?.toLowerCase();\n\t}\n\n\tget hasButtonType() {\n\t\treturn this.design !== ButtonDesign.Default && this.design !== ButtonDesign.Transparent;\n\t}\n\n\tget iconRole() {\n\t\tif (!this.icon) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn \"presentation\";\n\t}\n\n\tget isIconOnly() {\n\t\treturn !willShowContent(this.text);\n\t}\n\n\tstatic typeTextMappings(): Record<string, I18nText> {\n\t\treturn {\n\t\t\t\"Positive\": BUTTON_ARIA_TYPE_ACCEPT,\n\t\t\t\"Negative\": BUTTON_ARIA_TYPE_REJECT,\n\t\t\t\"Emphasized\": BUTTON_ARIA_TYPE_EMPHASIZED,\n\t\t};\n\t}\n\n\tget buttonTypeText() {\n\t\treturn Button.i18nBundle.getText(Button.typeTextMappings()[this.design]);\n\t}\n\n\tget buttonAccessibleRole() {\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\tget tabIndexValue() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\n\t\tif (tabindex) {\n\t\t\treturn tabindex;\n\t\t}\n\n\t\treturn this.nonInteractive ? \"-1\" : this.forcedTabIndex;\n\t}\n\n\tget showIconTooltip() {\n\t\treturn this.iconOnly && !this.tooltip;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget ariaDescribedbyText() {\n\t\treturn this.hasButtonType ? \"ui5-button-hiddenText-type\" : undefined;\n\t}\n\n\tget _isSubmit() {\n\t\treturn this.type === ButtonType.Submit || this.submits;\n\t}\n\n\tget _isReset() {\n\t\treturn this.type === ButtonType.Reset;\n\t}\n\n\tstatic async onDefine() {\n\t\tButton.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nButton.define();\n\nexport default Button;\nexport type {\n\tAccessibilityAttributes,\n\tIButton,\n};\n"]}
|
package/dist/DatePicker.d.ts
CHANGED
|
@@ -300,6 +300,7 @@ declare class DatePicker extends DateComponentBase implements IFormElement {
|
|
|
300
300
|
get openIconTitle(): string;
|
|
301
301
|
get openIconName(): string;
|
|
302
302
|
get dateAriaDescription(): string;
|
|
303
|
+
get pickerAccessibleName(): string;
|
|
303
304
|
/**
|
|
304
305
|
* Defines whether the dialog on mobile should have header
|
|
305
306
|
* @private
|
package/dist/DatePicker.js
CHANGED
|
@@ -23,7 +23,7 @@ import CalendarPickersMode from "./types/CalendarPickersMode.js";
|
|
|
23
23
|
import "@ui5/webcomponents-icons/dist/appointment-2.js";
|
|
24
24
|
import "@ui5/webcomponents-icons/dist/decline.js";
|
|
25
25
|
import HasPopup from "./types/HasPopup.js";
|
|
26
|
-
import { DATEPICKER_OPEN_ICON_TITLE, DATEPICKER_DATE_DESCRIPTION, INPUT_SUGGESTIONS_TITLE } from "./generated/i18n/i18n-defaults.js";
|
|
26
|
+
import { DATEPICKER_OPEN_ICON_TITLE, DATEPICKER_DATE_DESCRIPTION, INPUT_SUGGESTIONS_TITLE, DATEPICKER_POPOVER_ACCESSIBLE_NAME, } from "./generated/i18n/i18n-defaults.js";
|
|
27
27
|
import DateComponentBase from "./DateComponentBase.js";
|
|
28
28
|
import Icon from "./Icon.js";
|
|
29
29
|
import Button from "./Button.js";
|
|
@@ -396,6 +396,9 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
|
|
|
396
396
|
get dateAriaDescription() {
|
|
397
397
|
return DatePicker_1.i18nBundle.getText(DATEPICKER_DATE_DESCRIPTION);
|
|
398
398
|
}
|
|
399
|
+
get pickerAccessibleName() {
|
|
400
|
+
return DatePicker_1.i18nBundle.getText(DATEPICKER_POPOVER_ACCESSIBLE_NAME);
|
|
401
|
+
}
|
|
399
402
|
/**
|
|
400
403
|
* Defines whether the dialog on mobile should have header
|
|
401
404
|
* @private
|
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;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H,UAAU,EAAE;gBACX,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;GACI,UAAU,CA0mBf;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 * ### Overview\n *\n * The `ui5-date-picker` component provides an input field with assigned calendar which opens on user action.\n * The `ui5-date-picker` 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 * ### Usage\n *\n * The user can enter a date by:\n *\n * - Using the calendar that opens in a popup\n * - Typing it in directly in the input field\n *\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 * ### Formatting\n *\n * If a date is entered by typing it into\n * the input field, it must fit to the used date format.\n *\n * Supported format options are pattern-based on Unicode LDML Date Format notation.\n * For more information, see [UTS #35: Unicode Locale Data Markup Language](http://unicode.org/reports/tr35/#Date_Field_Symbol_Table).\n *\n * For example, if the `format-pattern` is \"yyyy-MM-dd\",\n * a valid value string is \"2015-07-30\" and the same is displayed in the input.\n *\n * ### Keyboard Handling\n * The `ui5-date-picker` provides advanced keyboard handling.\n * If the `ui5-date-picker` is focused,\n * you can open or close the drop-down by pressing [F4], [Alt] + [Up] or [Alt] + [Down] keys.\n * Once the drop-down is opened, you can use the [Up], [Down], [Left] or [Right] arrow keys\n * to navigate through the dates and select one by pressing the `Space` or `Enter` keys. Moreover you can\n * use TAB to reach the buttons for changing month and year.\n *\n * If the `ui5-date-picker` input field is focused and its corresponding picker dialog is not opened,\n * then users can increment or decrement the date referenced by `dateValue` property\n * by using the following shortcuts:\n *\n * - [Page Down] - Decrements the corresponding day of the month by one\n * - [Shift] + [Page Down] - Decrements the corresponding month by one\n * - [Shift] + [Ctrl] + [Page Down] - Decrements the corresponding year by one\n * - [Page Up] - Increments the corresponding day of the month by one\n * - [Shift] + [Page Up] - Increments the corresponding month by one\n * - [Shift] + [Ctrl] + [Page Up] - Increments the corresponding year by one\n *\n * ### Calendar types\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 `primaryCalendarType` property and import one or more of the following modules:\n *\n * `import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";`\n *\n * `import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";`\n *\n * `import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";`\n *\n * `import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";`\n *\n * Or, you can use the global configuration and set the `calendarType` key:\n *\n * ```html\n * <script data-id=\"sap-ui-config\" type=\"application/json\">\n * \t{\n * \t\t\"calendarType\": \"Japanese\"\n * \t}\n * <script>\n * ```\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/DatePicker.js\";`\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 * @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 * @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 * @allowPreventDefault\n * @public\n * @param {string} valueState The new `valueState` 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 * @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 * @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 * @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 * @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 * @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 * **Note:** 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 * @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 * **Important:** For the `name` property to have effect, you must add the following import to your project:\n\t * `import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`\n\t *\n\t * **Note:** When set, a native `input` 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 * @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 *\n\t * **Note:** For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\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 * @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 * @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 *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the component is in `Information`, `Warning` or `Error` value state.\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 `input` HTML element within Light DOM to enable form submit,\n\t * when `name` property is set.\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 * @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 * @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 * @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 * @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 * @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 * @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 * @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 * @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 * @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 * @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\"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 * @private\n\t */\n\tget _shouldHideHeader() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns the first picker depending on the CalendarPickerMode\n\t */\n\tget firstPicker() {\n\t\tconst calendarPickerMode = this._calendarPickersMode;\n\t\tlet firstPicker = \"day\";\n\n\t\tif (calendarPickerMode === CalendarPickersMode.YEAR) {\n\t\t\tfirstPicker = \"year\";\n\t\t} else if (calendarPickerMode === CalendarPickersMode.MONTH_YEAR) {\n\t\t\tfirstPicker = \"month\";\n\t\t}\n\n\t\treturn firstPicker;\n\t}\n\n\t/**\n\t * Defines whether the value help icon is hidden\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 * @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 `formatPattern` property of the DatePicker instance\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 * @public\n\t */\n\tclosePicker(): void {\n\t\tthis.responsivePopover!.close();\n\t}\n\n\t/**\n\t * Opens the picker.\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 = this.firstPicker;\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 * @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 * @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;AAC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AAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IACF;;;;;;OAMG;;IACF,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;;;;;;;;OAQG;;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,CA8mBf;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 {\n\tDATEPICKER_OPEN_ICON_TITLE,\n\tDATEPICKER_DATE_DESCRIPTION,\n\tINPUT_SUGGESTIONS_TITLE,\n\tDATEPICKER_POPOVER_ACCESSIBLE_NAME,\n} 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 * ### Overview\n *\n * The `ui5-date-picker` component provides an input field with assigned calendar which opens on user action.\n * The `ui5-date-picker` 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 * ### Usage\n *\n * The user can enter a date by:\n *\n * - Using the calendar that opens in a popup\n * - Typing it in directly in the input field\n *\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 * ### Formatting\n *\n * If a date is entered by typing it into\n * the input field, it must fit to the used date format.\n *\n * Supported format options are pattern-based on Unicode LDML Date Format notation.\n * For more information, see [UTS #35: Unicode Locale Data Markup Language](http://unicode.org/reports/tr35/#Date_Field_Symbol_Table).\n *\n * For example, if the `format-pattern` is \"yyyy-MM-dd\",\n * a valid value string is \"2015-07-30\" and the same is displayed in the input.\n *\n * ### Keyboard Handling\n * The `ui5-date-picker` provides advanced keyboard handling.\n * If the `ui5-date-picker` is focused,\n * you can open or close the drop-down by pressing [F4], [Alt] + [Up] or [Alt] + [Down] keys.\n * Once the drop-down is opened, you can use the [Up], [Down], [Left] or [Right] arrow keys\n * to navigate through the dates and select one by pressing the `Space` or `Enter` keys. Moreover you can\n * use TAB to reach the buttons for changing month and year.\n *\n * If the `ui5-date-picker` input field is focused and its corresponding picker dialog is not opened,\n * then users can increment or decrement the date referenced by `dateValue` property\n * by using the following shortcuts:\n *\n * - [Page Down] - Decrements the corresponding day of the month by one\n * - [Shift] + [Page Down] - Decrements the corresponding month by one\n * - [Shift] + [Ctrl] + [Page Down] - Decrements the corresponding year by one\n * - [Page Up] - Increments the corresponding day of the month by one\n * - [Shift] + [Page Up] - Increments the corresponding month by one\n * - [Shift] + [Ctrl] + [Page Up] - Increments the corresponding year by one\n *\n * ### Calendar types\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 `primaryCalendarType` property and import one or more of the following modules:\n *\n * `import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";`\n *\n * `import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";`\n *\n * `import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";`\n *\n * `import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";`\n *\n * Or, you can use the global configuration and set the `calendarType` key:\n *\n * ```html\n * <script data-id=\"sap-ui-config\" type=\"application/json\">\n * \t{\n * \t\t\"calendarType\": \"Japanese\"\n * \t}\n * <script>\n * ```\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/DatePicker.js\";`\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 * @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 * @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 * @allowPreventDefault\n * @public\n * @param {string} valueState The new `valueState` 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 * @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 * @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 * @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 * @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 * @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 * **Note:** 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 * @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 * **Important:** For the `name` property to have effect, you must add the following import to your project:\n\t * `import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`\n\t *\n\t * **Note:** When set, a native `input` 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 * @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 *\n\t * **Note:** For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\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 * @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 * @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 *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the component is in `Information`, `Warning` or `Error` value state.\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 `input` HTML element within Light DOM to enable form submit,\n\t * when `name` property is set.\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 * @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 * @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 * @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 * @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 * @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 * @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 * @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 * @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 * @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 * @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\"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\tget pickerAccessibleName() {\n\t\treturn DatePicker.i18nBundle.getText(DATEPICKER_POPOVER_ACCESSIBLE_NAME);\n\t}\n\n\t/**\n\t * Defines whether the dialog on mobile should have header\n\t * @private\n\t */\n\tget _shouldHideHeader() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns the first picker depending on the CalendarPickerMode\n\t */\n\tget firstPicker() {\n\t\tconst calendarPickerMode = this._calendarPickersMode;\n\t\tlet firstPicker = \"day\";\n\n\t\tif (calendarPickerMode === CalendarPickersMode.YEAR) {\n\t\t\tfirstPicker = \"year\";\n\t\t} else if (calendarPickerMode === CalendarPickersMode.MONTH_YEAR) {\n\t\t\tfirstPicker = \"month\";\n\t\t}\n\n\t\treturn firstPicker;\n\t}\n\n\t/**\n\t * Defines whether the value help icon is hidden\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 * @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 `formatPattern` property of the DatePicker instance\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 * @public\n\t */\n\tclosePicker(): void {\n\t\tthis.responsivePopover!.close();\n\t}\n\n\t/**\n\t * Opens the picker.\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 = this.firstPicker;\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 * @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 * @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"]}
|
|
@@ -95,7 +95,14 @@ declare class DateRangePicker extends DatePicker {
|
|
|
95
95
|
* @override
|
|
96
96
|
*/
|
|
97
97
|
get _placeholder(): string;
|
|
98
|
+
/**
|
|
99
|
+
* @override
|
|
100
|
+
*/
|
|
98
101
|
get dateAriaDescription(): string;
|
|
102
|
+
/**
|
|
103
|
+
* @override
|
|
104
|
+
*/
|
|
105
|
+
get pickerAccessibleName(): string;
|
|
99
106
|
/**
|
|
100
107
|
* @override
|
|
101
108
|
*/
|
package/dist/DateRangePicker.js
CHANGED
|
@@ -11,7 +11,7 @@ import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
|
|
11
11
|
import CalendarDate from "@ui5/webcomponents-localization/dist/dates/CalendarDate.js";
|
|
12
12
|
import modifyDateBy from "@ui5/webcomponents-localization/dist/dates/modifyDateBy.js";
|
|
13
13
|
import getTodayUTCTimestamp from "@ui5/webcomponents-localization/dist/dates/getTodayUTCTimestamp.js";
|
|
14
|
-
import { DATERANGE_DESCRIPTION } from "./generated/i18n/i18n-defaults.js";
|
|
14
|
+
import { DATERANGE_DESCRIPTION, DATERANGEPICKER_POPOVER_ACCESSIBLE_NAME } from "./generated/i18n/i18n-defaults.js";
|
|
15
15
|
// Styles
|
|
16
16
|
import DateRangePickerCss from "./generated/themes/DateRangePicker.css.js";
|
|
17
17
|
import DatePicker from "./DatePicker.js";
|
|
@@ -127,9 +127,18 @@ let DateRangePicker = DateRangePicker_1 = class DateRangePicker extends DatePick
|
|
|
127
127
|
get _placeholder() {
|
|
128
128
|
return this.placeholder !== undefined ? this.placeholder : `${this._displayFormat} ${this._effectiveDelimiter} ${this._displayFormat}`;
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* @override
|
|
132
|
+
*/
|
|
130
133
|
get dateAriaDescription() {
|
|
131
134
|
return DateRangePicker_1.i18nBundle.getText(DATERANGE_DESCRIPTION);
|
|
132
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* @override
|
|
138
|
+
*/
|
|
139
|
+
get pickerAccessibleName() {
|
|
140
|
+
return DateRangePicker_1.i18nBundle.getText(DATERANGEPICKER_POPOVER_ACCESSIBLE_NAME);
|
|
141
|
+
}
|
|
133
142
|
/**
|
|
134
143
|
* @override
|
|
135
144
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.js","sourceRoot":"","sources":["../src/DateRangePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,oBAAoB,MAAM,oEAAoE,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,SAAS;AACT,OAAO,kBAAkB,MAAM,2CAA2C,CAAC;AAC3E,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AAQjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,IAAM,eAAe,uBAArB,MAAM,eAAgB,SAAQ,UAAU;IAmBvC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;OAIG;IACH,IAAI,YAAY;QACf,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IA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EAAE;gBACvB,OAAO,eAAe,CAAC;aACvB;YAED,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;YAC9E,OAAO,GAAG,eAAe,IAAI,IAAI,CAAC,mBAAmB,IAAI,cAAc,EAAE,CAAC;SAC1E;QAED,OAAO,EAAE,CAAC;IACX,CAAC;IAED;;OAEG;IACH,IAAI,oBAAoB;QACvB,OAAO,mBAAmB,CAAC,cAAc,CAAC;IAC3C,CAAC;CACD,CAAA;AA5RA;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC;kDACb;AAOnB;IADC,QAAQ,EAAE;mDACS;AAff,eAAe;IAJpB,aAAa,CAAC;QACd,GAAG,EAAE,sBAAsB;QAC3B,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,kBAAkB,CAAC;KAC/C,CAAC;GACI,eAAe,CAoSpB;AAED,eAAe,CAAC,MAAM,EAAE,CAAC;AAEzB,eAAe,eAAe,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport modifyDateBy from \"@ui5/webcomponents-localization/dist/dates/modifyDateBy.js\";\nimport getTodayUTCTimestamp from \"@ui5/webcomponents-localization/dist/dates/getTodayUTCTimestamp.js\";\nimport { DATERANGE_DESCRIPTION } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport DateRangePickerCss from \"./generated/themes/DateRangePicker.css.js\";\nimport DatePicker from \"./DatePicker.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\n\nimport type {\n\tDatePickerChangeEventDetail as DateRangePickerChangeEventDetail,\n\tDatePickerInputEventDetail as DateRangePickerInputEventDetail,\n} from \"./DatePicker.js\";\nimport type { CalendarSelectedDatesChangeEventDetail } from \"./Calendar.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The DateRangePicker enables the users to enter a localized date range using touch, mouse, keyboard input, or by selecting a date range in the calendar.\n *\n * ### Usage\n * The user can enter a date by:\n * Using the calendar that opens in a popup or typing it in directly in the input field (not available for mobile devices).\n * For the `ui5-daterange-picker`\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/DateRangePicker.js\";`\n *\n * ### Keyboard Handling\n * The `ui5-daterange-picker` provides advanced keyboard handling.\n *\n * When the `ui5-daterange-picker` input field is focused the user can\n * increment or decrement respectively the range start or end date, depending on where the cursor is.\n * The following shortcuts are available:\n *\n * - [Page Down] - Decrements the corresponding day of the month by one\n * - [Shift] + [Page Down] - Decrements the corresponding month by one\n * - [Shift] + [Ctrl] + [Page Down] - Decrements the corresponding year by one\n * - [Page Up] - Increments the corresponding day of the month by one\n * - [Shift] + [Page Up] - Increments the corresponding month by one\n * - [Shift] + [Ctrl] + [Page Up] - Increments the corresponding year by one\n * @constructor\n * @extends DatePicker\n * @since 1.0.0-rc.8\n * @public\n */\n@customElement({\n\ttag: \"ui5-daterange-picker\",\n\tstyles: [DatePicker.styles, DateRangePickerCss],\n})\nclass DateRangePicker extends DatePicker {\n\t /**\n\t * Determines the symbol which separates the dates.\n\t * If not supplied, the default time interval delimiter for the current locale will be used.\n\t * @default \"-\"\n\t * @public\n\t */\n\t@property({ defaultValue: \"-\" })\n\tdelimiter!: string;\n\n\t /**\n\t * The first date in the range during selection (this is a temporary value, not the first date in the value range)\n\t * @private\n\t */\n\t@property()\n\t_tempValue!: string;\n\n\tprivate _prevDelimiter: string | null;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._prevDelimiter = null;\n\t}\n\n\t/**\n\t * **Note:** The getter method is inherited and not supported. If called it will return an empty value.\n\t * @public\n\t * @default null\n\t */\n\tget dateValue(): Date | null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * **Note:** The getter method is inherited and not supported. If called it will return an empty value.\n\t * @public\n\t * @default null\n\t */\n\tget dateValueUTC(): Date | null {\n\t\treturn null;\n\t}\n\n\tget _startDateTimestamp() {\n\t\treturn this._extractFirstTimestamp(this.value);\n\t}\n\n\tget _endDateTimestamp() {\n\t\treturn this._extractLastTimestamp(this.value);\n\t}\n\n\tget _tempTimestamp() {\n\t\treturn this._tempValue && (this.getFormat().parse(this._tempValue, true) as Date).getTime() / 1000;\n\t}\n\n\t/**\n\t * Required by DatePicker.js\n\t * @override\n\t */\n\tget _calendarSelectionMode() {\n\t\treturn \"Range\";\n\t}\n\n\t/**\n\t * Required by DatePicker.js - set the calendar focus on the first selected date (or today if not set)\n\t * @override\n\t */\n\tget _calendarTimestamp() {\n\t\treturn this._tempTimestamp || this._startDateTimestamp || getTodayUTCTimestamp(this._primaryCalendarType);\n\t}\n\n\t/**\n\t * Required by DatePicker.js\n\t * @override\n\t */\n\tget _calendarSelectedDates() {\n\t\tif (this._tempValue) {\n\t\t\treturn [this._tempValue];\n\t\t}\n\t\tif (this.value && this._checkValueValidity(this.value)) {\n\t\t\treturn this._splitValueByDelimiter(this.value);\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns the start date of the currently selected range as JavaScript Date instance.\n\t * @public\n\t * @default null\n\t */\n\tget startDateValue(): Date | null {\n\t\treturn CalendarDate.fromTimestamp(this._startDateTimestamp! * 1000).toLocalJSDate();\n\t}\n\n\t/**\n\t * Returns the end date of the currently selected range as JavaScript Date instance.\n\t * @public\n\t * @default null\n\t */\n\tget endDateValue(): Date | null {\n\t\treturn CalendarDate.fromTimestamp(this._endDateTimestamp! * 1000).toLocalJSDate();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tget _placeholder() {\n\t\treturn this.placeholder !== undefined ? this.placeholder : `${this._displayFormat} ${this._effectiveDelimiter} ${this._displayFormat}`;\n\t}\n\n\tget dateAriaDescription() {\n\t\treturn DateRangePicker.i18nBundle.getText(DATERANGE_DESCRIPTION);\n\t}\n\n\t/**\n\t * @override\n\t */\n\tasync _onInputSubmit() {\n\t\tconst input = this._getInput();\n\t\tconst caretPos = input.getCaretPosition();\n\t\tawait renderFinished();\n\t\tinput.setCaretPosition(caretPos); // Return the caret on the previous position after rendering\n\t}\n\n\t/**\n\t * @override\n\t */\n\t onResponsivePopoverAfterClose() {\n\t\tthis._tempValue = \"\"; // reset _tempValue on popover close\n\t\tsuper.onResponsivePopoverAfterClose();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tisValid(value: string): boolean {\n\t\tconst parts = this._splitValueByDelimiter(value);\n\t\treturn parts.length <= 2 && parts.every(dateString => super.isValid(dateString)); // must be at most 2 dates and each must be valid\n\t}\n\n\t/**\n\t * @override\n\t */\n\tisInValidRange(value: string): boolean {\n\t\treturn this._splitValueByDelimiter(value).every(dateString => super.isInValidRange(dateString));\n\t}\n\n\t/**\n\t * Extract both dates as timestamps, flip if necessary, and build (which will use the desired format so we enforce the format too)\n\t * @override\n\t */\n\tnormalizeValue(value: string) {\n\t\tconst firstDateTimestamp = this._extractFirstTimestamp(value);\n\t\tconst lastDateTimestamp = this._extractLastTimestamp(value);\n\t\tif (firstDateTimestamp && lastDateTimestamp && firstDateTimestamp > lastDateTimestamp) { // if both are timestamps (not undefined), flip if necessary\n\t\t\treturn this._buildValue(lastDateTimestamp, firstDateTimestamp);\n\t\t}\n\t\treturn this._buildValue(firstDateTimestamp, lastDateTimestamp);\n\t}\n\n\t/**\n\t * @override\n\t */\n\tonSelectedDatesChange(event: CustomEvent<CalendarSelectedDatesChangeEventDetail>) {\n\t\tevent.preventDefault(); // never let the calendar update its own dates, the parent component controls them\n\t\tconst values = event.detail.values;\n\n\t\tif (values.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (values.length === 1) { // Do nothing until the user selects 2 dates, we don't change any state at all for one date\n\t\t\tthis._tempValue = values[0];\n\t\t\treturn;\n\t\t}\n\t\tconst newValue = this._buildValue(event.detail.dates[0], event.detail.dates[1]); // the value will be normalized so we don't need to order them here\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\t\tthis.closePicker();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tasync _modifyDateValue(amount: number, unit: string, preserveDate?: boolean) {\n\t\tif (!this._endDateTimestamp) { // If empty or only one date -> treat as datepicker entirely\n\t\t\treturn super._modifyDateValue(amount, unit, preserveDate);\n\t\t}\n\n\t\tconst input = this._getInput();\n\t\tlet caretPos: number = input.getCaretPosition()!; // caret position is always number for input of type text;\n\t\tlet newValue: string;\n\n\t\tif (caretPos <= this.value.indexOf(this._effectiveDelimiter)) { // The user is focusing the first date -> change it and keep the second date\n\t\t\tconst startDateModified = modifyDateBy(CalendarDate.fromTimestamp(this._startDateTimestamp! * 1000), amount, unit, preserveDate, this._minDate, this._maxDate);\n\t\t\tconst newStartDateTimestamp = startDateModified.valueOf() / 1000;\n\t\t\tif (newStartDateTimestamp > this._endDateTimestamp) { // dates flipped -> move the caret to the same position but on the last date\n\t\t\t\tcaretPos += Math.ceil(this.value.length / 2);\n\t\t\t}\n\t\t\tnewValue = this._buildValue(newStartDateTimestamp, this._endDateTimestamp); // the value will be normalized so we don't try to order them here\n\t\t} else {\n\t\t\tconst endDateModified = modifyDateBy(CalendarDate.fromTimestamp(this._endDateTimestamp * 1000), amount, unit, preserveDate, this._minDate, this._maxDate);\n\t\t\tconst newEndDateTimestamp = endDateModified.valueOf() / 1000;\n\t\t\tnewValue = this._buildValue(this._startDateTimestamp, newEndDateTimestamp); // the value will be normalized so we don't try to order them here\n\t\t\tif (newEndDateTimestamp < this._startDateTimestamp!) { // dates flipped -> move the caret to the same position but on the first date\n\t\t\t\tcaretPos -= Math.ceil(this.value.length / 2);\n\t\t\t}\n\t\t}\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\n\t\tawait renderFinished();\n\t\tinput.setCaretPosition(caretPos); // Return the caret to the previous (or the adjusted, if dates flipped) position after rendering\n\t}\n\n\tget _effectiveDelimiter(): string {\n\t\tconst ctor = this.constructor as typeof DateRangePicker;\n\t\treturn this.delimiter || (ctor.getMetadata().getProperties().delimiter.defaultValue) as string;\n\t}\n\n\t_splitValueByDelimiter(value: string) {\n\t\tconst valuesArray: Array<string> = [];\n\t\tconst partsArray = value.split(this._prevDelimiter || this._effectiveDelimiter);\n\n\t\t// if format successfully parse the value, the value contains only single date\n\t\tif (this.getFormat().parse(value)) {\n\t\t\tvaluesArray[0] = partsArray.join(this._effectiveDelimiter);\n\t\t\tvaluesArray[1] = \"\";\n\t\t} else {\n\t\t\tvaluesArray[0] = partsArray.slice(0, partsArray.length / 2).join(this._effectiveDelimiter);\n\t\t\tvaluesArray[1] = partsArray.slice(partsArray.length / 2).join(this._effectiveDelimiter);\n\t\t}\n\n\t\treturn valuesArray;\n\t}\n\n\t/**\n\t * Returns a UTC timestamp, representing the first date in the value string or undefined if the value is empty\n\t * @private\n\t */\n\t_extractFirstTimestamp(value: string) {\n\t\tif (!value || !this._checkValueValidity(value)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst dateStrings = this._splitValueByDelimiter(value); // at least one item guaranteed due to the checks above (non-empty and valid)\n\n\t\tconst parsedDate = this.getFormat().parse(dateStrings[0], true) as Date;\n\t\treturn parsedDate.getTime() / 1000;\n\t}\n\n\t/**\n\t * Returns a UTC timestamp, representing the last date in the value string or undefined if the value is empty or there is just one date\n\t * @private\n\t */\n\t_extractLastTimestamp(value: string) {\n\t\tif (!value || !this._checkValueValidity(value)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst dateStrings = this._splitValueByDelimiter(value);\n\t\tif (dateStrings[1]) {\n\t\t\tconst parsedDate = this.getFormat().parse(dateStrings[1], true) as Date;\n\t\t\treturn parsedDate.getTime() / 1000;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Builds a string value out of two UTC timestamps - this method is the counterpart to _extractFirstTimestamp/_extractLastTimestamp\n\t * @private\n\t */\n\t_buildValue(firstDateTimestamp: number | undefined, lastDateTimestamp: number | undefined) {\n\t\tthis._prevDelimiter = this._effectiveDelimiter;\n\t\tif (firstDateTimestamp) {\n\t\t\tconst firstDateString = this._getStringFromTimestamp(firstDateTimestamp * 1000);\n\n\t\t\tif (!lastDateTimestamp) {\n\t\t\t\treturn firstDateString;\n\t\t\t}\n\n\t\t\tconst lastDateString = this._getStringFromTimestamp(lastDateTimestamp * 1000);\n\t\t\treturn `${firstDateString} ${this._effectiveDelimiter} ${lastDateString}`;\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * @override\n\t */\n\tget _calendarPickersMode() {\n\t\treturn CalendarPickersMode.DAY_MONTH_YEAR;\n\t}\n}\n\nDateRangePicker.define();\n\nexport default DateRangePicker;\nexport type {\n\tDateRangePickerChangeEventDetail,\n\tDateRangePickerInputEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"DateRangePicker.js","sourceRoot":"","sources":["../src/DateRangePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,oBAAoB,MAAM,oEAAoE,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,uCAAuC,EAAE,MAAM,mCAAmC,CAAC;AAEnH,SAAS;AACT,OAAO,kBAAkB,MAAM,2CAA2C,CAAC;AAC3E,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AAQjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,IAAM,eAAe,uBAArB,MAAM,eAAgB,SAAQ,UAAU;IAmBvC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,cAAc,GAAG,IAAI,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QAED,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,kBAAsC,EAAE,iBAAqC;QACxF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,mBAAmB,CAAC;QAC/C,IAAI,kBAAkB,EAAE;YACvB,MAAM,eAAe,GAAG,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;YAEhF,IAAI,CAAC,iBAAiB,EAAE;gBACvB,OAAO,eAAe,CAAC;aACvB;YAED,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;YAC9E,OAAO,GAAG,eAAe,IAAI,IAAI,CAAC,mBAAmB,IAAI,cAAc,EAAE,CAAC;SAC1E;QAED,OAAO,EAAE,CAAC;IACX,CAAC;IAED;;OAEG;IACH,IAAI,oBAAoB;QACvB,OAAO,mBAAmB,CAAC,cAAc,CAAC;IAC3C,CAAC;CACD,CAAA;AAtSA;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC;kDACb;AAOnB;IADC,QAAQ,EAAE;mDACS;AAff,eAAe;IAJpB,aAAa,CAAC;QACd,GAAG,EAAE,sBAAsB;QAC3B,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,kBAAkB,CAAC;KAC/C,CAAC;GACI,eAAe,CA8SpB;AAED,eAAe,CAAC,MAAM,EAAE,CAAC;AAEzB,eAAe,eAAe,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport modifyDateBy from \"@ui5/webcomponents-localization/dist/dates/modifyDateBy.js\";\nimport getTodayUTCTimestamp from \"@ui5/webcomponents-localization/dist/dates/getTodayUTCTimestamp.js\";\nimport { DATERANGE_DESCRIPTION, DATERANGEPICKER_POPOVER_ACCESSIBLE_NAME } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport DateRangePickerCss from \"./generated/themes/DateRangePicker.css.js\";\nimport DatePicker from \"./DatePicker.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\n\nimport type {\n\tDatePickerChangeEventDetail as DateRangePickerChangeEventDetail,\n\tDatePickerInputEventDetail as DateRangePickerInputEventDetail,\n} from \"./DatePicker.js\";\nimport type { CalendarSelectedDatesChangeEventDetail } from \"./Calendar.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The DateRangePicker enables the users to enter a localized date range using touch, mouse, keyboard input, or by selecting a date range in the calendar.\n *\n * ### Usage\n * The user can enter a date by:\n * Using the calendar that opens in a popup or typing it in directly in the input field (not available for mobile devices).\n * For the `ui5-daterange-picker`\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/DateRangePicker.js\";`\n *\n * ### Keyboard Handling\n * The `ui5-daterange-picker` provides advanced keyboard handling.\n *\n * When the `ui5-daterange-picker` input field is focused the user can\n * increment or decrement respectively the range start or end date, depending on where the cursor is.\n * The following shortcuts are available:\n *\n * - [Page Down] - Decrements the corresponding day of the month by one\n * - [Shift] + [Page Down] - Decrements the corresponding month by one\n * - [Shift] + [Ctrl] + [Page Down] - Decrements the corresponding year by one\n * - [Page Up] - Increments the corresponding day of the month by one\n * - [Shift] + [Page Up] - Increments the corresponding month by one\n * - [Shift] + [Ctrl] + [Page Up] - Increments the corresponding year by one\n * @constructor\n * @extends DatePicker\n * @since 1.0.0-rc.8\n * @public\n */\n@customElement({\n\ttag: \"ui5-daterange-picker\",\n\tstyles: [DatePicker.styles, DateRangePickerCss],\n})\nclass DateRangePicker extends DatePicker {\n\t /**\n\t * Determines the symbol which separates the dates.\n\t * If not supplied, the default time interval delimiter for the current locale will be used.\n\t * @default \"-\"\n\t * @public\n\t */\n\t@property({ defaultValue: \"-\" })\n\tdelimiter!: string;\n\n\t /**\n\t * The first date in the range during selection (this is a temporary value, not the first date in the value range)\n\t * @private\n\t */\n\t@property()\n\t_tempValue!: string;\n\n\tprivate _prevDelimiter: string | null;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._prevDelimiter = null;\n\t}\n\n\t/**\n\t * **Note:** The getter method is inherited and not supported. If called it will return an empty value.\n\t * @public\n\t * @default null\n\t */\n\tget dateValue(): Date | null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * **Note:** The getter method is inherited and not supported. If called it will return an empty value.\n\t * @public\n\t * @default null\n\t */\n\tget dateValueUTC(): Date | null {\n\t\treturn null;\n\t}\n\n\tget _startDateTimestamp() {\n\t\treturn this._extractFirstTimestamp(this.value);\n\t}\n\n\tget _endDateTimestamp() {\n\t\treturn this._extractLastTimestamp(this.value);\n\t}\n\n\tget _tempTimestamp() {\n\t\treturn this._tempValue && (this.getFormat().parse(this._tempValue, true) as Date).getTime() / 1000;\n\t}\n\n\t/**\n\t * Required by DatePicker.js\n\t * @override\n\t */\n\tget _calendarSelectionMode() {\n\t\treturn \"Range\";\n\t}\n\n\t/**\n\t * Required by DatePicker.js - set the calendar focus on the first selected date (or today if not set)\n\t * @override\n\t */\n\tget _calendarTimestamp() {\n\t\treturn this._tempTimestamp || this._startDateTimestamp || getTodayUTCTimestamp(this._primaryCalendarType);\n\t}\n\n\t/**\n\t * Required by DatePicker.js\n\t * @override\n\t */\n\tget _calendarSelectedDates() {\n\t\tif (this._tempValue) {\n\t\t\treturn [this._tempValue];\n\t\t}\n\t\tif (this.value && this._checkValueValidity(this.value)) {\n\t\t\treturn this._splitValueByDelimiter(this.value);\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns the start date of the currently selected range as JavaScript Date instance.\n\t * @public\n\t * @default null\n\t */\n\tget startDateValue(): Date | null {\n\t\treturn CalendarDate.fromTimestamp(this._startDateTimestamp! * 1000).toLocalJSDate();\n\t}\n\n\t/**\n\t * Returns the end date of the currently selected range as JavaScript Date instance.\n\t * @public\n\t * @default null\n\t */\n\tget endDateValue(): Date | null {\n\t\treturn CalendarDate.fromTimestamp(this._endDateTimestamp! * 1000).toLocalJSDate();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tget _placeholder() {\n\t\treturn this.placeholder !== undefined ? this.placeholder : `${this._displayFormat} ${this._effectiveDelimiter} ${this._displayFormat}`;\n\t}\n\n\t/**\n\t * @override\n\t */\n\tget dateAriaDescription() {\n\t\treturn DateRangePicker.i18nBundle.getText(DATERANGE_DESCRIPTION);\n\t}\n\n\t/**\n\t * @override\n\t */\n\tget pickerAccessibleName() {\n\t\treturn DateRangePicker.i18nBundle.getText(DATERANGEPICKER_POPOVER_ACCESSIBLE_NAME);\n\t}\n\n\t/**\n\t * @override\n\t */\n\tasync _onInputSubmit() {\n\t\tconst input = this._getInput();\n\t\tconst caretPos = input.getCaretPosition();\n\t\tawait renderFinished();\n\t\tinput.setCaretPosition(caretPos); // Return the caret on the previous position after rendering\n\t}\n\n\t/**\n\t * @override\n\t */\n\t onResponsivePopoverAfterClose() {\n\t\tthis._tempValue = \"\"; // reset _tempValue on popover close\n\t\tsuper.onResponsivePopoverAfterClose();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tisValid(value: string): boolean {\n\t\tconst parts = this._splitValueByDelimiter(value);\n\t\treturn parts.length <= 2 && parts.every(dateString => super.isValid(dateString)); // must be at most 2 dates and each must be valid\n\t}\n\n\t/**\n\t * @override\n\t */\n\tisInValidRange(value: string): boolean {\n\t\treturn this._splitValueByDelimiter(value).every(dateString => super.isInValidRange(dateString));\n\t}\n\n\t/**\n\t * Extract both dates as timestamps, flip if necessary, and build (which will use the desired format so we enforce the format too)\n\t * @override\n\t */\n\tnormalizeValue(value: string) {\n\t\tconst firstDateTimestamp = this._extractFirstTimestamp(value);\n\t\tconst lastDateTimestamp = this._extractLastTimestamp(value);\n\t\tif (firstDateTimestamp && lastDateTimestamp && firstDateTimestamp > lastDateTimestamp) { // if both are timestamps (not undefined), flip if necessary\n\t\t\treturn this._buildValue(lastDateTimestamp, firstDateTimestamp);\n\t\t}\n\t\treturn this._buildValue(firstDateTimestamp, lastDateTimestamp);\n\t}\n\n\t/**\n\t * @override\n\t */\n\tonSelectedDatesChange(event: CustomEvent<CalendarSelectedDatesChangeEventDetail>) {\n\t\tevent.preventDefault(); // never let the calendar update its own dates, the parent component controls them\n\t\tconst values = event.detail.values;\n\n\t\tif (values.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (values.length === 1) { // Do nothing until the user selects 2 dates, we don't change any state at all for one date\n\t\t\tthis._tempValue = values[0];\n\t\t\treturn;\n\t\t}\n\t\tconst newValue = this._buildValue(event.detail.dates[0], event.detail.dates[1]); // the value will be normalized so we don't need to order them here\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\t\tthis.closePicker();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tasync _modifyDateValue(amount: number, unit: string, preserveDate?: boolean) {\n\t\tif (!this._endDateTimestamp) { // If empty or only one date -> treat as datepicker entirely\n\t\t\treturn super._modifyDateValue(amount, unit, preserveDate);\n\t\t}\n\n\t\tconst input = this._getInput();\n\t\tlet caretPos: number = input.getCaretPosition()!; // caret position is always number for input of type text;\n\t\tlet newValue: string;\n\n\t\tif (caretPos <= this.value.indexOf(this._effectiveDelimiter)) { // The user is focusing the first date -> change it and keep the second date\n\t\t\tconst startDateModified = modifyDateBy(CalendarDate.fromTimestamp(this._startDateTimestamp! * 1000), amount, unit, preserveDate, this._minDate, this._maxDate);\n\t\t\tconst newStartDateTimestamp = startDateModified.valueOf() / 1000;\n\t\t\tif (newStartDateTimestamp > this._endDateTimestamp) { // dates flipped -> move the caret to the same position but on the last date\n\t\t\t\tcaretPos += Math.ceil(this.value.length / 2);\n\t\t\t}\n\t\t\tnewValue = this._buildValue(newStartDateTimestamp, this._endDateTimestamp); // the value will be normalized so we don't try to order them here\n\t\t} else {\n\t\t\tconst endDateModified = modifyDateBy(CalendarDate.fromTimestamp(this._endDateTimestamp * 1000), amount, unit, preserveDate, this._minDate, this._maxDate);\n\t\t\tconst newEndDateTimestamp = endDateModified.valueOf() / 1000;\n\t\t\tnewValue = this._buildValue(this._startDateTimestamp, newEndDateTimestamp); // the value will be normalized so we don't try to order them here\n\t\t\tif (newEndDateTimestamp < this._startDateTimestamp!) { // dates flipped -> move the caret to the same position but on the first date\n\t\t\t\tcaretPos -= Math.ceil(this.value.length / 2);\n\t\t\t}\n\t\t}\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\n\t\tawait renderFinished();\n\t\tinput.setCaretPosition(caretPos); // Return the caret to the previous (or the adjusted, if dates flipped) position after rendering\n\t}\n\n\tget _effectiveDelimiter(): string {\n\t\tconst ctor = this.constructor as typeof DateRangePicker;\n\t\treturn this.delimiter || (ctor.getMetadata().getProperties().delimiter.defaultValue) as string;\n\t}\n\n\t_splitValueByDelimiter(value: string) {\n\t\tconst valuesArray: Array<string> = [];\n\t\tconst partsArray = value.split(this._prevDelimiter || this._effectiveDelimiter);\n\n\t\t// if format successfully parse the value, the value contains only single date\n\t\tif (this.getFormat().parse(value)) {\n\t\t\tvaluesArray[0] = partsArray.join(this._effectiveDelimiter);\n\t\t\tvaluesArray[1] = \"\";\n\t\t} else {\n\t\t\tvaluesArray[0] = partsArray.slice(0, partsArray.length / 2).join(this._effectiveDelimiter);\n\t\t\tvaluesArray[1] = partsArray.slice(partsArray.length / 2).join(this._effectiveDelimiter);\n\t\t}\n\n\t\treturn valuesArray;\n\t}\n\n\t/**\n\t * Returns a UTC timestamp, representing the first date in the value string or undefined if the value is empty\n\t * @private\n\t */\n\t_extractFirstTimestamp(value: string) {\n\t\tif (!value || !this._checkValueValidity(value)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst dateStrings = this._splitValueByDelimiter(value); // at least one item guaranteed due to the checks above (non-empty and valid)\n\n\t\tconst parsedDate = this.getFormat().parse(dateStrings[0], true) as Date;\n\t\treturn parsedDate.getTime() / 1000;\n\t}\n\n\t/**\n\t * Returns a UTC timestamp, representing the last date in the value string or undefined if the value is empty or there is just one date\n\t * @private\n\t */\n\t_extractLastTimestamp(value: string) {\n\t\tif (!value || !this._checkValueValidity(value)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst dateStrings = this._splitValueByDelimiter(value);\n\t\tif (dateStrings[1]) {\n\t\t\tconst parsedDate = this.getFormat().parse(dateStrings[1], true) as Date;\n\t\t\treturn parsedDate.getTime() / 1000;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Builds a string value out of two UTC timestamps - this method is the counterpart to _extractFirstTimestamp/_extractLastTimestamp\n\t * @private\n\t */\n\t_buildValue(firstDateTimestamp: number | undefined, lastDateTimestamp: number | undefined) {\n\t\tthis._prevDelimiter = this._effectiveDelimiter;\n\t\tif (firstDateTimestamp) {\n\t\t\tconst firstDateString = this._getStringFromTimestamp(firstDateTimestamp * 1000);\n\n\t\t\tif (!lastDateTimestamp) {\n\t\t\t\treturn firstDateString;\n\t\t\t}\n\n\t\t\tconst lastDateString = this._getStringFromTimestamp(lastDateTimestamp * 1000);\n\t\t\treturn `${firstDateString} ${this._effectiveDelimiter} ${lastDateString}`;\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * @override\n\t */\n\tget _calendarPickersMode() {\n\t\treturn CalendarPickersMode.DAY_MONTH_YEAR;\n\t}\n}\n\nDateRangePicker.define();\n\nexport default DateRangePicker;\nexport type {\n\tDateRangePickerChangeEventDetail,\n\tDateRangePickerInputEventDetail,\n};\n"]}
|
package/dist/DateTimePicker.d.ts
CHANGED
|
@@ -144,7 +144,14 @@ declare class DateTimePicker extends DatePicker {
|
|
|
144
144
|
get showDateView(): boolean;
|
|
145
145
|
get showTimeView(): boolean;
|
|
146
146
|
get phone(): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* @override
|
|
149
|
+
*/
|
|
147
150
|
get dateAriaDescription(): string;
|
|
151
|
+
/**
|
|
152
|
+
* @override
|
|
153
|
+
*/
|
|
154
|
+
get pickerAccessibleName(): string;
|
|
148
155
|
/**
|
|
149
156
|
* Defines whether the dialog on mobile should have header
|
|
150
157
|
* @private
|
package/dist/DateTimePicker.js
CHANGED
|
@@ -20,7 +20,7 @@ import Calendar from "./Calendar.js";
|
|
|
20
20
|
import DatePicker from "./DatePicker.js";
|
|
21
21
|
import TimeSelectionClocks from "./TimeSelectionClocks.js";
|
|
22
22
|
// i18n texts
|
|
23
|
-
import { TIMEPICKER_SUBMIT_BUTTON, TIMEPICKER_CANCEL_BUTTON, DATETIME_DESCRIPTION, DATETIME_PICKER_DATE_BUTTON, DATETIME_PICKER_TIME_BUTTON, } from "./generated/i18n/i18n-defaults.js";
|
|
23
|
+
import { TIMEPICKER_SUBMIT_BUTTON, TIMEPICKER_CANCEL_BUTTON, DATETIME_DESCRIPTION, DATETIME_PICKER_DATE_BUTTON, DATETIME_PICKER_TIME_BUTTON, DATETIMEPICKER_POPOVER_ACCESSIBLE_NAME, } from "./generated/i18n/i18n-defaults.js";
|
|
24
24
|
// Template
|
|
25
25
|
import DateTimePickerPopoverTemplate from "./generated/templates/DateTimePickerPopoverTemplate.lit.js";
|
|
26
26
|
// Styles
|
|
@@ -185,9 +185,18 @@ let DateTimePicker = DateTimePicker_1 = class DateTimePicker extends DatePicker
|
|
|
185
185
|
get phone() {
|
|
186
186
|
return super.phone || this._phoneMode;
|
|
187
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* @override
|
|
190
|
+
*/
|
|
188
191
|
get dateAriaDescription() {
|
|
189
192
|
return DateTimePicker_1.i18nBundle.getText(DATETIME_DESCRIPTION);
|
|
190
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* @override
|
|
196
|
+
*/
|
|
197
|
+
get pickerAccessibleName() {
|
|
198
|
+
return DateTimePicker_1.i18nBundle.getText(DATETIMEPICKER_POPOVER_ACCESSIBLE_NAME);
|
|
199
|
+
}
|
|
191
200
|
/**
|
|
192
201
|
* Defines whether the dialog on mobile should have header
|
|
193
202
|
* @private
|