@ui5/webcomponents 1.0.0-rc.6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +816 -1
- package/README.md +144 -41
- package/csp.js +7 -0
- package/customI18n.js +50 -0
- package/dist/Assets-static.js +6 -0
- package/dist/Assets.js +2 -1
- package/dist/Avatar.js +222 -37
- package/dist/AvatarGroup.js +603 -0
- package/dist/Badge.js +44 -22
- package/dist/Breadcrumbs.js +573 -0
- package/dist/BreadcrumbsItem.js +103 -0
- package/dist/BusyIndicator.js +172 -17
- package/dist/Button.js +148 -35
- package/dist/Calendar.js +342 -546
- package/dist/CalendarDate.js +45 -0
- package/dist/CalendarHeader.js +133 -62
- package/dist/CalendarPart.js +111 -0
- package/dist/Card.js +44 -158
- package/dist/CardHeader.js +288 -0
- package/dist/Carousel.js +432 -78
- package/dist/CheckBox.js +150 -50
- package/dist/ColorPalette.js +493 -0
- package/dist/ColorPaletteItem.js +137 -0
- package/dist/ColorPalettePopover.js +219 -0
- package/dist/ColorPicker.js +524 -0
- package/dist/ComboBox.js +626 -90
- package/dist/ComboBoxFilters.js +8 -1
- package/dist/ComboBoxGroupItem.js +70 -0
- package/dist/ComboBoxItem.js +12 -24
- package/dist/CustomListItem.js +38 -9
- package/dist/DateComponentBase.js +170 -0
- package/dist/DatePicker.js +446 -382
- package/dist/DateRangePicker.js +328 -0
- package/dist/DateTimePicker.js +430 -0
- package/dist/DayPicker.js +509 -431
- package/dist/Dialog.js +498 -51
- package/dist/DurationPicker.js +312 -0
- package/dist/FileUploader.js +222 -29
- package/dist/GroupHeaderListItem.js +32 -8
- package/dist/Icon.js +197 -36
- package/dist/Input.js +689 -170
- package/dist/Interfaces.js +192 -0
- package/dist/Label.js +27 -12
- package/dist/Link.js +139 -29
- package/dist/List.js +514 -111
- package/dist/ListItem.js +124 -20
- package/dist/ListItemBase.js +42 -8
- package/dist/MessageStrip.js +56 -70
- package/dist/MonthPicker.js +180 -182
- package/dist/MultiComboBox.js +589 -202
- package/dist/MultiComboBoxItem.js +8 -5
- package/dist/MultiInput.js +301 -0
- package/dist/Option.js +48 -5
- package/dist/Panel.js +118 -36
- package/dist/Popover.js +286 -234
- package/dist/Popup.js +381 -284
- package/dist/ProgressIndicator.js +235 -0
- package/dist/RadioButton.js +133 -53
- package/dist/RadioButtonGroup.js +53 -29
- package/dist/RangeSlider.js +769 -0
- package/dist/RatingIndicator.js +291 -0
- package/dist/ResponsivePopover.js +82 -40
- package/dist/SegmentedButton.js +137 -51
- package/dist/SegmentedButtonItem.js +109 -0
- package/dist/Select.js +478 -100
- package/dist/Slider.js +320 -0
- package/dist/SliderBase.js +842 -0
- package/dist/StandardListItem.js +45 -22
- package/dist/StepInput.js +684 -0
- package/dist/SuggestionGroupItem.js +64 -0
- package/dist/SuggestionItem.js +38 -30
- package/dist/SuggestionListItem.js +76 -0
- package/dist/Switch.js +60 -42
- package/dist/Tab.js +181 -15
- package/dist/TabContainer.js +296 -230
- package/dist/TabSeparator.js +2 -1
- package/dist/Table.js +480 -35
- package/dist/TableCell.js +13 -15
- package/dist/TableColumn.js +18 -7
- package/dist/TableGroupRow.js +160 -0
- package/dist/TableRow.js +244 -18
- package/dist/TextArea.js +311 -36
- package/dist/TimePicker.js +56 -683
- package/dist/TimePickerBase.js +463 -0
- package/dist/TimeSelection.js +493 -0
- package/dist/Title.js +17 -10
- package/dist/Toast.js +25 -14
- package/dist/ToggleButton.js +21 -13
- package/dist/Token.js +84 -45
- package/dist/Tokenizer.js +246 -64
- package/dist/Tree.js +443 -0
- package/dist/TreeItem.js +168 -0
- package/dist/TreeListItem.js +332 -0
- package/dist/WheelSlider.js +227 -77
- package/dist/YearPicker.js +199 -255
- package/dist/api.json +6871 -1
- package/dist/features/ColorPaletteMoreColors.js +42 -0
- package/dist/features/InputElementsFormSupport.js +0 -1
- package/dist/features/InputSuggestions.js +273 -53
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_in.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -0
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -0
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -0
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -0
- package/dist/generated/i18n/i18n-defaults.js +2 -2
- package/dist/generated/json-imports/Themes-static.js +35 -0
- package/dist/generated/json-imports/Themes.js +23 -15
- package/dist/generated/json-imports/i18n-static.js +162 -0
- package/dist/generated/json-imports/i18n.js +113 -89
- package/dist/generated/templates/AvatarGroupTemplate.lit.js +9 -0
- package/dist/generated/templates/AvatarTemplate.lit.js +9 -9
- package/dist/generated/templates/BadgeTemplate.lit.js +5 -6
- package/dist/generated/templates/BreadcrumbsPopoverTemplate.lit.js +8 -0
- package/dist/generated/templates/BreadcrumbsTemplate.lit.js +9 -0
- package/dist/generated/templates/BusyIndicatorTemplate.lit.js +7 -5
- package/dist/generated/templates/ButtonTemplate.lit.js +6 -6
- package/dist/generated/templates/CalendarHeaderTemplate.lit.js +6 -4
- package/dist/generated/templates/CalendarTemplate.lit.js +4 -4
- package/dist/generated/templates/CardHeaderTemplate.lit.js +12 -0
- package/dist/generated/templates/CardTemplate.lit.js +5 -8
- package/dist/generated/templates/CarouselTemplate.lit.js +13 -14
- package/dist/generated/templates/CheckBoxTemplate.lit.js +7 -7
- package/dist/generated/templates/ColorPaletteDialogTemplate.lit.js +7 -0
- package/dist/generated/templates/ColorPaletteItemTemplate.lit.js +7 -0
- package/dist/generated/templates/ColorPalettePopoverTemplate.lit.js +8 -0
- package/dist/generated/templates/ColorPaletteTemplate.lit.js +12 -0
- package/dist/generated/templates/ColorPickerTemplate.lit.js +7 -0
- package/dist/generated/templates/ComboBoxPopoverTemplate.lit.js +20 -5
- package/dist/generated/templates/ComboBoxTemplate.lit.js +8 -5
- package/dist/generated/templates/CustomListItemTemplate.lit.js +13 -13
- package/dist/generated/templates/DatePickerPopoverTemplate.lit.js +7 -4
- package/dist/generated/templates/DatePickerTemplate.lit.js +6 -5
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js +12 -0
- package/dist/generated/templates/DayPickerTemplate.lit.js +13 -11
- package/dist/generated/templates/DialogTemplate.lit.js +9 -8
- package/dist/generated/templates/FileUploaderPopoverTemplate.lit.js +10 -0
- package/dist/generated/templates/FileUploaderTemplate.lit.js +7 -7
- package/dist/generated/templates/GroupHeaderListItemTemplate.lit.js +4 -4
- package/dist/generated/templates/IconTemplate.lit.js +6 -6
- package/dist/generated/templates/InputPopoverTemplate.lit.js +24 -12
- package/dist/generated/templates/InputTemplate.lit.js +9 -8
- package/dist/generated/templates/LabelTemplate.lit.js +4 -4
- package/dist/generated/templates/LinkTemplate.lit.js +5 -5
- package/dist/generated/templates/ListItemTemplate.lit.js +13 -13
- package/dist/generated/templates/ListTemplate.lit.js +12 -9
- package/dist/generated/templates/MessageStripTemplate.lit.js +6 -27
- package/dist/generated/templates/MonthPickerTemplate.lit.js +6 -6
- package/dist/generated/templates/MultiComboBoxPopoverTemplate.lit.js +23 -7
- package/dist/generated/templates/MultiComboBoxTemplate.lit.js +10 -8
- package/dist/generated/templates/MultiInputTemplate.lit.js +16 -0
- package/dist/generated/templates/PanelTemplate.lit.js +9 -6
- package/dist/generated/templates/PopoverTemplate.lit.js +9 -9
- package/dist/generated/templates/PopupBlockLayerTemplate.lit.js +7 -0
- package/dist/generated/templates/PopupTemplate.lit.js +4 -4
- package/dist/generated/templates/ProgressIndicatorTemplate.lit.js +17 -0
- package/dist/generated/templates/RadioButtonTemplate.lit.js +7 -7
- package/dist/generated/templates/RangeSliderTemplate.lit.js +13 -0
- package/dist/generated/templates/RatingIndicatorTemplate.lit.js +14 -0
- package/dist/generated/templates/ResponsivePopoverTemplate.lit.js +16 -11
- package/dist/generated/templates/SegmentedButtonItemTemplate.lit.js +8 -0
- package/dist/generated/templates/SegmentedButtonTemplate.lit.js +4 -9
- package/dist/generated/templates/SelectPopoverTemplate.lit.js +20 -6
- package/dist/generated/templates/SelectTemplate.lit.js +6 -4
- package/dist/generated/templates/SliderBaseTemplate.lit.js +11 -0
- package/dist/generated/templates/SliderTemplate.lit.js +12 -0
- package/dist/generated/templates/StandardListItemTemplate.lit.js +21 -19
- package/dist/generated/templates/StepInputTemplate.lit.js +10 -0
- package/dist/generated/templates/SuggestionListItemTemplate.lit.js +27 -0
- package/dist/generated/templates/SwitchTemplate.lit.js +8 -6
- package/dist/generated/templates/TabContainerPopoverTemplate.lit.js +6 -8
- package/dist/generated/templates/TabContainerTemplate.lit.js +16 -18
- package/dist/generated/templates/TabInOverflowTemplate.lit.js +9 -0
- package/dist/generated/templates/TabInStripTemplate.lit.js +11 -0
- package/dist/generated/templates/TabSeparatorTemplate.lit.js +4 -4
- package/dist/generated/templates/TabTemplate.lit.js +4 -4
- package/dist/generated/templates/TableCellTemplate.lit.js +4 -4
- package/dist/generated/templates/TableColumnTemplate.lit.js +4 -4
- package/dist/generated/templates/TableGroupRowTemplate.lit.js +7 -0
- package/dist/generated/templates/TableRowTemplate.lit.js +12 -10
- package/dist/generated/templates/TableTemplate.lit.js +13 -8
- package/dist/generated/templates/TextAreaPopoverTemplate.lit.js +11 -0
- package/dist/generated/templates/TextAreaTemplate.lit.js +8 -8
- package/dist/generated/templates/TimePickerPopoverTemplate.lit.js +4 -8
- package/dist/generated/templates/TimePickerTemplate.lit.js +6 -5
- package/dist/generated/templates/TimeSelectionTemplate.lit.js +11 -0
- package/dist/generated/templates/TitleTemplate.lit.js +10 -10
- package/dist/generated/templates/ToastTemplate.lit.js +5 -4
- package/dist/generated/templates/ToggleButtonTemplate.lit.js +6 -6
- package/dist/generated/templates/TokenTemplate.lit.js +7 -5
- package/dist/generated/templates/TokenizerPopoverTemplate.lit.js +12 -0
- package/dist/generated/templates/TokenizerTemplate.lit.js +6 -6
- package/dist/generated/templates/TreeListItemTemplate.lit.js +21 -0
- package/dist/generated/templates/TreeTemplate.lit.js +8 -0
- package/dist/generated/templates/WheelSliderTemplate.lit.js +7 -7
- package/dist/generated/templates/YearPickerTemplate.lit.js +6 -6
- package/dist/generated/themes/Avatar.css.js +6 -7
- package/dist/generated/themes/AvatarGroup.css.js +8 -0
- package/dist/generated/themes/Badge.css.js +6 -7
- package/dist/generated/themes/Breadcrumbs.css.js +8 -0
- package/dist/generated/themes/BreadcrumbsPopover.css.js +8 -0
- package/dist/generated/themes/BrowserScrollbar.css.js +8 -0
- package/dist/generated/themes/BusyIndicator.css.js +6 -7
- package/dist/generated/themes/Button.css.js +6 -7
- package/dist/generated/themes/Button.ie11.css.js +8 -0
- package/dist/generated/themes/Calendar.css.js +6 -7
- package/dist/generated/themes/CalendarHeader.css.js +6 -7
- package/dist/generated/themes/Card.css.js +6 -7
- package/dist/generated/themes/CardHeader.css.js +8 -0
- package/dist/generated/themes/Carousel.css.js +6 -7
- package/dist/generated/themes/CheckBox.css.js +6 -7
- package/dist/generated/themes/ColorPalette.css.js +8 -0
- package/dist/generated/themes/ColorPaletteItem.css.js +8 -0
- package/dist/generated/themes/ColorPalettePopover.css.js +8 -0
- package/dist/generated/themes/ColorPaletteStaticArea.css.js +8 -0
- package/dist/generated/themes/ColorPicker.css.js +8 -0
- package/dist/generated/themes/ComboBox.css.js +6 -7
- package/dist/generated/themes/ComboBoxPopover.css.js +6 -7
- package/dist/generated/themes/CustomListItem.css.js +6 -7
- package/dist/generated/themes/DatePicker.css.js +6 -7
- package/dist/generated/themes/DatePickerPopover.css.js +6 -7
- package/dist/generated/themes/DateRangePicker.css.js +8 -0
- package/dist/generated/themes/DateTimePicker.css.js +8 -0
- package/dist/generated/themes/DateTimePickerPopover.css.js +8 -0
- package/dist/generated/themes/DayPicker.css.js +6 -7
- package/dist/generated/themes/Dialog.css.js +6 -7
- package/dist/generated/themes/FileUploader.css.js +6 -7
- package/dist/generated/themes/GroupHeaderListItem.css.js +6 -7
- package/dist/generated/themes/GrowingButton.css.js +8 -0
- package/dist/generated/themes/Icon.css.js +6 -7
- package/dist/generated/themes/Input.css.js +6 -7
- package/dist/generated/themes/InputIcon.css.js +6 -7
- package/dist/generated/themes/InvisibleTextStyles.css.js +6 -7
- package/dist/generated/themes/Label.css.js +6 -7
- package/dist/generated/themes/Link.css.js +6 -7
- package/dist/generated/themes/List.css.js +6 -7
- package/dist/generated/themes/ListItem.css.js +6 -7
- package/dist/generated/themes/ListItemBase.css.js +6 -7
- package/dist/generated/themes/MessageStrip.css.js +6 -7
- package/dist/generated/themes/MonthPicker.css.js +6 -7
- package/dist/generated/themes/MultiComboBox.css.js +6 -7
- package/dist/generated/themes/MultiInput.css.js +8 -0
- package/dist/generated/themes/Panel.css.js +6 -7
- package/dist/generated/themes/Popover.css.js +6 -7
- package/dist/generated/themes/Popup.css.js +6 -7
- package/dist/generated/themes/PopupGlobal.css.js +8 -0
- package/dist/generated/themes/PopupStaticAreaStyles.css.js +8 -0
- package/dist/generated/themes/PopupsCommon.css.js +8 -0
- package/dist/generated/themes/ProgressIndicator.css.js +8 -0
- package/dist/generated/themes/RadioButton.css.js +6 -7
- package/dist/generated/themes/RatingIndicator.css.js +8 -0
- package/dist/generated/themes/ResponsivePopover.css.js +6 -7
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +6 -7
- package/dist/generated/themes/SegmentedButton.css.js +6 -7
- package/dist/generated/themes/Select.css.js +6 -7
- package/dist/generated/themes/SelectPopover.css.js +8 -0
- package/dist/generated/themes/SliderBase.css.js +8 -0
- package/dist/generated/themes/StepInput.css.js +8 -0
- package/dist/generated/themes/Suggestions.css.js +8 -0
- package/dist/generated/themes/Switch.css.js +6 -7
- package/dist/generated/themes/Tab.css.js +6 -7
- package/dist/generated/themes/TabContainer.css.js +6 -7
- package/dist/generated/themes/TabInOverflow.css.js +8 -0
- package/dist/generated/themes/TabInStrip.css.js +8 -0
- package/dist/generated/themes/Table.css.js +6 -7
- package/dist/generated/themes/TableCell.css.js +6 -7
- package/dist/generated/themes/TableColumn.css.js +6 -7
- package/dist/generated/themes/TableGroupRow.css.js +8 -0
- package/dist/generated/themes/TableRow.css.js +6 -7
- package/dist/generated/themes/TapHighlightColor.css.js +8 -0
- package/dist/generated/themes/TextArea.css.js +6 -7
- package/dist/generated/themes/TimePicker.css.js +6 -7
- package/dist/generated/themes/TimePickerPopover.css.js +6 -7
- package/dist/generated/themes/TimeSelection.css.js +8 -0
- package/dist/generated/themes/Title.css.js +6 -7
- package/dist/generated/themes/Toast.css.js +6 -7
- package/dist/generated/themes/ToggleButton.css.js +6 -7
- package/dist/generated/themes/ToggleButton.ie11.css.js +8 -0
- package/dist/generated/themes/Token.css.js +6 -7
- package/dist/generated/themes/Tokenizer.css.js +6 -7
- package/dist/generated/themes/Tree.css.js +8 -0
- package/dist/generated/themes/TreeListItem.css.js +8 -0
- package/dist/generated/themes/ValueStateMessage.css.js +6 -7
- package/dist/generated/themes/WheelSlider.css.js +6 -7
- package/dist/generated/themes/YearPicker.css.js +6 -7
- package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -0
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -0
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -0
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -0
- package/dist/i18n/messagebundle.properties +335 -0
- package/dist/i18n/messagebundle_ar.properties +224 -0
- package/dist/i18n/messagebundle_bg.properties +224 -0
- package/dist/i18n/messagebundle_ca.properties +224 -0
- package/dist/i18n/messagebundle_cs.properties +224 -0
- package/dist/i18n/messagebundle_cy.properties +224 -0
- package/dist/i18n/messagebundle_da.properties +224 -0
- package/dist/i18n/messagebundle_de.properties +224 -0
- package/dist/i18n/messagebundle_el.properties +224 -0
- package/dist/i18n/messagebundle_en.properties +224 -0
- package/dist/i18n/messagebundle_en_GB.properties +224 -0
- package/dist/i18n/messagebundle_en_US_sappsd.properties +224 -0
- package/dist/i18n/messagebundle_en_US_saprigi.properties +224 -0
- package/dist/i18n/messagebundle_en_US_saptrc.properties +224 -0
- package/dist/i18n/messagebundle_es.properties +224 -0
- package/dist/i18n/messagebundle_es_MX.properties +224 -0
- package/dist/i18n/messagebundle_et.properties +224 -0
- package/dist/i18n/messagebundle_fi.properties +224 -0
- package/dist/i18n/messagebundle_fr.properties +224 -0
- package/dist/i18n/messagebundle_fr_CA.properties +224 -0
- package/dist/i18n/messagebundle_hi.properties +224 -0
- package/dist/i18n/messagebundle_hr.properties +224 -0
- package/dist/i18n/messagebundle_hu.properties +224 -0
- package/dist/i18n/messagebundle_id.properties +224 -0
- package/dist/i18n/messagebundle_in.properties +172 -0
- package/dist/i18n/messagebundle_it.properties +224 -0
- package/dist/i18n/messagebundle_iw.properties +224 -0
- package/dist/i18n/messagebundle_ja.properties +224 -0
- package/dist/i18n/messagebundle_kk.properties +224 -0
- package/dist/i18n/messagebundle_ko.properties +224 -0
- package/dist/i18n/messagebundle_lt.properties +224 -0
- package/dist/i18n/messagebundle_lv.properties +224 -0
- package/dist/i18n/messagebundle_ms.properties +224 -0
- package/dist/i18n/messagebundle_nl.properties +224 -0
- package/dist/i18n/messagebundle_no.properties +224 -0
- package/dist/i18n/messagebundle_pl.properties +224 -0
- package/dist/i18n/messagebundle_pt.properties +224 -0
- package/dist/i18n/messagebundle_pt_PT.properties +224 -0
- package/dist/i18n/messagebundle_ro.properties +224 -0
- package/dist/i18n/messagebundle_ru.properties +224 -0
- package/dist/i18n/messagebundle_sh.properties +224 -0
- package/dist/i18n/messagebundle_sk.properties +224 -0
- package/dist/i18n/messagebundle_sl.properties +224 -0
- package/dist/i18n/messagebundle_sv.properties +224 -0
- package/dist/i18n/messagebundle_th.properties +224 -0
- package/dist/i18n/messagebundle_tr.properties +224 -0
- package/dist/i18n/messagebundle_uk.properties +224 -0
- package/dist/i18n/messagebundle_vi.properties +224 -0
- package/dist/i18n/messagebundle_zh_CN.properties +224 -0
- package/dist/i18n/messagebundle_zh_TW.properties +224 -0
- package/dist/popup-utils/OpenedPopupsRegistry.js +18 -13
- package/dist/popup-utils/PopoverRegistry.js +55 -21
- package/dist/timepicker-utils/TimeSlider.js +103 -0
- package/dist/types/{AvatarBackgroundColor.js → AvatarColorScheme.js} +9 -9
- package/dist/types/AvatarGroupType.js +43 -0
- package/dist/types/AvatarShape.js +1 -1
- package/dist/types/AvatarSize.js +1 -1
- package/dist/types/BreadcrumbsDesign.js +42 -0
- package/dist/types/BreadcrumbsSeparatorStyle.js +69 -0
- package/dist/types/BusyIndicatorSize.js +1 -1
- package/dist/types/ButtonDesign.js +8 -1
- package/dist/types/CalendarSelectionMode.js +47 -0
- package/dist/types/CarouselArrowsPlacement.js +3 -3
- package/dist/types/GrowingMode.js +48 -0
- package/dist/types/InputType.js +7 -7
- package/dist/types/LinkDesign.js +1 -1
- package/dist/types/ListGrowingMode.js +15 -0
- package/dist/types/ListItemType.js +2 -2
- package/dist/types/ListMode.js +9 -1
- package/dist/types/ListSeparators.js +1 -1
- package/dist/types/{MessageStripType.js → MessageStripDesign.js} +7 -7
- package/dist/types/PanelAccessibleRole.js +1 -1
- package/dist/types/PopoverHorizontalAlign.js +1 -1
- package/dist/types/PopoverPlacementType.js +2 -2
- package/dist/types/PopoverVerticalAlign.js +1 -2
- package/dist/types/Priority.js +55 -0
- package/dist/types/SemanticColor.js +1 -1
- package/dist/types/SwitchDesign.js +40 -0
- package/dist/types/TabContainerTabsPlacement.js +40 -0
- package/dist/types/TabLayout.js +1 -1
- package/dist/types/TableGrowingMode.js +15 -0
- package/dist/types/TableMode.js +47 -0
- package/dist/types/TableRowType.js +40 -0
- package/dist/types/TitleLevel.js +1 -1
- package/dist/types/ToastPlacement.js +1 -2
- package/dist/types/WrappingType.js +41 -0
- package/dist/webcomponentsjs/CHANGELOG.md +61 -0
- package/dist/webcomponentsjs/README.md +64 -47
- package/dist/webcomponentsjs/bundles/webcomponents-ce.js +38 -38
- package/dist/webcomponentsjs/bundles/webcomponents-ce.js.map +1 -1
- package/dist/webcomponentsjs/bundles/webcomponents-pf_dom.js +60 -0
- package/dist/webcomponentsjs/bundles/webcomponents-pf_dom.js.map +1 -0
- package/dist/webcomponentsjs/bundles/webcomponents-pf_js.js +95 -0
- package/dist/webcomponentsjs/bundles/webcomponents-pf_js.js.map +1 -0
- package/dist/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +292 -229
- package/dist/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +1 -1
- package/dist/webcomponentsjs/bundles/webcomponents-sd-ce.js +190 -170
- package/dist/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +1 -1
- package/dist/webcomponentsjs/bundles/webcomponents-sd.js +151 -132
- package/dist/webcomponentsjs/bundles/webcomponents-sd.js.map +1 -1
- package/dist/webcomponentsjs/custom-elements-es5-adapter.js +2 -2
- package/dist/webcomponentsjs/webcomponents-bundle.js +302 -230
- package/dist/webcomponentsjs/webcomponents-bundle.js.map +1 -1
- package/dist/webcomponentsjs/webcomponents-loader.js +49 -28
- package/package-scripts.js +1 -0
- package/package.json +23 -6
- package/src/Assets-static.js +6 -0
- package/src/Assets.js +7 -0
- package/src/Avatar.hbs +20 -0
- package/src/Avatar.js +392 -0
- package/src/AvatarGroup.hbs +30 -0
- package/src/AvatarGroup.js +603 -0
- package/src/Badge.hbs +14 -0
- package/src/Badge.js +165 -0
- package/src/Breadcrumbs.hbs +42 -0
- package/src/Breadcrumbs.js +573 -0
- package/src/BreadcrumbsItem.js +103 -0
- package/src/BreadcrumbsPopover.hbs +28 -0
- package/src/BusyIndicator.hbs +32 -0
- package/src/BusyIndicator.js +269 -0
- package/src/Button.hbs +45 -0
- package/src/Button.js +463 -0
- package/src/Calendar.hbs +69 -0
- package/src/Calendar.js +489 -0
- package/src/CalendarDate.js +45 -0
- package/src/CalendarHeader.hbs +54 -0
- package/src/CalendarHeader.js +209 -0
- package/src/CalendarPart.js +111 -0
- package/src/Card.hbs +14 -0
- package/src/Card.js +160 -0
- package/src/CardHeader.hbs +35 -0
- package/src/CardHeader.js +288 -0
- package/src/Carousel.hbs +85 -0
- package/src/Carousel.js +681 -0
- package/src/CheckBox.hbs +44 -0
- package/src/CheckBox.js +424 -0
- package/src/ColorPalette.hbs +52 -0
- package/src/ColorPalette.js +493 -0
- package/src/ColorPaletteDialog.hbs +18 -0
- package/src/ColorPaletteItem.hbs +11 -0
- package/src/ColorPaletteItem.js +137 -0
- package/src/ColorPalettePopover.hbs +29 -0
- package/src/ColorPalettePopover.js +219 -0
- package/src/ColorPicker.hbs +98 -0
- package/src/ColorPicker.js +524 -0
- package/src/ComboBox.hbs +49 -0
- package/src/ComboBox.js +1041 -0
- package/src/ComboBoxFilters.js +40 -0
- package/src/ComboBoxGroupItem.js +70 -0
- package/src/ComboBoxItem.js +49 -0
- package/src/ComboBoxPopover.hbs +125 -0
- package/src/CustomListItem.hbs +5 -0
- package/src/CustomListItem.js +99 -0
- package/src/DateComponentBase.js +170 -0
- package/src/DatePicker.hbs +44 -0
- package/src/DatePicker.js +823 -0
- package/src/DatePickerPopover.hbs +63 -0
- package/src/DateRangePicker.js +328 -0
- package/src/DateTimePicker.js +430 -0
- package/src/DateTimePickerPopover.hbs +74 -0
- package/src/DayPicker.hbs +66 -0
- package/src/DayPicker.js +754 -0
- package/src/Dialog.hbs +35 -0
- package/src/Dialog.js +601 -0
- package/src/DurationPicker.js +312 -0
- package/src/FileUploader.hbs +40 -0
- package/src/FileUploader.js +530 -0
- package/src/FileUploaderPopover.hbs +25 -0
- package/src/GroupHeaderListItem.hbs +15 -0
- package/src/GroupHeaderListItem.js +94 -0
- package/src/Icon.hbs +25 -0
- package/src/Icon.js +373 -0
- package/src/Input.hbs +78 -0
- package/src/Input.js +1381 -0
- package/src/InputPopover.hbs +118 -0
- package/src/Interfaces.js +192 -0
- package/src/Label.hbs +13 -0
- package/src/Label.js +152 -0
- package/src/Link.hbs +20 -0
- package/src/Link.js +349 -0
- package/src/List.hbs +89 -0
- package/src/List.js +1056 -0
- package/src/ListItem.hbs +102 -0
- package/src/ListItem.js +371 -0
- package/src/ListItemBase.js +179 -0
- package/src/MessageStrip.hbs +34 -0
- package/src/MessageStrip.js +227 -0
- package/src/MonthPicker.hbs +29 -0
- package/src/MonthPicker.js +299 -0
- package/src/MultiComboBox.hbs +78 -0
- package/src/MultiComboBox.js +1091 -0
- package/src/MultiComboBoxItem.js +43 -0
- package/src/MultiComboBoxPopover.hbs +133 -0
- package/src/MultiInput.hbs +41 -0
- package/src/MultiInput.js +301 -0
- package/src/Option.js +115 -0
- package/src/Panel.hbs +63 -0
- package/src/Panel.js +462 -0
- package/src/Popover.hbs +25 -0
- package/src/Popover.js +786 -0
- package/src/Popup.hbs +34 -0
- package/src/Popup.js +567 -0
- package/src/PopupBlockLayer.hbs +7 -0
- package/src/ProgressIndicator.hbs +35 -0
- package/src/ProgressIndicator.js +235 -0
- package/src/RadioButton.hbs +33 -0
- package/src/RadioButton.js +494 -0
- package/src/RadioButtonGroup.js +205 -0
- package/src/RangeSlider.hbs +70 -0
- package/src/RangeSlider.js +769 -0
- package/src/RatingIndicator.hbs +33 -0
- package/src/RatingIndicator.js +291 -0
- package/src/ResponsivePopover.hbs +39 -0
- package/src/ResponsivePopover.js +206 -0
- package/src/SegmentedButton.hbs +17 -0
- package/src/SegmentedButton.js +290 -0
- package/src/SegmentedButtonItem.hbs +42 -0
- package/src/SegmentedButtonItem.js +109 -0
- package/src/Select.hbs +45 -0
- package/src/Select.js +834 -0
- package/src/SelectPopover.hbs +89 -0
- package/src/Slider.hbs +42 -0
- package/src/Slider.js +320 -0
- package/src/SliderBase.hbs +38 -0
- package/src/SliderBase.js +842 -0
- package/src/StandardListItem.hbs +44 -0
- package/src/StandardListItem.js +191 -0
- package/src/StepInput.hbs +80 -0
- package/src/StepInput.js +684 -0
- package/src/SuggestionGroupItem.js +64 -0
- package/src/SuggestionItem.js +146 -0
- package/src/SuggestionListItem.hbs +33 -0
- package/src/SuggestionListItem.js +76 -0
- package/src/Switch.hbs +50 -0
- package/src/Switch.js +262 -0
- package/src/Tab.hbs +3 -0
- package/src/Tab.js +334 -0
- package/src/TabContainer.hbs +93 -0
- package/src/TabContainer.js +679 -0
- package/src/TabContainerPopover.hbs +24 -0
- package/src/TabInOverflow.hbs +22 -0
- package/src/TabInStrip.hbs +43 -0
- package/src/TabSeparator.hbs +1 -0
- package/src/TabSeparator.js +44 -0
- package/src/Table.hbs +99 -0
- package/src/Table.js +761 -0
- package/src/TableCell.hbs +7 -0
- package/src/TableCell.js +88 -0
- package/src/TableColumn.hbs +8 -0
- package/src/TableColumn.js +136 -0
- package/src/TableGroupRow.hbs +12 -0
- package/src/TableGroupRow.js +160 -0
- package/src/TableRow.hbs +61 -0
- package/src/TableRow.js +388 -0
- package/src/TextArea.hbs +50 -0
- package/src/TextArea.js +691 -0
- package/src/TextAreaPopover.hbs +28 -0
- package/src/TimePicker.hbs +35 -0
- package/src/TimePicker.js +166 -0
- package/src/TimePickerBase.js +463 -0
- package/src/TimePickerPopover.hbs +34 -0
- package/src/TimeSelection.hbs +60 -0
- package/src/TimeSelection.js +493 -0
- package/src/Title.hbs +47 -0
- package/src/Title.js +132 -0
- package/src/Toast.hbs +13 -0
- package/src/Toast.js +243 -0
- package/src/ToggleButton.hbs +5 -0
- package/src/ToggleButton.js +84 -0
- package/src/Token.hbs +30 -0
- package/src/Token.js +219 -0
- package/src/Tokenizer.hbs +27 -0
- package/src/Tokenizer.js +414 -0
- package/src/TokenizerPopover.hbs +50 -0
- package/src/Tree.hbs +42 -0
- package/src/Tree.js +443 -0
- package/src/TreeItem.js +168 -0
- package/src/TreeListItem.hbs +48 -0
- package/src/TreeListItem.js +332 -0
- package/src/WheelSlider.hbs +48 -0
- package/src/WheelSlider.js +435 -0
- package/src/YearPicker.hbs +27 -0
- package/src/YearPicker.js +324 -0
- package/src/features/ColorPaletteMoreColors.js +42 -0
- package/src/features/InputElementsFormSupport.js +88 -0
- package/src/features/InputSuggestions.js +521 -0
- package/src/i18n/messagebundle.properties +335 -0
- package/src/i18n/messagebundle_ar.properties +224 -0
- package/src/i18n/messagebundle_bg.properties +224 -0
- package/src/i18n/messagebundle_ca.properties +224 -0
- package/src/i18n/messagebundle_cs.properties +224 -0
- package/src/i18n/messagebundle_cy.properties +224 -0
- package/src/i18n/messagebundle_da.properties +224 -0
- package/src/i18n/messagebundle_de.properties +224 -0
- package/src/i18n/messagebundle_el.properties +224 -0
- package/src/i18n/messagebundle_en.properties +224 -0
- package/src/i18n/messagebundle_en_GB.properties +224 -0
- package/src/i18n/messagebundle_en_US_sappsd.properties +224 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +224 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +224 -0
- package/src/i18n/messagebundle_es.properties +224 -0
- package/src/i18n/messagebundle_es_MX.properties +224 -0
- package/src/i18n/messagebundle_et.properties +224 -0
- package/src/i18n/messagebundle_fi.properties +224 -0
- package/src/i18n/messagebundle_fr.properties +224 -0
- package/src/i18n/messagebundle_fr_CA.properties +224 -0
- package/src/i18n/messagebundle_hi.properties +224 -0
- package/src/i18n/messagebundle_hr.properties +224 -0
- package/src/i18n/messagebundle_hu.properties +224 -0
- package/src/i18n/messagebundle_id.properties +224 -0
- package/src/i18n/messagebundle_in.properties +172 -0
- package/src/i18n/messagebundle_it.properties +224 -0
- package/src/i18n/messagebundle_iw.properties +224 -0
- package/src/i18n/messagebundle_ja.properties +224 -0
- package/src/i18n/messagebundle_kk.properties +224 -0
- package/src/i18n/messagebundle_ko.properties +224 -0
- package/src/i18n/messagebundle_lt.properties +224 -0
- package/src/i18n/messagebundle_lv.properties +224 -0
- package/src/i18n/messagebundle_ms.properties +224 -0
- package/src/i18n/messagebundle_nl.properties +224 -0
- package/src/i18n/messagebundle_no.properties +224 -0
- package/src/i18n/messagebundle_pl.properties +224 -0
- package/src/i18n/messagebundle_pt.properties +224 -0
- package/src/i18n/messagebundle_pt_PT.properties +224 -0
- package/src/i18n/messagebundle_ro.properties +224 -0
- package/src/i18n/messagebundle_ru.properties +224 -0
- package/src/i18n/messagebundle_sh.properties +224 -0
- package/src/i18n/messagebundle_sk.properties +224 -0
- package/src/i18n/messagebundle_sl.properties +224 -0
- package/src/i18n/messagebundle_sv.properties +224 -0
- package/src/i18n/messagebundle_th.properties +224 -0
- package/src/i18n/messagebundle_tr.properties +224 -0
- package/src/i18n/messagebundle_uk.properties +224 -0
- package/src/i18n/messagebundle_vi.properties +224 -0
- package/src/i18n/messagebundle_zh_CN.properties +224 -0
- package/src/i18n/messagebundle_zh_TW.properties +224 -0
- package/src/popup-utils/OpenedPopupsRegistry.js +50 -0
- package/src/popup-utils/PopoverRegistry.js +145 -0
- package/src/timepicker-utils/TimeSlider.js +103 -0
- package/src/types/AvatarColorScheme.js +104 -0
- package/src/types/AvatarGroupType.js +43 -0
- package/src/types/AvatarShape.js +41 -0
- package/src/types/AvatarSize.js +67 -0
- package/src/types/BreadcrumbsDesign.js +42 -0
- package/src/types/BreadcrumbsSeparatorStyle.js +69 -0
- package/src/types/BusyIndicatorSize.js +47 -0
- package/src/types/ButtonDesign.js +68 -0
- package/src/types/CalendarSelectionMode.js +47 -0
- package/src/types/CarouselArrowsPlacement.js +40 -0
- package/src/types/GrowingMode.js +48 -0
- package/src/types/InputType.js +68 -0
- package/src/types/LinkDesign.js +47 -0
- package/src/types/ListGrowingMode.js +15 -0
- package/src/types/ListItemType.js +47 -0
- package/src/types/ListMode.js +77 -0
- package/src/types/ListSeparators.js +46 -0
- package/src/types/MessageStripDesign.js +54 -0
- package/src/types/PanelAccessibleRole.js +48 -0
- package/src/types/PopoverHorizontalAlign.js +54 -0
- package/src/types/PopoverPlacementType.js +54 -0
- package/src/types/PopoverVerticalAlign.js +54 -0
- package/src/types/Priority.js +55 -0
- package/src/types/SemanticColor.js +61 -0
- package/src/types/SwitchDesign.js +40 -0
- package/src/types/TabContainerTabsPlacement.js +40 -0
- package/src/types/TabLayout.js +40 -0
- package/src/types/TableGrowingMode.js +15 -0
- package/src/types/TableMode.js +47 -0
- package/src/types/TableRowType.js +40 -0
- package/src/types/TitleLevel.js +68 -0
- package/src/types/ToastPlacement.js +91 -0
- package/src/types/WrappingType.js +41 -0
- package/dist/Timeline.js +0 -82
- package/dist/TimelineItem.js +0 -161
- package/dist/generated/templates/ComboBoxItemTemplate.lit.js +0 -7
- package/dist/generated/templates/TimelineItemTemplate.lit.js +0 -12
- package/dist/generated/templates/TimelineTemplate.lit.js +0 -8
- package/dist/generated/themes/ComboBoxItem.css.js +0 -9
- package/dist/generated/themes/TabContainerPopup.css.js +0 -9
- package/dist/generated/themes/Timeline.css.js +0 -9
- package/dist/generated/themes/TimelineItem.css.js +0 -9
- package/dist/popup-utils/PopupUtils.js +0 -55
- package/dist/types/AvatarFitType.js +0 -40
- package/dist/webcomponentsjs/package.json +0 -46
package/dist/DatePicker.js
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
-
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
3
|
-
import { fetchCldr } from "@ui5/webcomponents-base/dist/asset-registries/LocaleData.js";
|
|
4
|
-
import { getCalendarType } from "@ui5/webcomponents-base/dist/config/CalendarType.js";
|
|
5
|
-
import getLocale from "@ui5/webcomponents-base/dist/locale/getLocale.js";
|
|
6
1
|
import { getFeature } from "@ui5/webcomponents-base/dist/FeaturesRegistry.js";
|
|
7
|
-
import LocaleData from "@ui5/webcomponents-localization/dist/LocaleData.js";
|
|
8
|
-
import DateFormat from "@ui5/webcomponents-localization/dist/DateFormat.js";
|
|
9
|
-
import CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
|
|
10
2
|
import CalendarDate from "@ui5/webcomponents-localization/dist/dates/CalendarDate.js";
|
|
3
|
+
import modifyDateBy from "@ui5/webcomponents-localization/dist/dates/modifyDateBy.js";
|
|
4
|
+
import getRoundedTimestamp from "@ui5/webcomponents-localization/dist/dates/getRoundedTimestamp.js";
|
|
5
|
+
import getTodayUTCTimestamp from "@ui5/webcomponents-localization/dist/dates/getTodayUTCTimestamp.js";
|
|
11
6
|
import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js";
|
|
8
|
+
import {
|
|
9
|
+
isPageUp,
|
|
10
|
+
isPageDown,
|
|
11
|
+
isPageUpShift,
|
|
12
|
+
isPageDownShift,
|
|
13
|
+
isPageUpShiftCtrl,
|
|
14
|
+
isPageDownShiftCtrl,
|
|
15
|
+
isShow,
|
|
16
|
+
isF4,
|
|
17
|
+
} from "@ui5/webcomponents-base/dist/Keys.js";
|
|
18
|
+
import { isPhone, isIE } from "@ui5/webcomponents-base/dist/Device.js";
|
|
19
|
+
import "@ui5/webcomponents-icons/dist/appointment-2.js";
|
|
20
|
+
import "@ui5/webcomponents-icons/dist/decline.js";
|
|
21
|
+
import { DATEPICKER_OPEN_ICON_TITLE, DATEPICKER_DATE_DESCRIPTION, INPUT_SUGGESTIONS_TITLE } from "./generated/i18n/i18n-defaults.js";
|
|
22
|
+
import DateComponentBase from "./DateComponentBase.js";
|
|
19
23
|
import Icon from "./Icon.js";
|
|
24
|
+
import Button from "./Button.js";
|
|
20
25
|
import ResponsivePopover from "./ResponsivePopover.js";
|
|
21
26
|
import Calendar from "./Calendar.js";
|
|
27
|
+
import * as CalendarDateComponent from "./CalendarDate.js";
|
|
22
28
|
import Input from "./Input.js";
|
|
23
29
|
import InputType from "./types/InputType.js";
|
|
24
30
|
import DatePickerTemplate from "./generated/templates/DatePickerTemplate.lit.js";
|
|
@@ -36,7 +42,9 @@ import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverComm
|
|
|
36
42
|
* @public
|
|
37
43
|
*/
|
|
38
44
|
const metadata = {
|
|
39
|
-
tag: "ui5-
|
|
45
|
+
tag: "ui5-date-picker",
|
|
46
|
+
altTag: "ui5-datepicker",
|
|
47
|
+
managedSlots: true,
|
|
40
48
|
properties: /** @lends sap.ui.webcomponents.main.DatePicker.prototype */ {
|
|
41
49
|
/**
|
|
42
50
|
* Defines a formatted date value.
|
|
@@ -50,7 +58,7 @@ const metadata = {
|
|
|
50
58
|
},
|
|
51
59
|
|
|
52
60
|
/**
|
|
53
|
-
* Defines the value state of the
|
|
61
|
+
* Defines the value state of the component.
|
|
54
62
|
* <br><br>
|
|
55
63
|
* Available options are:
|
|
56
64
|
* <ul>
|
|
@@ -61,7 +69,7 @@ const metadata = {
|
|
|
61
69
|
* <li><code>Information</code></li>
|
|
62
70
|
* </ul>
|
|
63
71
|
*
|
|
64
|
-
* @type {
|
|
72
|
+
* @type {ValueState}
|
|
65
73
|
* @defaultvalue "None"
|
|
66
74
|
* @public
|
|
67
75
|
*/
|
|
@@ -71,64 +79,19 @@ const metadata = {
|
|
|
71
79
|
},
|
|
72
80
|
|
|
73
81
|
/**
|
|
74
|
-
*
|
|
82
|
+
* Defines whether the component is required.
|
|
75
83
|
*
|
|
76
|
-
* @
|
|
77
|
-
* @
|
|
78
|
-
* @
|
|
79
|
-
*/
|
|
80
|
-
formatPattern: {
|
|
81
|
-
type: String,
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Determines the minimum date available for selection.
|
|
86
|
-
*
|
|
87
|
-
* @type {String}
|
|
88
|
-
* @defaultvalue ""
|
|
89
|
-
* @since 1.0.0-rc.6
|
|
90
|
-
* @public
|
|
91
|
-
*/
|
|
92
|
-
minDate: {
|
|
93
|
-
type: String,
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Determines the maximum date available for selection.
|
|
98
|
-
*
|
|
99
|
-
* @type {String}
|
|
100
|
-
* @defaultvalue ""
|
|
101
|
-
* @since 1.0.0-rc.6
|
|
102
|
-
* @public
|
|
103
|
-
*/
|
|
104
|
-
maxDate: {
|
|
105
|
-
type: String,
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Determines the calendar type.
|
|
110
|
-
* The input value is formated according to the calendar type
|
|
111
|
-
* and the picker shows the months and years from the specified calendar.
|
|
112
|
-
* <br><br>
|
|
113
|
-
* Available options are:
|
|
114
|
-
* <ul>
|
|
115
|
-
* <li><code>Gregorian</code></li>
|
|
116
|
-
* <li><code>Islamic</code></li>
|
|
117
|
-
* <li><code>Japanese</code></li>
|
|
118
|
-
* <li><code>Buddhist</code></li>
|
|
119
|
-
* <li><code>Persian</code></li>
|
|
120
|
-
* </ul>
|
|
121
|
-
*
|
|
122
|
-
* @type {string}
|
|
123
|
-
* @defaultvalue "Gregorian"
|
|
84
|
+
* @since 1.0.0-rc.9
|
|
85
|
+
* @type {boolean}
|
|
86
|
+
* @defaultvalue false
|
|
124
87
|
* @public
|
|
125
88
|
*/
|
|
126
|
-
|
|
127
|
-
type:
|
|
89
|
+
required: {
|
|
90
|
+
type: Boolean,
|
|
128
91
|
},
|
|
129
92
|
|
|
130
93
|
/**
|
|
131
|
-
* Determines whether the
|
|
94
|
+
* Determines whether the component is displayed as disabled.
|
|
132
95
|
*
|
|
133
96
|
* @type {boolean}
|
|
134
97
|
* @defaultvalue false
|
|
@@ -139,7 +102,7 @@ const metadata = {
|
|
|
139
102
|
},
|
|
140
103
|
|
|
141
104
|
/**
|
|
142
|
-
* Determines whether the
|
|
105
|
+
* Determines whether the component is displayed as read-only.
|
|
143
106
|
*
|
|
144
107
|
* @type {boolean}
|
|
145
108
|
* @defaultvalue false
|
|
@@ -151,11 +114,11 @@ const metadata = {
|
|
|
151
114
|
|
|
152
115
|
/**
|
|
153
116
|
* Defines a short hint, intended to aid the user with data entry when the
|
|
154
|
-
*
|
|
117
|
+
* component has no value.
|
|
155
118
|
*
|
|
156
119
|
* <br><br>
|
|
157
120
|
* <b>Note:</b> When no placeholder is set, the format pattern is displayed as a placeholder.
|
|
158
|
-
* Passing an empty string as the value of this property will make the
|
|
121
|
+
* Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.
|
|
159
122
|
*
|
|
160
123
|
* @type {string}
|
|
161
124
|
* @defaultvalue undefined
|
|
@@ -167,7 +130,7 @@ const metadata = {
|
|
|
167
130
|
},
|
|
168
131
|
|
|
169
132
|
/**
|
|
170
|
-
* Determines the name with which the
|
|
133
|
+
* Determines the name with which the component will be submitted in an HTML form.
|
|
171
134
|
*
|
|
172
135
|
* <br><br>
|
|
173
136
|
* <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:
|
|
@@ -175,7 +138,7 @@ const metadata = {
|
|
|
175
138
|
*
|
|
176
139
|
* <br><br>
|
|
177
140
|
* <b>Note:</b> When set, a native <code>input</code> HTML element
|
|
178
|
-
* will be created inside the
|
|
141
|
+
* will be created inside the component so that it can be submitted as
|
|
179
142
|
* part of an HTML form. Do not use this property unless you need to submit a form.
|
|
180
143
|
*
|
|
181
144
|
* @type {string}
|
|
@@ -186,6 +149,46 @@ const metadata = {
|
|
|
186
149
|
type: String,
|
|
187
150
|
},
|
|
188
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Defines the visibility of the week numbers column.
|
|
154
|
+
* <br><br>
|
|
155
|
+
*
|
|
156
|
+
* <b>Note:</b> For calendars other than Gregorian,
|
|
157
|
+
* the week numbers are not displayed regardless of what is set.
|
|
158
|
+
*
|
|
159
|
+
* @type {boolean}
|
|
160
|
+
* @defaultvalue false
|
|
161
|
+
* @public
|
|
162
|
+
* @since 1.0.0-rc.8
|
|
163
|
+
*/
|
|
164
|
+
hideWeekNumbers: {
|
|
165
|
+
type: Boolean,
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Defines the aria-label attribute for the component.
|
|
170
|
+
*
|
|
171
|
+
* @type {String}
|
|
172
|
+
* @public
|
|
173
|
+
* @since 1.0.0-rc.15
|
|
174
|
+
*/
|
|
175
|
+
accessibleName: {
|
|
176
|
+
type: String,
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Receives id(or many ids) of the elements that label the component.
|
|
181
|
+
*
|
|
182
|
+
* @type {String}
|
|
183
|
+
* @defaultvalue ""
|
|
184
|
+
* @public
|
|
185
|
+
* @since 1.0.0-rc.15
|
|
186
|
+
*/
|
|
187
|
+
accessibleNameRef: {
|
|
188
|
+
type: String,
|
|
189
|
+
defaultValue: "",
|
|
190
|
+
},
|
|
191
|
+
|
|
189
192
|
_isPickerOpen: {
|
|
190
193
|
type: Boolean,
|
|
191
194
|
noAttribute: true,
|
|
@@ -195,27 +198,83 @@ const metadata = {
|
|
|
195
198
|
type: Object,
|
|
196
199
|
},
|
|
197
200
|
|
|
198
|
-
|
|
199
|
-
type:
|
|
201
|
+
_calendarCurrentPicker: {
|
|
202
|
+
type: String,
|
|
203
|
+
defaultValue: "day",
|
|
200
204
|
},
|
|
201
205
|
},
|
|
206
|
+
|
|
207
|
+
slots: /** @lends sap.ui.webcomponents.main.DatePicker.prototype */ {
|
|
208
|
+
/**
|
|
209
|
+
* Defines the value state message that will be displayed as pop up under the component.
|
|
210
|
+
* <br><br>
|
|
211
|
+
*
|
|
212
|
+
* <b>Note:</b> If not specified, a default text (in the respective language) will be displayed.
|
|
213
|
+
* <br>
|
|
214
|
+
* <b>Note:</b> The <code>valueStateMessage</code> would be displayed,
|
|
215
|
+
* when the component is in <code>Information</code>, <code>Warning</code> or <code>Error</code> value state.
|
|
216
|
+
* @type {HTMLElement}
|
|
217
|
+
* @since 1.0.0-rc.7
|
|
218
|
+
* @slot
|
|
219
|
+
* @public
|
|
220
|
+
*/
|
|
221
|
+
valueStateMessage: {
|
|
222
|
+
type: HTMLElement,
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,
|
|
227
|
+
* when <code>name</code> property is set.
|
|
228
|
+
* @type {HTMLElement[]}
|
|
229
|
+
* @slot
|
|
230
|
+
* @private
|
|
231
|
+
*/
|
|
232
|
+
formSupport: {
|
|
233
|
+
type: HTMLElement,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
|
|
202
237
|
events: /** @lends sap.ui.webcomponents.main.DatePicker.prototype */ {
|
|
203
238
|
|
|
204
239
|
/**
|
|
205
240
|
* Fired when the input operation has finished by pressing Enter or on focusout.
|
|
206
241
|
*
|
|
207
242
|
* @event
|
|
243
|
+
* @allowPreventDefault
|
|
208
244
|
* @public
|
|
245
|
+
* @param {String} value The submitted value.
|
|
246
|
+
* @param {Boolean} valid Indicator if the value is in correct format pattern and in valid range.
|
|
209
247
|
*/
|
|
210
|
-
change: {
|
|
248
|
+
change: {
|
|
249
|
+
details: {
|
|
250
|
+
value: {
|
|
251
|
+
type: String,
|
|
252
|
+
},
|
|
253
|
+
valid: {
|
|
254
|
+
type: Boolean,
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
},
|
|
211
258
|
|
|
212
259
|
/**
|
|
213
|
-
* Fired when the value of the
|
|
260
|
+
* Fired when the value of the component is changed at each key stroke.
|
|
214
261
|
*
|
|
215
262
|
* @event
|
|
263
|
+
* @allowPreventDefault
|
|
216
264
|
* @public
|
|
265
|
+
* @param {String} value The submitted value.
|
|
266
|
+
* @param {Boolean} valid Indicator if the value is in correct format pattern and in valid range.
|
|
217
267
|
*/
|
|
218
|
-
input: {
|
|
268
|
+
input: {
|
|
269
|
+
details: {
|
|
270
|
+
value: {
|
|
271
|
+
type: String,
|
|
272
|
+
},
|
|
273
|
+
valid: {
|
|
274
|
+
type: Boolean,
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
},
|
|
219
278
|
},
|
|
220
279
|
};
|
|
221
280
|
|
|
@@ -224,8 +283,8 @@ const metadata = {
|
|
|
224
283
|
*
|
|
225
284
|
* <h3 class="comment-api-title">Overview</h3>
|
|
226
285
|
*
|
|
227
|
-
* The <code>ui5-
|
|
228
|
-
* The <code>ui5-
|
|
286
|
+
* The <code>ui5-date-picker</code> component provides an input field with assigned calendar which opens on user action.
|
|
287
|
+
* The <code>ui5-date-picker</code> allows users to select a localized date using touch,
|
|
229
288
|
* mouse, or keyboard input. It consists of two parts: the date input field and the
|
|
230
289
|
* date picker.
|
|
231
290
|
*
|
|
@@ -237,7 +296,7 @@ const metadata = {
|
|
|
237
296
|
* <li>Typing it in directly in the input field</li>
|
|
238
297
|
* </ul>
|
|
239
298
|
* <br><br>
|
|
240
|
-
* When the user makes an entry and
|
|
299
|
+
* When the user makes an entry and presses the enter key, the calendar shows the corresponding date.
|
|
241
300
|
* When the user directly triggers the calendar display, the actual date is displayed.
|
|
242
301
|
*
|
|
243
302
|
* <h3>Formatting</h3>
|
|
@@ -252,14 +311,50 @@ const metadata = {
|
|
|
252
311
|
* a valid value string is "2015-07-30" and the same is displayed in the input.
|
|
253
312
|
*
|
|
254
313
|
* <h3>Keyboard Handling</h3>
|
|
255
|
-
* The <code>ui5-
|
|
256
|
-
* If the <code>ui5-
|
|
314
|
+
* The <code>ui5-date-picker</code> provides advanced keyboard handling.
|
|
315
|
+
* If the <code>ui5-date-picker</code> is focused,
|
|
257
316
|
* you can open or close the drop-down by pressing <code>F4</code>, <code>ALT+UP</code> or <code>ALT+DOWN</code> keys.
|
|
258
317
|
* Once the drop-down is opened, you can use the <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code> arrow keys
|
|
259
318
|
* to navigate through the dates and select one by pressing the <code>Space</code> or <code>Enter</code> keys. Moreover you can
|
|
260
319
|
* use TAB to reach the buttons for changing month and year.
|
|
261
320
|
* <br>
|
|
262
321
|
*
|
|
322
|
+
* If the <code>ui5-date-picker</code> is focused and the picker dialog is not opened the user can
|
|
323
|
+
* increment or decrement the corresponding field of the JS date object referenced by <code>dateValue</code> propery
|
|
324
|
+
* by using the following shortcuts:
|
|
325
|
+
* <br>
|
|
326
|
+
* <ul>
|
|
327
|
+
* <li>[PAGEDOWN] - Decrements the corresponding day of the month by one</li>
|
|
328
|
+
* <li>[SHIFT] + [PAGEDOWN] - Decrements the corresponding month by one</li>
|
|
329
|
+
* <li>[SHIFT] + [CTRL] + [PAGEDOWN] - Decrements the corresponding year by one</li>
|
|
330
|
+
* <li>[PAGEUP] - Increments the corresponding day of the month by one</li>
|
|
331
|
+
* <li>[SHIFT] + [PAGEUP] - Increments the corresponding month by one</li>
|
|
332
|
+
* <li>[SHIFT] + [CTRL] + [PAGEUP] - Increments the corresponding year by one</li>
|
|
333
|
+
* </ul>
|
|
334
|
+
*
|
|
335
|
+
* <h3>Calendar types</h3>
|
|
336
|
+
* The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.
|
|
337
|
+
* By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,
|
|
338
|
+
* you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:
|
|
339
|
+
* <br><br>
|
|
340
|
+
*
|
|
341
|
+
* <code>import "@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js";</code>
|
|
342
|
+
* <br>
|
|
343
|
+
* <code>import "@ui5/webcomponents-localization/dist/features/calendar/Islamic.js";</code>
|
|
344
|
+
* <br>
|
|
345
|
+
* <code>import "@ui5/webcomponents-localization/dist/features/calendar/Japanese.js";</code>
|
|
346
|
+
* <br>
|
|
347
|
+
* <code>import "@ui5/webcomponents-localization/dist/features/calendar/Persian.js";</code>
|
|
348
|
+
* <br><br>
|
|
349
|
+
*
|
|
350
|
+
* Or, you can use the global configuration and set the <code>calendarType</code> key:
|
|
351
|
+
* <br>
|
|
352
|
+
* <pre><code><script data-id="sap-ui-config" type="application/json">
|
|
353
|
+
* {
|
|
354
|
+
* "calendarType": "Japanese"
|
|
355
|
+
* }
|
|
356
|
+
* </script></code></pre>
|
|
357
|
+
*
|
|
263
358
|
* <h3>ES6 Module Import</h3>
|
|
264
359
|
*
|
|
265
360
|
* <code>import "@ui5/webcomponents/dist/DatePicker";</code>
|
|
@@ -267,19 +362,15 @@ const metadata = {
|
|
|
267
362
|
* @constructor
|
|
268
363
|
* @author SAP SE
|
|
269
364
|
* @alias sap.ui.webcomponents.main.DatePicker
|
|
270
|
-
* @extends
|
|
271
|
-
* @tagname ui5-
|
|
365
|
+
* @extends DateComponentBase
|
|
366
|
+
* @tagname ui5-date-picker
|
|
272
367
|
* @public
|
|
273
368
|
*/
|
|
274
|
-
class DatePicker extends
|
|
369
|
+
class DatePicker extends DateComponentBase {
|
|
275
370
|
static get metadata() {
|
|
276
371
|
return metadata;
|
|
277
372
|
}
|
|
278
373
|
|
|
279
|
-
static get render() {
|
|
280
|
-
return litRender;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
374
|
static get template() {
|
|
284
375
|
return DatePickerTemplate;
|
|
285
376
|
}
|
|
@@ -293,159 +384,207 @@ class DatePicker extends UI5Element {
|
|
|
293
384
|
}
|
|
294
385
|
|
|
295
386
|
static get staticAreaStyles() {
|
|
296
|
-
return [
|
|
387
|
+
return [ResponsivePopoverCommonCss, datePickerPopoverCss];
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* @protected
|
|
392
|
+
*/
|
|
393
|
+
onResponsivePopoverAfterClose() {
|
|
394
|
+
this._isPickerOpen = false;
|
|
395
|
+
if (isPhone()) {
|
|
396
|
+
this.blur(); // close device's keyboard and prevent further typing
|
|
397
|
+
} else {
|
|
398
|
+
this._getInput().focus();
|
|
399
|
+
}
|
|
297
400
|
}
|
|
298
401
|
|
|
299
|
-
|
|
300
|
-
|
|
402
|
+
onBeforeRendering() {
|
|
403
|
+
["minDate", "maxDate"].forEach(prop => {
|
|
404
|
+
if (this[prop] && !this.isValid(this[prop])) {
|
|
405
|
+
console.warn(`Invalid value for property "${prop}": ${this[prop]} is not compatible with the configured format pattern: "${this._displayFormat}"`); // eslint-disable-line
|
|
406
|
+
}
|
|
407
|
+
});
|
|
301
408
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
409
|
+
const FormSupport = getFeature("FormSupport");
|
|
410
|
+
if (FormSupport) {
|
|
411
|
+
FormSupport.syncNativeHiddenInput(this);
|
|
412
|
+
} else if (this.name) {
|
|
413
|
+
console.warn(`In order for the "name" property to have effect, you should also: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";`); // eslint-disable-line
|
|
414
|
+
}
|
|
307
415
|
|
|
308
|
-
|
|
416
|
+
this.liveValue = this.value;
|
|
417
|
+
}
|
|
309
418
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
419
|
+
/**
|
|
420
|
+
* Override in derivatives to change calendar selection mode
|
|
421
|
+
* @returns {string}
|
|
422
|
+
* @protected
|
|
423
|
+
*/
|
|
424
|
+
get _calendarSelectionMode() {
|
|
425
|
+
return "Single";
|
|
426
|
+
}
|
|
317
427
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
focusableDay = this.findFirstFocusableDay(dayPicker);
|
|
330
|
-
}
|
|
428
|
+
/**
|
|
429
|
+
* Used to provide a timestamp to the Calendar (to focus it to a relevant date when open) based on the component's state
|
|
430
|
+
* Override in derivatives to provide the calendar a timestamp based on their properties
|
|
431
|
+
* By default focus the calendar on the selected date if set, or the current day otherwise
|
|
432
|
+
* @protected
|
|
433
|
+
*/
|
|
434
|
+
get _calendarTimestamp() {
|
|
435
|
+
if (this.value && this._checkValueValidity(this.value)) {
|
|
436
|
+
const millisecondsUTC = this.dateValueUTC.getTime();
|
|
437
|
+
return getRoundedTimestamp(millisecondsUTC);
|
|
438
|
+
}
|
|
331
439
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
440
|
+
return getTodayUTCTimestamp(this._primaryCalendarType);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Used to provide selectedDates to the calendar based on the component's state
|
|
445
|
+
* Override in derivatives to provide different rules for setting the calendar's selected dates
|
|
446
|
+
* @protected
|
|
447
|
+
*/
|
|
448
|
+
get _calendarSelectedDates() {
|
|
449
|
+
if (this.value && this._checkValueValidity(this.value)) {
|
|
450
|
+
return [this.value];
|
|
451
|
+
}
|
|
337
452
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
focusableDayIdx = focusableItem ? dayPicker.focusableDays.indexOf(focusableItem) : focusableDayIdx;
|
|
453
|
+
return [];
|
|
454
|
+
}
|
|
341
455
|
|
|
342
|
-
|
|
343
|
-
|
|
456
|
+
_onkeydown(event) {
|
|
457
|
+
if (isShow(event)) {
|
|
458
|
+
event.preventDefault(); // Prevent scroll on Alt/Option + Arrow Up/Down
|
|
459
|
+
if (this.isOpen()) {
|
|
460
|
+
if (!isF4(event)) {
|
|
461
|
+
this._toggleAndFocusInput();
|
|
344
462
|
}
|
|
345
|
-
}
|
|
346
|
-
|
|
463
|
+
} else {
|
|
464
|
+
this._toggleAndFocusInput();
|
|
465
|
+
}
|
|
466
|
+
}
|
|
347
467
|
|
|
348
|
-
this.
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
};
|
|
468
|
+
if (this.isOpen()) {
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
352
471
|
|
|
353
|
-
|
|
472
|
+
if (isPageUpShiftCtrl(event)) {
|
|
473
|
+
event.preventDefault();
|
|
474
|
+
this._modifyDateValue(1, "year");
|
|
475
|
+
} else if (isPageUpShift(event)) {
|
|
476
|
+
event.preventDefault();
|
|
477
|
+
this._modifyDateValue(1, "month");
|
|
478
|
+
} else if (isPageUp(event)) {
|
|
479
|
+
event.preventDefault();
|
|
480
|
+
this._modifyDateValue(1, "day");
|
|
481
|
+
} else if (isPageDownShiftCtrl(event)) {
|
|
482
|
+
event.preventDefault();
|
|
483
|
+
this._modifyDateValue(-1, "year");
|
|
484
|
+
} else if (isPageDownShift(event)) {
|
|
485
|
+
event.preventDefault();
|
|
486
|
+
this._modifyDateValue(-1, "month");
|
|
487
|
+
} else if (isPageDown(event)) {
|
|
488
|
+
event.preventDefault();
|
|
489
|
+
this._modifyDateValue(-1, "day");
|
|
490
|
+
}
|
|
354
491
|
}
|
|
355
492
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
493
|
+
/**
|
|
494
|
+
*
|
|
495
|
+
* @param amount
|
|
496
|
+
* @param unit
|
|
497
|
+
* @protected
|
|
498
|
+
*/
|
|
499
|
+
_modifyDateValue(amount, unit) {
|
|
500
|
+
if (!this.dateValue) {
|
|
501
|
+
return;
|
|
361
502
|
}
|
|
503
|
+
|
|
504
|
+
const modifiedDate = modifyDateBy(CalendarDate.fromLocalJSDate(this.dateValue), amount, unit, this._minDate, this._maxDate);
|
|
505
|
+
const newValue = this.formatValue(modifiedDate.toUTCJSDate());
|
|
506
|
+
this._updateValueAndFireEvents(newValue, true, ["change", "value-changed"]);
|
|
362
507
|
}
|
|
363
508
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
this._calendar.formatPattern = this._formatPattern;
|
|
509
|
+
_updateValueAndFireEvents(value, normalizeValue, events, updateValue = true) {
|
|
510
|
+
const valid = this._checkValueValidity(value);
|
|
367
511
|
|
|
368
|
-
if (
|
|
369
|
-
this.
|
|
370
|
-
console.warn(`In order for the "minDate" property to have effect, you should enter valid date format`); // eslint-disable-line
|
|
512
|
+
if (valid && normalizeValue) {
|
|
513
|
+
value = this.normalizeValue(value); // transform valid values (in any format) to the correct format
|
|
371
514
|
}
|
|
372
515
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
console.warn(`In order for the "maxDate" property to have effect, you should enter valid date format`); // eslint-disable-line
|
|
376
|
-
}
|
|
377
|
-
if (this.isValid(this.value) && this.isInValidRange(this._getTimeStampFromString(this.value))) {
|
|
378
|
-
this._changeCalendarSelection();
|
|
379
|
-
} else {
|
|
380
|
-
this._calendar.selectedDates = [];
|
|
381
|
-
}
|
|
516
|
+
let executeEvent = true;
|
|
517
|
+
this.liveValue = value;
|
|
382
518
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
}
|
|
519
|
+
events.forEach(event => {
|
|
520
|
+
if (!this.fireEvent(event, { value, valid }, true)) {
|
|
521
|
+
executeEvent = false;
|
|
522
|
+
}
|
|
523
|
+
});
|
|
389
524
|
|
|
390
|
-
if (
|
|
391
|
-
|
|
525
|
+
if (!executeEvent) {
|
|
526
|
+
return;
|
|
392
527
|
}
|
|
393
528
|
|
|
394
|
-
if (
|
|
395
|
-
this.
|
|
529
|
+
if (updateValue) {
|
|
530
|
+
this.value = value;
|
|
531
|
+
this._updateValueState(); // Change the value state to Error/None, but only if needed
|
|
396
532
|
}
|
|
397
533
|
}
|
|
398
534
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
535
|
+
_updateValueState() {
|
|
536
|
+
const isValid = this._checkValueValidity(this.value);
|
|
537
|
+
if (!isValid) { // If not valid - always set Error regardless of the current value state
|
|
538
|
+
this.valueState = ValueState.Error;
|
|
539
|
+
} else if (isValid && this.valueState === ValueState.Error) { // However if valid, change only Error (but not the others) to None
|
|
540
|
+
this.valueState = ValueState.None;
|
|
404
541
|
}
|
|
405
|
-
return undefined;
|
|
406
542
|
}
|
|
407
543
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
this._getInput().focus();
|
|
412
|
-
}
|
|
544
|
+
_toggleAndFocusInput() {
|
|
545
|
+
this.togglePicker();
|
|
546
|
+
this._getInput().focus();
|
|
413
547
|
}
|
|
414
548
|
|
|
415
549
|
_getInput() {
|
|
416
|
-
return this.shadowRoot.querySelector("ui5-input");
|
|
550
|
+
return this.shadowRoot.querySelector("[ui5-input]");
|
|
417
551
|
}
|
|
418
552
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
if (isValid && isInValidRange) {
|
|
425
|
-
nextValue = this.normalizeValue(nextValue);
|
|
426
|
-
this.valueState = ValueState.None;
|
|
427
|
-
} else {
|
|
428
|
-
this.valueState = ValueState.Error;
|
|
429
|
-
}
|
|
430
|
-
|
|
553
|
+
/**
|
|
554
|
+
* The ui5-input "submit" event handler - fire change event when the user presses enter
|
|
555
|
+
* @protected
|
|
556
|
+
*/
|
|
557
|
+
_onInputSubmit(event) {}
|
|
431
558
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
559
|
+
/**
|
|
560
|
+
* The ui5-input "change" event handler - fire change event when the user focuses out of the input
|
|
561
|
+
* @protected
|
|
562
|
+
*/
|
|
563
|
+
_onInputChange(event) {
|
|
564
|
+
this._updateValueAndFireEvents(event.target.value, true, ["change", "value-changed"]);
|
|
436
565
|
}
|
|
437
566
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
567
|
+
/**
|
|
568
|
+
* The ui5-input "input" event handler - fire input even when the user types
|
|
569
|
+
* @protected
|
|
570
|
+
*/
|
|
571
|
+
async _onInputInput(event) {
|
|
572
|
+
this._updateValueAndFireEvents(event.target.value, false, ["input"], false);
|
|
573
|
+
}
|
|
441
574
|
|
|
442
|
-
|
|
443
|
-
|
|
575
|
+
/**
|
|
576
|
+
* @protected
|
|
577
|
+
*/
|
|
578
|
+
_checkValueValidity(value) {
|
|
579
|
+
if (value === "") {
|
|
580
|
+
return true;
|
|
581
|
+
}
|
|
582
|
+
return this.isValid(value) && this.isInValidRange(value);
|
|
444
583
|
}
|
|
445
584
|
|
|
446
585
|
_click(event) {
|
|
447
586
|
if (isPhone()) {
|
|
448
|
-
this.responsivePopover.
|
|
587
|
+
this.responsivePopover.showAt(this);
|
|
449
588
|
event.preventDefault(); // prevent immediate selection of any item
|
|
450
589
|
}
|
|
451
590
|
}
|
|
@@ -456,175 +595,149 @@ class DatePicker extends UI5Element {
|
|
|
456
595
|
* @public
|
|
457
596
|
*/
|
|
458
597
|
isValid(value = "") {
|
|
459
|
-
|
|
598
|
+
if (value === "") {
|
|
599
|
+
return true;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
return !!this.getFormat().parse(value);
|
|
460
603
|
}
|
|
461
604
|
|
|
462
605
|
/**
|
|
463
|
-
* Checks if a date is
|
|
464
|
-
* @param {
|
|
606
|
+
* Checks if a date is between the minimum and maximum date.
|
|
607
|
+
* @param {string} value A value to be checked
|
|
608
|
+
* @returns {boolean}
|
|
465
609
|
* @public
|
|
466
610
|
*/
|
|
467
611
|
isInValidRange(value = "") {
|
|
468
|
-
|
|
469
|
-
minDate = this._minDate && new Date(this._minDate),
|
|
470
|
-
maxDate = this._maxDate && new Date(this._maxDate);
|
|
471
|
-
|
|
472
|
-
if (minDate && maxDate) {
|
|
473
|
-
if (minDate <= pickedDate && maxDate >= pickedDate) {
|
|
474
|
-
return true;
|
|
475
|
-
}
|
|
476
|
-
} else if (minDate && !maxDate) {
|
|
477
|
-
if (minDate <= pickedDate) {
|
|
478
|
-
return true;
|
|
479
|
-
}
|
|
480
|
-
} else if (maxDate && !minDate) {
|
|
481
|
-
if (maxDate >= pickedDate) {
|
|
482
|
-
return true;
|
|
483
|
-
}
|
|
484
|
-
} else if (!maxDate && !minDate) {
|
|
612
|
+
if (value === "") {
|
|
485
613
|
return true;
|
|
486
614
|
}
|
|
487
615
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
// because the parser understands more than one format
|
|
492
|
-
// but we need values in one format
|
|
493
|
-
normalizeValue(sValue) {
|
|
494
|
-
return this.getFormat().format(this.getFormat().parse(sValue));
|
|
616
|
+
const calendarDate = this._getCalendarDateFromString(value);
|
|
617
|
+
return calendarDate.valueOf() >= this._minDate.valueOf() && calendarDate.valueOf() <= this._maxDate.valueOf();
|
|
495
618
|
}
|
|
496
619
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
620
|
+
/**
|
|
621
|
+
* The parser understands many formats, but we need one format
|
|
622
|
+
* @protected
|
|
623
|
+
*/
|
|
624
|
+
normalizeValue(value) {
|
|
625
|
+
if (value === "") {
|
|
626
|
+
return value;
|
|
500
627
|
}
|
|
501
|
-
return this.getFormat().format(new Date());
|
|
502
|
-
}
|
|
503
628
|
|
|
504
|
-
|
|
505
|
-
const millisecondsUTC = this.getFormat().parse(this.validValue, true).getTime();
|
|
506
|
-
const oCalDate = CalendarDate.fromTimestamp(
|
|
507
|
-
millisecondsUTC - (millisecondsUTC % (24 * 60 * 60 * 1000)),
|
|
508
|
-
this._primaryCalendarType
|
|
509
|
-
);
|
|
510
|
-
return oCalDate;
|
|
629
|
+
return this.getFormat().format(this.getFormat().parse(value, true), true); // it is important to both parse and format the date as UTC
|
|
511
630
|
}
|
|
512
631
|
|
|
513
|
-
get
|
|
514
|
-
return this.
|
|
632
|
+
get _displayFormat() {
|
|
633
|
+
return this.getFormat().oFormatOptions.pattern;
|
|
515
634
|
}
|
|
516
635
|
|
|
517
|
-
|
|
518
|
-
|
|
636
|
+
/**
|
|
637
|
+
* @protected
|
|
638
|
+
*/
|
|
639
|
+
get _placeholder() {
|
|
640
|
+
return this.placeholder !== undefined ? this.placeholder : this._displayFormat;
|
|
519
641
|
}
|
|
520
642
|
|
|
521
|
-
get
|
|
522
|
-
return
|
|
643
|
+
get _headerTitleText() {
|
|
644
|
+
return DatePicker.i18nBundle.getText(INPUT_SUGGESTIONS_TITLE);
|
|
523
645
|
}
|
|
524
646
|
|
|
525
|
-
get
|
|
526
|
-
return
|
|
647
|
+
get phone() {
|
|
648
|
+
return isPhone();
|
|
527
649
|
}
|
|
528
650
|
|
|
529
|
-
get
|
|
530
|
-
return this.
|
|
651
|
+
get showHeader() {
|
|
652
|
+
return this.phone;
|
|
531
653
|
}
|
|
532
654
|
|
|
533
|
-
get
|
|
534
|
-
return this.
|
|
655
|
+
get showFooter() {
|
|
656
|
+
return this.phone;
|
|
535
657
|
}
|
|
536
658
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
this._oDateFormat = DateFormat.getInstance({
|
|
540
|
-
pattern: this._formatPattern,
|
|
541
|
-
calendarType: this._primaryCalendarType,
|
|
542
|
-
});
|
|
543
|
-
} else {
|
|
544
|
-
this._oDateFormat = DateFormat.getInstance({
|
|
545
|
-
style: this._formatPattern,
|
|
546
|
-
calendarType: this._primaryCalendarType,
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
return this._oDateFormat;
|
|
659
|
+
get _isIE() {
|
|
660
|
+
return isIE();
|
|
550
661
|
}
|
|
551
662
|
|
|
552
663
|
get accInfo() {
|
|
553
664
|
return {
|
|
554
|
-
"
|
|
665
|
+
"ariaRoledescription": this.dateAriaDescription,
|
|
555
666
|
"ariaHasPopup": "true",
|
|
556
667
|
"ariaAutoComplete": "none",
|
|
557
668
|
"role": "combobox",
|
|
558
|
-
"
|
|
669
|
+
"ariaControls": `${this._id}-responsive-popover`,
|
|
559
670
|
"ariaExpanded": this.isOpen(),
|
|
560
|
-
"
|
|
671
|
+
"ariaRequired": this.required,
|
|
672
|
+
"ariaLabel": getEffectiveAriaLabelText(this),
|
|
561
673
|
};
|
|
562
674
|
}
|
|
563
675
|
|
|
564
|
-
get
|
|
565
|
-
|
|
566
|
-
return this._getTimeStampFromString(this.maxDate);
|
|
567
|
-
}
|
|
568
|
-
return this.maxDate;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
get _minDate() {
|
|
572
|
-
if (this.minDate) {
|
|
573
|
-
return this._getTimeStampFromString(this.minDate);
|
|
574
|
-
}
|
|
575
|
-
return this.minDate;
|
|
676
|
+
get openIconTitle() {
|
|
677
|
+
return DatePicker.i18nBundle.getText(DATEPICKER_OPEN_ICON_TITLE);
|
|
576
678
|
}
|
|
577
679
|
|
|
578
|
-
get
|
|
579
|
-
return
|
|
680
|
+
get openIconName() {
|
|
681
|
+
return "appointment-2";
|
|
580
682
|
}
|
|
581
683
|
|
|
582
684
|
get dateAriaDescription() {
|
|
583
|
-
return
|
|
685
|
+
return DatePicker.i18nBundle.getText(DATEPICKER_DATE_DESCRIPTION);
|
|
584
686
|
}
|
|
585
687
|
|
|
586
|
-
|
|
587
|
-
|
|
688
|
+
/**
|
|
689
|
+
* Defines whether the dialog on mobile should have header
|
|
690
|
+
* @private
|
|
691
|
+
*/
|
|
692
|
+
get _shouldHideHeader() {
|
|
693
|
+
return false;
|
|
588
694
|
}
|
|
589
695
|
|
|
590
696
|
async _respPopover() {
|
|
591
697
|
const staticAreaItem = await this.getStaticAreaItemDomRef();
|
|
592
|
-
return staticAreaItem.querySelector("ui5-responsive-popover");
|
|
698
|
+
return staticAreaItem.querySelector("[ui5-responsive-popover]");
|
|
593
699
|
}
|
|
594
700
|
|
|
595
701
|
_canOpenPicker() {
|
|
596
702
|
return !this.disabled && !this.readonly;
|
|
597
703
|
}
|
|
598
704
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
705
|
+
/**
|
|
706
|
+
* The user selected a new date in the calendar
|
|
707
|
+
* @param event
|
|
708
|
+
* @protected
|
|
709
|
+
*/
|
|
710
|
+
onSelectedDatesChange(event) {
|
|
711
|
+
event.preventDefault();
|
|
712
|
+
const newValue = event.detail.values && event.detail.values[0];
|
|
713
|
+
this._updateValueAndFireEvents(newValue, true, ["change", "value-changed"]);
|
|
606
714
|
|
|
607
|
-
this.value = this.getFormat().format(
|
|
608
|
-
new Date(CalendarDate.fromTimestamp(
|
|
609
|
-
iNewValue * 1000,
|
|
610
|
-
this._primaryCalendarType
|
|
611
|
-
).valueOf()),
|
|
612
|
-
true
|
|
613
|
-
);
|
|
614
|
-
this._calendar.timestamp = iNewValue;
|
|
615
|
-
this._calendar.selectedDates = event.detail.dates;
|
|
616
|
-
this._focusInputAfterClose = true;
|
|
617
715
|
this.closePicker();
|
|
716
|
+
}
|
|
618
717
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
718
|
+
/**
|
|
719
|
+
* The user clicked the "month" button in the header
|
|
720
|
+
*/
|
|
721
|
+
onHeaderShowMonthPress() {
|
|
722
|
+
this._calendarCurrentPicker = "month";
|
|
723
|
+
}
|
|
624
724
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
725
|
+
/**
|
|
726
|
+
* The user clicked the "year" button in the header
|
|
727
|
+
*/
|
|
728
|
+
onHeaderShowYearPress() {
|
|
729
|
+
this._calendarCurrentPicker = "year";
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Formats a Java Script date object into a string representing a locale date
|
|
734
|
+
* according to the <code>formatPattern</code> property of the DatePicker instance
|
|
735
|
+
* @param {object} date A Java Script date object to be formatted as string
|
|
736
|
+
* @returns {string} The date as string
|
|
737
|
+
* @public
|
|
738
|
+
*/
|
|
739
|
+
formatValue(date) {
|
|
740
|
+
return this.getFormat().format(date);
|
|
628
741
|
}
|
|
629
742
|
|
|
630
743
|
/**
|
|
@@ -637,51 +750,29 @@ class DatePicker extends UI5Element {
|
|
|
637
750
|
|
|
638
751
|
/**
|
|
639
752
|
* Opens the picker.
|
|
640
|
-
* @param {object} options A JSON object with additional configuration.<br>
|
|
641
|
-
* <code>{ focusInput: true }</code> By default, the focus goes in the picker after opening it.
|
|
642
|
-
* Specify this option to focus the input field.
|
|
643
753
|
* @public
|
|
754
|
+
* @async
|
|
755
|
+
* @returns {Promise} Resolves when the picker is open
|
|
644
756
|
*/
|
|
645
|
-
async openPicker(
|
|
757
|
+
async openPicker() {
|
|
646
758
|
this._isPickerOpen = true;
|
|
759
|
+
this._calendarCurrentPicker = "day";
|
|
647
760
|
this.responsivePopover = await this._respPopover();
|
|
648
|
-
this._changeCalendarSelection();
|
|
649
|
-
|
|
650
|
-
if (options && options.focusInput) {
|
|
651
|
-
this._focusInputAfterOpen = true;
|
|
652
|
-
}
|
|
653
761
|
|
|
654
|
-
this.responsivePopover.
|
|
762
|
+
this.responsivePopover.showAt(this);
|
|
655
763
|
}
|
|
656
764
|
|
|
657
765
|
togglePicker() {
|
|
658
766
|
if (this.isOpen()) {
|
|
659
767
|
this.closePicker();
|
|
660
768
|
} else if (this._canOpenPicker()) {
|
|
661
|
-
this.updateStaticAreaItemContentDensity();
|
|
662
769
|
this.openPicker();
|
|
663
770
|
}
|
|
664
771
|
}
|
|
665
772
|
|
|
666
|
-
_changeCalendarSelection(focusTimestamp) {
|
|
667
|
-
if (this._calendarDate.getYear() < 1) {
|
|
668
|
-
// 0 is a valid year, but we cannot display it
|
|
669
|
-
return;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
const oCalDate = this._calendarDate;
|
|
673
|
-
const timestamp = focusTimestamp || oCalDate.valueOf() / 1000;
|
|
674
|
-
|
|
675
|
-
this._calendar = Object.assign({}, this._calendar);
|
|
676
|
-
this._calendar.timestamp = timestamp;
|
|
677
|
-
if (this.value) {
|
|
678
|
-
this._calendar.selectedDates = [timestamp];
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
773
|
/**
|
|
683
774
|
* Checks if the picker is open.
|
|
684
|
-
* @returns {
|
|
775
|
+
* @returns {boolean} true if the picker is open, false otherwise
|
|
685
776
|
* @public
|
|
686
777
|
*/
|
|
687
778
|
isOpen() {
|
|
@@ -689,30 +780,18 @@ class DatePicker extends UI5Element {
|
|
|
689
780
|
}
|
|
690
781
|
|
|
691
782
|
/**
|
|
692
|
-
*
|
|
693
|
-
* @param {*} event An event object
|
|
694
|
-
* @returns {Object} Semantic details
|
|
695
|
-
*/
|
|
696
|
-
getSemanticTargetInfo(event) {
|
|
697
|
-
const oDomTarget = getDomTarget(event);
|
|
698
|
-
let isInput = false;
|
|
699
|
-
|
|
700
|
-
if (oDomTarget && oDomTarget.className.indexOf("ui5-input-inner") > -1) {
|
|
701
|
-
isInput = true;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
return { isInput };
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* Currently selected date represented as JavaScript Date instance.
|
|
783
|
+
* Currently selected date represented as a Local JavaScript Date instance.
|
|
709
784
|
*
|
|
710
785
|
* @readonly
|
|
711
786
|
* @type { Date }
|
|
712
787
|
* @public
|
|
713
788
|
*/
|
|
714
789
|
get dateValue() {
|
|
715
|
-
return this.getFormat().parse(this.value);
|
|
790
|
+
return this.liveValue ? this.getFormat().parse(this.liveValue) : this.getFormat().parse(this.value);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
get dateValueUTC() {
|
|
794
|
+
return this.liveValue ? this.getFormat().parse(this.liveValue, true) : this.getFormat().parse(this.value);
|
|
716
795
|
}
|
|
717
796
|
|
|
718
797
|
get styles() {
|
|
@@ -727,33 +806,18 @@ class DatePicker extends UI5Element {
|
|
|
727
806
|
return InputType.Text;
|
|
728
807
|
}
|
|
729
808
|
|
|
730
|
-
static
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
Input
|
|
737
|
-
|
|
738
|
-
]
|
|
809
|
+
static get dependencies() {
|
|
810
|
+
return [
|
|
811
|
+
Icon,
|
|
812
|
+
ResponsivePopover,
|
|
813
|
+
Calendar,
|
|
814
|
+
CalendarDateComponent.default,
|
|
815
|
+
Input,
|
|
816
|
+
Button,
|
|
817
|
+
];
|
|
739
818
|
}
|
|
740
819
|
}
|
|
741
820
|
|
|
742
|
-
const getDomTarget = event => {
|
|
743
|
-
let target,
|
|
744
|
-
composedPath;
|
|
745
|
-
|
|
746
|
-
if (typeof event.composedPath === "function") {
|
|
747
|
-
composedPath = event.composedPath();
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
if (Array.isArray(composedPath) && composedPath.length) {
|
|
751
|
-
target = composedPath[0];
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
return target;
|
|
755
|
-
};
|
|
756
|
-
|
|
757
821
|
DatePicker.define();
|
|
758
822
|
|
|
759
823
|
export default DatePicker;
|