@ui5/webcomponents 1.14.2 → 1.15.0-rc.1
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 +26 -4
- package/dist/Button.d.ts +27 -0
- package/dist/Button.js +17 -1
- package/dist/Button.js.map +1 -1
- package/dist/CalendarHeader.js +10 -0
- package/dist/CalendarHeader.js.map +1 -1
- package/dist/CalendarPart.d.ts +2 -1
- package/dist/CalendarPart.js +3 -2
- package/dist/CalendarPart.js.map +1 -1
- package/dist/DatePicker.d.ts +2 -1
- package/dist/DatePicker.js +3 -2
- package/dist/DatePicker.js.map +1 -1
- package/dist/DateRangePicker.d.ts +1 -1
- package/dist/DateRangePicker.js +4 -4
- package/dist/DateRangePicker.js.map +1 -1
- package/dist/DateTimePicker.d.ts +1 -1
- package/dist/DateTimePicker.js +2 -2
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/DayPicker.d.ts +2 -3
- package/dist/DayPicker.js +13 -10
- package/dist/DayPicker.js.map +1 -1
- package/dist/ListItem.d.ts +26 -0
- package/dist/ListItem.js +5 -0
- package/dist/ListItem.js.map +1 -1
- package/dist/MonthPicker.d.ts +2 -1
- package/dist/MonthPicker.js +5 -4
- package/dist/MonthPicker.js.map +1 -1
- package/dist/ProgressIndicator.js +1 -1
- package/dist/ProgressIndicator.js.map +1 -1
- package/dist/TimePicker.d.ts +20 -17
- package/dist/TimePicker.js +20 -17
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerBase.d.ts +1 -1
- package/dist/TimePickerBase.js +3 -3
- package/dist/TimePickerBase.js.map +1 -1
- package/dist/TimePickerClock.d.ts +431 -0
- package/dist/TimePickerClock.js +709 -0
- package/dist/TimePickerClock.js.map +1 -0
- package/dist/TimePickerInternals.d.ts +162 -0
- package/dist/TimePickerInternals.js +302 -0
- package/dist/TimePickerInternals.js.map +1 -0
- package/dist/TimeSelectionClocks.d.ts +211 -0
- package/dist/TimeSelectionClocks.js +608 -0
- package/dist/TimeSelectionClocks.js.map +1 -0
- package/dist/ToggleSpinButton.d.ts +57 -0
- package/dist/ToggleSpinButton.js +61 -0
- package/dist/ToggleSpinButton.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/assets/{Card.6c948355.css → Card.55e180c2.css} +1 -1
- package/dist/assets/FontFace.9d4fe719.css +1 -0
- package/dist/assets/TimePickerClock.9c31b552.css +1 -0
- package/dist/assets/TimeSelectionClocks.6e241c3a.css +1 -0
- package/dist/assets/messagebundle_ar.e039ea3b.js +1 -0
- package/dist/assets/{messagebundle_bg.fe0fc2a7.js → messagebundle_bg.80974dcc.js} +1 -1
- package/dist/assets/messagebundle_ca.ca26ca8a.js +1 -0
- package/dist/assets/messagebundle_cs.8e8bdb1f.js +1 -0
- package/dist/assets/messagebundle_cy.85eae935.js +1 -0
- package/dist/assets/messagebundle_da.c3f5cc5c.js +1 -0
- package/dist/assets/messagebundle_de.c9bc374c.js +1 -0
- package/dist/assets/messagebundle_el.2292a1da.js +1 -0
- package/dist/assets/messagebundle_en.deec0dbd.js +1 -0
- package/dist/assets/messagebundle_en_GB.3657e1b3.js +1 -0
- package/dist/assets/messagebundle_en_US_sappsd.f2439798.js +1 -0
- package/dist/assets/{messagebundle_en_US_saprigi.72615e29.js → messagebundle_en_US_saprigi.74656358.js} +1 -1
- package/dist/assets/messagebundle_en_US_saptrc.b0bccf8b.js +1 -0
- package/dist/assets/messagebundle_es.23af8c54.js +1 -0
- package/dist/assets/messagebundle_es_MX.d255aebd.js +1 -0
- package/dist/assets/messagebundle_et.f83d8785.js +1 -0
- package/dist/assets/messagebundle_fi.7b70adbd.js +1 -0
- package/dist/assets/messagebundle_fr.dd9861f3.js +1 -0
- package/dist/assets/messagebundle_fr_CA.45dad85d.js +1 -0
- package/dist/assets/{messagebundle_hi.ce0e6a15.js → messagebundle_hi.01ae7df4.js} +1 -1
- package/dist/assets/messagebundle_hr.c3425aef.js +1 -0
- package/dist/assets/messagebundle_hu.5aa315f6.js +1 -0
- package/dist/assets/messagebundle_it.58f0a71b.js +1 -0
- package/dist/assets/messagebundle_iw.2398feab.js +1 -0
- package/dist/assets/messagebundle_ja.fdd5515e.js +1 -0
- package/dist/assets/messagebundle_kk.14358dec.js +1 -0
- package/dist/assets/messagebundle_ko.b49f2d14.js +1 -0
- package/dist/assets/messagebundle_lt.32b11080.js +1 -0
- package/dist/assets/messagebundle_lv.1fea9c5f.js +1 -0
- package/dist/assets/messagebundle_ms.3aece4c1.js +1 -0
- package/dist/assets/messagebundle_nl.9e7ef972.js +1 -0
- package/dist/assets/messagebundle_no.51b2c47f.js +1 -0
- package/dist/assets/messagebundle_pl.2022b14e.js +1 -0
- package/dist/assets/messagebundle_pt.deb23e18.js +1 -0
- package/dist/assets/messagebundle_pt_PT.513bae5e.js +1 -0
- package/dist/assets/messagebundle_ro.7436c473.js +1 -0
- package/dist/assets/{messagebundle_ru.093d6aec.js → messagebundle_ru.a0593353.js} +1 -1
- package/dist/assets/messagebundle_sh.748d9b17.js +1 -0
- package/dist/assets/messagebundle_sk.c2cb2da0.js +1 -0
- package/dist/assets/messagebundle_sl.78b15828.js +1 -0
- package/dist/assets/messagebundle_sv.dceccd4c.js +1 -0
- package/dist/assets/messagebundle_th.f3e71f48.js +1 -0
- package/dist/assets/messagebundle_tr.900036f8.js +1 -0
- package/dist/assets/messagebundle_uk.0f723d00.js +1 -0
- package/dist/assets/messagebundle_vi.e83b9c07.js +1 -0
- package/dist/assets/messagebundle_zh_CN.4eade528.js +1 -0
- package/dist/assets/messagebundle_zh_TW.c826216a.js +1 -0
- package/dist/assets/{parameters-bundle.css.145c3d8e.js → parameters-bundle.css.0e81607c.js} +0 -4
- package/dist/assets/{parameters-bundle.css.f867fdf7.js → parameters-bundle.css.10bd6ca5.js} +0 -4
- package/dist/assets/{parameters-bundle.css.5b301a79.js → parameters-bundle.css.12bbe810.js} +0 -4
- package/dist/assets/{parameters-bundle.css.fabe35f1.js → parameters-bundle.css.2bbe236f.js} +0 -4
- package/dist/assets/{parameters-bundle.css.2714f1c2.js → parameters-bundle.css.3d1c8be3.js} +0 -4
- package/dist/assets/{parameters-bundle.css.e9f4e712.js → parameters-bundle.css.45635550.js} +0 -4
- package/dist/assets/{parameters-bundle.css.73cf1941.js → parameters-bundle.css.614578f9.js} +0 -4
- package/dist/assets/{parameters-bundle.css.dbeb843f.js → parameters-bundle.css.d2cd5d9b.js} +0 -4
- package/dist/assets/{parameters-bundle.css.3ae8f4f4.js → parameters-bundle.css.dae04f67.js} +0 -4
- package/dist/assets/{parameters-bundle.css.51ce98b4.js → parameters-bundle.css.ddbc474d.js} +0 -4
- package/dist/assets/{parameters-bundle.css.94ec25db.js → parameters-bundle.css.f7d7dd8a.js} +0 -4
- package/dist/assets/{parameters-bundle.css.0496dc46.js → parameters-bundle.css.fcfef787.js} +0 -4
- package/dist/assets/test/pages/{ComboBox.html.e6b2c662.js → ComboBox.html.4067d002.js} +1 -1
- package/dist/assets/test/pages/{Icon.html.4f593716.js → Icon.html.d7e6df22.js} +1 -1
- package/dist/assets/test/pages/{Label.html.36a2faae.js → Label.html.3c17f31f.js} +1 -1
- package/dist/assets/test/pages/{Popups.html.c29d144e.js → Popups.html.d0248b0c.js} +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/TimePickerClock.css +1 -0
- package/dist/css/themes/TimeSelectionClocks.css +1 -0
- 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_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/features/InputElementsFormSupport.d.ts +1 -0
- package/dist/features/InputElementsFormSupport.js +21 -9
- package/dist/features/InputElementsFormSupport.js.map +1 -1
- 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 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_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_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/templates/ComboBoxPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/ComboBoxPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TableTemplate.lit.js +1 -1
- package/dist/generated/templates/TableTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TimePickerClockTemplate.lit.d.ts +4 -0
- package/dist/generated/templates/TimePickerClockTemplate.lit.js +11 -0
- package/dist/generated/templates/TimePickerClockTemplate.lit.js.map +1 -0
- package/dist/generated/templates/TimePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/TimePickerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TimeSelectionClocksTemplate.lit.d.ts +4 -0
- package/dist/generated/templates/TimeSelectionClocksTemplate.lit.js +9 -0
- package/dist/generated/templates/TimeSelectionClocksTemplate.lit.js.map +1 -0
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.d.ts +4 -0
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js +7 -0
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js.map +1 -0
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/TimePickerClock.css.d.ts +3 -0
- package/dist/generated/themes/TimePickerClock.css.js +8 -0
- package/dist/generated/themes/TimePickerClock.css.js.map +1 -0
- package/dist/generated/themes/TimeSelectionClocks.css.d.ts +3 -0
- package/dist/generated/themes/TimeSelectionClocks.css.js +8 -0
- package/dist/generated/themes/TimeSelectionClocks.css.js.map +1 -0
- 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_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_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/i18n/messagebundle.properties +6 -0
- package/dist/i18n/messagebundle_ar.properties +7 -0
- package/dist/i18n/messagebundle_bg.properties +7 -0
- package/dist/i18n/messagebundle_ca.properties +7 -0
- package/dist/i18n/messagebundle_cs.properties +7 -0
- package/dist/i18n/messagebundle_cy.properties +7 -0
- package/dist/i18n/messagebundle_da.properties +7 -0
- package/dist/i18n/messagebundle_de.properties +8 -1
- package/dist/i18n/messagebundle_el.properties +7 -0
- package/dist/i18n/messagebundle_en.properties +7 -0
- package/dist/i18n/messagebundle_en_GB.properties +7 -0
- package/dist/i18n/messagebundle_en_US_sappsd.properties +11 -0
- package/dist/i18n/messagebundle_en_US_saprigi.properties +11 -0
- package/dist/i18n/messagebundle_en_US_saptrc.properties +11 -0
- package/dist/i18n/messagebundle_es.properties +7 -0
- package/dist/i18n/messagebundle_es_MX.properties +7 -0
- package/dist/i18n/messagebundle_et.properties +7 -0
- package/dist/i18n/messagebundle_fi.properties +7 -0
- package/dist/i18n/messagebundle_fr.properties +8 -1
- package/dist/i18n/messagebundle_fr_CA.properties +7 -0
- package/dist/i18n/messagebundle_hi.properties +7 -0
- package/dist/i18n/messagebundle_hr.properties +7 -0
- package/dist/i18n/messagebundle_hu.properties +7 -0
- package/dist/i18n/messagebundle_id.properties +7 -0
- package/dist/i18n/messagebundle_it.properties +7 -0
- package/dist/i18n/messagebundle_iw.properties +7 -0
- package/dist/i18n/messagebundle_ja.properties +7 -0
- package/dist/i18n/messagebundle_kk.properties +7 -0
- package/dist/i18n/messagebundle_ko.properties +7 -0
- package/dist/i18n/messagebundle_lt.properties +7 -0
- package/dist/i18n/messagebundle_lv.properties +7 -0
- package/dist/i18n/messagebundle_ms.properties +7 -0
- package/dist/i18n/messagebundle_nl.properties +7 -0
- package/dist/i18n/messagebundle_no.properties +7 -0
- package/dist/i18n/messagebundle_pl.properties +7 -0
- package/dist/i18n/messagebundle_pt.properties +7 -0
- package/dist/i18n/messagebundle_pt_PT.properties +7 -0
- package/dist/i18n/messagebundle_ro.properties +7 -0
- package/dist/i18n/messagebundle_ru.properties +7 -0
- package/dist/i18n/messagebundle_sh.properties +7 -0
- package/dist/i18n/messagebundle_sk.properties +7 -0
- package/dist/i18n/messagebundle_sl.properties +7 -0
- package/dist/i18n/messagebundle_sv.properties +7 -0
- package/dist/i18n/messagebundle_th.properties +7 -0
- package/dist/i18n/messagebundle_tr.properties +7 -0
- package/dist/i18n/messagebundle_uk.properties +7 -0
- package/dist/i18n/messagebundle_vi.properties +7 -0
- package/dist/i18n/messagebundle_zh_CN.properties +8 -1
- package/dist/i18n/messagebundle_zh_TW.properties +8 -1
- package/dist/test/pages/72override.html +1 -1
- package/dist/test/pages/AnimanitionOff.html +1 -1
- package/dist/test/pages/Avatar.html +1 -1
- package/dist/test/pages/AvatarGroup.html +1 -1
- package/dist/test/pages/Badge.html +1 -1
- package/dist/test/pages/Breadcrumbs.html +1 -1
- package/dist/test/pages/BusyIndicator.html +1 -1
- package/dist/test/pages/Button.html +8 -1
- package/dist/test/pages/Calendar.html +1 -1
- package/dist/test/pages/Card.html +4 -3
- package/dist/test/pages/Carousel.html +1 -1
- package/dist/test/pages/CheckBox.html +1 -1
- package/dist/test/pages/ColorPalette.html +1 -1
- package/dist/test/pages/ColorPalettePopover.html +1 -1
- package/dist/test/pages/ColorPicker.html +1 -1
- package/dist/test/pages/ComboBox.html +2 -2
- package/dist/test/pages/Components.html +1 -1
- package/dist/test/pages/CoreControls.html +1 -1
- package/dist/test/pages/CoreControls_exp.html +1 -1
- package/dist/test/pages/CustomCSS.html +1 -1
- package/dist/test/pages/DatePicker.html +1 -1
- package/dist/test/pages/DatePicker_test_page.html +1 -1
- package/dist/test/pages/DateRangePicker.html +1 -1
- package/dist/test/pages/DateTimePicker.html +1 -1
- package/dist/test/pages/DateTimePicker_Timezone.html +1 -1
- package/dist/test/pages/DayPicker.html +1 -1
- package/dist/test/pages/Dialog.html +1 -1
- package/dist/test/pages/DialogLifecycle.html +1 -1
- package/dist/test/pages/DialogSemantic.html +1 -1
- package/dist/test/pages/Eventing.html +1 -1
- package/dist/test/pages/F6Test1.html +1 -1
- package/dist/test/pages/F6Test2.html +1 -1
- package/dist/test/pages/F6Test3.html +1 -1
- package/dist/test/pages/F6Test4.html +1 -1
- package/dist/test/pages/F6Test5.html +1 -1
- package/dist/test/pages/F6Test6.html +1 -1
- package/dist/test/pages/F6Test7.html +1 -1
- package/dist/test/pages/FileUploader.html +1 -1
- package/dist/test/pages/FontFace.html +21 -0
- package/dist/test/pages/FormComponents.html +1 -1
- package/dist/test/pages/FormSupport.html +1 -1
- package/dist/test/pages/HCB.html +1 -1
- package/dist/test/pages/Icon.html +2 -2
- package/dist/test/pages/Icon_and_theming.html +1 -1
- package/dist/test/pages/Icon_custom.html +1 -1
- package/dist/test/pages/Input.html +1 -1
- package/dist/test/pages/InputFieldLabels.html +1 -1
- package/dist/test/pages/InputFieldMinWidth.html +1 -1
- package/dist/test/pages/InputIcons.html +1 -1
- package/dist/test/pages/Input_quickview.html +1 -1
- package/dist/test/pages/InputsAlignment.html +1 -1
- package/dist/test/pages/InputsLazyLoading.html +1 -1
- package/dist/test/pages/ItemNavigation.html +1 -1
- package/dist/test/pages/Kitchen.html +1 -1
- package/dist/test/pages/Kitchen.openui5.html +1 -1
- package/dist/test/pages/Label.html +2 -2
- package/dist/test/pages/Link.html +1 -1
- package/dist/test/pages/List.html +1 -1
- package/dist/test/pages/ListGrowing_Button.html +1 -1
- package/dist/test/pages/ListGrowing_Scroll.html +1 -1
- package/dist/test/pages/List_keyboard_support.html +1 -1
- package/dist/test/pages/List_test_page.html +19 -1
- package/dist/test/pages/LitKeyFunction.html +1 -1
- package/dist/test/pages/MemoryLeak.html +1 -1
- package/dist/test/pages/Menu.html +1 -1
- package/dist/test/pages/MessagePage.html +1 -1
- package/dist/test/pages/MessageStrip.html +1 -1
- package/dist/test/pages/MultiComboBox.html +1 -1
- package/dist/test/pages/MultiInput.html +1 -1
- package/dist/test/pages/MultiInput_Suggestions.html +1 -1
- package/dist/test/pages/OpenUI5-second.html +1 -1
- package/dist/test/pages/OpenUI5.html +1 -1
- package/dist/test/pages/Panel.html +1 -1
- package/dist/test/pages/Popover.html +1 -1
- package/dist/test/pages/PopoverArrowBounds.html +1 -1
- package/dist/test/pages/Popups.html +2 -2
- package/dist/test/pages/ProgressIndicator.html +1 -1
- package/dist/test/pages/RTL.html +1 -1
- package/dist/test/pages/RadioButton.html +1 -1
- package/dist/test/pages/RangeSlider.html +1 -1
- package/dist/test/pages/RatingIndicator.html +1 -1
- package/dist/test/pages/ResizeHandler.html +1 -1
- package/dist/test/pages/ResponsivePopover.html +1 -1
- package/dist/test/pages/SegmentedButton.html +1 -1
- package/dist/test/pages/Select.html +1 -1
- package/dist/test/pages/Simple.html +1 -1
- package/dist/test/pages/Slider.html +1 -1
- package/dist/test/pages/SplitButton.html +1 -1
- package/dist/test/pages/StepInput.html +1 -1
- package/dist/test/pages/Switch.html +1 -1
- package/dist/test/pages/TabContainer.html +1 -1
- package/dist/test/pages/Table-perf-pure.html +1 -1
- package/dist/test/pages/Table-perf.html +1 -1
- package/dist/test/pages/Table.html +1 -1
- package/dist/test/pages/Table2.html +1 -1
- package/dist/test/pages/TableAllPopin.html +1 -1
- package/dist/test/pages/TableCustomStyling.html +1 -1
- package/dist/test/pages/TableGrouping.html +1 -1
- package/dist/test/pages/TableGrowingWithButton.html +1 -1
- package/dist/test/pages/TableGrowingWithScroll.html +1 -1
- package/dist/test/pages/TableSelection.html +1 -1
- package/dist/test/pages/TextArea.html +1 -1
- package/dist/test/pages/TimePicker.html +1 -1
- package/dist/test/pages/TimePickerClock.html +90 -0
- package/dist/test/pages/TimeSelection.html +1 -1
- package/dist/test/pages/TimeSelectionClocks.html +64 -0
- package/dist/test/pages/Title.html +1 -1
- package/dist/test/pages/Toast.html +1 -1
- package/dist/test/pages/ToggleButton.html +1 -1
- package/dist/test/pages/Tokenizer.html +1 -1
- package/dist/test/pages/Tree.html +1 -1
- package/dist/test/pages/TreeDynamic.html +1 -1
- package/dist/test/pages/WheelSlider_Test_Page.html +1 -1
- package/dist/test/pages/base/AriaLabelHelper.html +1 -1
- package/dist/test/pages/base/DOMObserver.html +1 -1
- package/dist/test/pages/base/IconCollection.html +1 -1
- package/dist/test/pages/base/IconCollectionInCustomTheme.html +1 -1
- package/dist/test/pages/base/IgnoreCustomElements.html +1 -1
- package/dist/test/pages/base/InvisibleMessage.html +1 -1
- package/dist/test/pages/form.html +1 -1
- package/dist/test/pages/i18n-defaultLang.html +1 -1
- package/dist/test/pages/i18n-demo.html +1 -1
- package/dist/types/ButtonType.d.ts +30 -0
- package/dist/types/ButtonType.js +32 -0
- package/dist/types/ButtonType.js.map +1 -0
- package/package.json +7 -7
- package/src/ComboBoxPopover.hbs +16 -12
- package/src/Table.hbs +2 -2
- package/src/TimePickerClock.hbs +51 -0
- package/src/TimePickerPopover.hbs +3 -8
- package/src/TimeSelectionClocks.hbs +73 -0
- package/src/ToggleSpinButton.hbs +10 -0
- package/src/i18n/messagebundle.properties +6 -0
- package/src/i18n/messagebundle_ar.properties +7 -0
- package/src/i18n/messagebundle_bg.properties +7 -0
- package/src/i18n/messagebundle_ca.properties +7 -0
- package/src/i18n/messagebundle_cs.properties +7 -0
- package/src/i18n/messagebundle_cy.properties +7 -0
- package/src/i18n/messagebundle_da.properties +7 -0
- package/src/i18n/messagebundle_de.properties +8 -1
- package/src/i18n/messagebundle_el.properties +7 -0
- package/src/i18n/messagebundle_en.properties +7 -0
- package/src/i18n/messagebundle_en_GB.properties +7 -0
- package/src/i18n/messagebundle_en_US_sappsd.properties +11 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +11 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +11 -0
- package/src/i18n/messagebundle_es.properties +7 -0
- package/src/i18n/messagebundle_es_MX.properties +7 -0
- package/src/i18n/messagebundle_et.properties +7 -0
- package/src/i18n/messagebundle_fi.properties +7 -0
- package/src/i18n/messagebundle_fr.properties +8 -1
- package/src/i18n/messagebundle_fr_CA.properties +7 -0
- package/src/i18n/messagebundle_hi.properties +7 -0
- package/src/i18n/messagebundle_hr.properties +7 -0
- package/src/i18n/messagebundle_hu.properties +7 -0
- package/src/i18n/messagebundle_id.properties +7 -0
- package/src/i18n/messagebundle_it.properties +7 -0
- package/src/i18n/messagebundle_iw.properties +7 -0
- package/src/i18n/messagebundle_ja.properties +7 -0
- package/src/i18n/messagebundle_kk.properties +7 -0
- package/src/i18n/messagebundle_ko.properties +7 -0
- package/src/i18n/messagebundle_lt.properties +7 -0
- package/src/i18n/messagebundle_lv.properties +7 -0
- package/src/i18n/messagebundle_ms.properties +7 -0
- package/src/i18n/messagebundle_nl.properties +7 -0
- package/src/i18n/messagebundle_no.properties +7 -0
- package/src/i18n/messagebundle_pl.properties +7 -0
- package/src/i18n/messagebundle_pt.properties +7 -0
- package/src/i18n/messagebundle_pt_PT.properties +7 -0
- package/src/i18n/messagebundle_ro.properties +7 -0
- package/src/i18n/messagebundle_ru.properties +7 -0
- package/src/i18n/messagebundle_sh.properties +7 -0
- package/src/i18n/messagebundle_sk.properties +7 -0
- package/src/i18n/messagebundle_sl.properties +7 -0
- package/src/i18n/messagebundle_sv.properties +7 -0
- package/src/i18n/messagebundle_th.properties +7 -0
- package/src/i18n/messagebundle_tr.properties +7 -0
- package/src/i18n/messagebundle_uk.properties +7 -0
- package/src/i18n/messagebundle_vi.properties +7 -0
- package/src/i18n/messagebundle_zh_CN.properties +8 -1
- package/src/i18n/messagebundle_zh_TW.properties +8 -1
- package/src/themes/CalendarHeader.css +1 -1
- package/src/themes/TimePickerClock.css +134 -0
- package/src/themes/TimeSelectionClocks.css +37 -0
- package/src/themes/base/rtl-parameters.css +0 -4
- package/dist/assets/messagebundle_ar.cb2d513f.js +0 -1
- package/dist/assets/messagebundle_ca.5188156e.js +0 -1
- package/dist/assets/messagebundle_cs.326d268e.js +0 -1
- package/dist/assets/messagebundle_cy.27c00e72.js +0 -1
- package/dist/assets/messagebundle_da.8b2efe9a.js +0 -1
- package/dist/assets/messagebundle_de.f247aeb5.js +0 -1
- package/dist/assets/messagebundle_el.2aa42d04.js +0 -1
- package/dist/assets/messagebundle_en.0339fd5b.js +0 -1
- package/dist/assets/messagebundle_en_GB.fb50b51d.js +0 -1
- package/dist/assets/messagebundle_en_US_sappsd.1c34c7f1.js +0 -1
- package/dist/assets/messagebundle_en_US_saptrc.2ec2f5b5.js +0 -1
- package/dist/assets/messagebundle_es.c3e0ee87.js +0 -1
- package/dist/assets/messagebundle_es_MX.66753849.js +0 -1
- package/dist/assets/messagebundle_et.416acfd2.js +0 -1
- package/dist/assets/messagebundle_fi.d1cbd526.js +0 -1
- package/dist/assets/messagebundle_fr.dc36e584.js +0 -1
- package/dist/assets/messagebundle_fr_CA.2523bd90.js +0 -1
- package/dist/assets/messagebundle_hr.ceaae56a.js +0 -1
- package/dist/assets/messagebundle_hu.1ea9e4b9.js +0 -1
- package/dist/assets/messagebundle_it.42236d24.js +0 -1
- package/dist/assets/messagebundle_iw.a7ef7e16.js +0 -1
- package/dist/assets/messagebundle_ja.5d29b9fe.js +0 -1
- package/dist/assets/messagebundle_kk.a06da1f6.js +0 -1
- package/dist/assets/messagebundle_ko.21aacadd.js +0 -1
- package/dist/assets/messagebundle_lt.ce9c0489.js +0 -1
- package/dist/assets/messagebundle_lv.04d3cfc7.js +0 -1
- package/dist/assets/messagebundle_ms.95abdbb4.js +0 -1
- package/dist/assets/messagebundle_nl.57fa959f.js +0 -1
- package/dist/assets/messagebundle_no.e5f967f2.js +0 -1
- package/dist/assets/messagebundle_pl.4e8d92c7.js +0 -1
- package/dist/assets/messagebundle_pt.81f79352.js +0 -1
- package/dist/assets/messagebundle_pt_PT.57ea1c45.js +0 -1
- package/dist/assets/messagebundle_ro.4045f404.js +0 -1
- package/dist/assets/messagebundle_sh.adc6cb96.js +0 -1
- package/dist/assets/messagebundle_sk.3d142f10.js +0 -1
- package/dist/assets/messagebundle_sl.504df99f.js +0 -1
- package/dist/assets/messagebundle_sv.614c8881.js +0 -1
- package/dist/assets/messagebundle_th.38af175f.js +0 -1
- package/dist/assets/messagebundle_tr.888a1c33.js +0 -1
- package/dist/assets/messagebundle_uk.89e0a61e.js +0 -1
- package/dist/assets/messagebundle_vi.36e677bb.js +0 -1
- package/dist/assets/messagebundle_zh_CN.00a7ca32.js +0 -1
- package/dist/assets/messagebundle_zh_TW.c2379ed2.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,20 +3,42 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [1.15.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.0...v1.15.0-rc.1) (2023-06-15)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
10
10
|
|
|
11
|
-
* **
|
|
11
|
+
* **framework:** prioritize external fonts over locally installed ([#7184](https://github.com/SAP/ui5-webcomponents/issues/7184)) ([c527c70](https://github.com/SAP/ui5-webcomponents/commit/c527c70e47be84b663b6c40107737c25f91c9034)), closes [/github.com/SAP/openui5/blob/master/src/themelib_sap_horizon/src/sap/ui/core/themes/sap_horizon/shared.less#L259](https://github.com//github.com/SAP/openui5/blob/master/src/themelib_sap_horizon/src/sap/ui/core/themes/sap_horizon/shared.less/issues/L259) [#7177](https://github.com/SAP/ui5-webcomponents/issues/7177)
|
|
12
|
+
* **ui5-progress-indicator:** align icon value with VD ([#7167](https://github.com/SAP/ui5-webcomponents/issues/7167)) ([7101f27](https://github.com/SAP/ui5-webcomponents/commit/7101f2790e79945a4801de9678a74e8d08c051b6))
|
|
13
|
+
* **ui5-table:** correct width in case of no-data ([#7163](https://github.com/SAP/ui5-webcomponents/issues/7163)) ([f5838a8](https://github.com/SAP/ui5-webcomponents/commit/f5838a8d8fb9e6f00237244c18c036de0e9244e9))
|
|
14
|
+
* **ui5-textarea, ui5-select:** collision of 'popover' property with Google Chrome ([#7162](https://github.com/SAP/ui5-webcomponents/issues/7162)) ([6066d46](https://github.com/SAP/ui5-webcomponents/commit/6066d46521e654dc77abcecaa01cd95efe8675ae))
|
|
12
15
|
|
|
13
16
|
|
|
17
|
+
### Features
|
|
14
18
|
|
|
19
|
+
* **ui5-li:** provide option to set custom aria-setsize ([#7187](https://github.com/SAP/ui5-webcomponents/issues/7187)) ([8ab1c2d](https://github.com/SAP/ui5-webcomponents/commit/8ab1c2d9159223f47bf2d463b8ce7b80f8539a33))
|
|
20
|
+
* **ui5-time-picker:** Redesign the Time Picker component according to the new design ([#6818](https://github.com/SAP/ui5-webcomponents/issues/6818)) ([1d910cf](https://github.com/SAP/ui5-webcomponents/commit/1d910cf47290fcd9986b0b9ced45c9c06e29d657))
|
|
15
21
|
|
|
16
22
|
|
|
17
|
-
## [1.14.1](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0...v1.14.1) (2023-06-08)
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [1.15.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0...v1.15.0-rc.0) (2023-06-08)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* **ui5-calendar:** prevent focus loss during arrow navigation with mouse/touch ([#6957](https://github.com/SAP/ui5-webcomponents/issues/6957)) ([216f6a7](https://github.com/SAP/ui5-webcomponents/commit/216f6a7a476d18a0f6fdf7ff189f953085e30b47))
|
|
36
|
+
* **ui5-shellbar:** improve RTL styling of searchField ([#7089](https://github.com/SAP/ui5-webcomponents/issues/7089)) ([9373abf](https://github.com/SAP/ui5-webcomponents/commit/9373abfd0114650069855419f1caeb2fc5462114)), closes [#7065](https://github.com/SAP/ui5-webcomponents/issues/7065)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* **ui5-button:** type property added ([#7157](https://github.com/SAP/ui5-webcomponents/issues/7157)) ([0effdf7](https://github.com/SAP/ui5-webcomponents/commit/0effdf76fb4e337cbba6ac8826d8052af6779c85))
|
|
20
42
|
|
|
21
43
|
|
|
22
44
|
|
package/dist/Button.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
|
4
4
|
import type { I18nText } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
5
5
|
import type { IFormElement } from "./features/InputElementsFormSupport.js";
|
|
6
6
|
import ButtonDesign from "./types/ButtonDesign.js";
|
|
7
|
+
import ButtonType from "./types/ButtonType.js";
|
|
7
8
|
/**
|
|
8
9
|
* @class
|
|
9
10
|
*
|
|
@@ -115,6 +116,7 @@ declare class Button extends UI5Element implements IFormElement {
|
|
|
115
116
|
* @name sap.ui.webc.main.Button.prototype.submits
|
|
116
117
|
* @defaultvalue false
|
|
117
118
|
* @public
|
|
119
|
+
* @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".
|
|
118
120
|
*/
|
|
119
121
|
submits: boolean;
|
|
120
122
|
/**
|
|
@@ -182,6 +184,29 @@ declare class Button extends UI5Element implements IFormElement {
|
|
|
182
184
|
hasPopup: "Dialog" | "Grid" | "ListBox" | "Menu" | "Tree";
|
|
183
185
|
controls: string;
|
|
184
186
|
};
|
|
187
|
+
/**
|
|
188
|
+
* Defines whether the button has special form-related functionality.
|
|
189
|
+
*
|
|
190
|
+
* <br><br>
|
|
191
|
+
* <b>The available values are:</b>
|
|
192
|
+
*
|
|
193
|
+
* <ul>
|
|
194
|
+
* <li><code>Button</code></li>
|
|
195
|
+
* <li><code>Submit</code></li>
|
|
196
|
+
* <li><code>Reset</code></li>
|
|
197
|
+
* </ul>
|
|
198
|
+
*
|
|
199
|
+
* <br><br>
|
|
200
|
+
* <b>Note:</b> For the <code>type</code> property to have effect, you must add the following import to your project:
|
|
201
|
+
* <code>import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";</code>
|
|
202
|
+
*
|
|
203
|
+
* @type {sap.ui.webc.main.types.ButtonType}
|
|
204
|
+
* @name sap.ui.webc.main.Button.prototype.type
|
|
205
|
+
* @defaultvalue "Button"
|
|
206
|
+
* @public
|
|
207
|
+
* @since 1.15.0
|
|
208
|
+
*/
|
|
209
|
+
type: `${ButtonType}`;
|
|
185
210
|
/**
|
|
186
211
|
* Used to switch the active state (pressed or not) of the component.
|
|
187
212
|
* @private
|
|
@@ -256,6 +281,8 @@ declare class Button extends UI5Element implements IFormElement {
|
|
|
256
281
|
get tabIndexValue(): string;
|
|
257
282
|
get showIconTooltip(): boolean;
|
|
258
283
|
get ariaLabelText(): string | undefined;
|
|
284
|
+
get _isSubmit(): boolean;
|
|
285
|
+
get _isReset(): boolean;
|
|
259
286
|
static onDefine(): Promise<void>;
|
|
260
287
|
}
|
|
261
288
|
export default Button;
|
package/dist/Button.js
CHANGED
|
@@ -20,6 +20,7 @@ import { getIconAccessibleName } from "@ui5/webcomponents-base/dist/asset-regist
|
|
|
20
20
|
import { isPhone, isTablet, isCombi, isDesktop, isSafari, } from "@ui5/webcomponents-base/dist/Device.js";
|
|
21
21
|
import willShowContent from "@ui5/webcomponents-base/dist/util/willShowContent.js";
|
|
22
22
|
import ButtonDesign from "./types/ButtonDesign.js";
|
|
23
|
+
import ButtonType from "./types/ButtonType.js";
|
|
23
24
|
import ButtonTemplate from "./generated/templates/ButtonTemplate.lit.js";
|
|
24
25
|
import Icon from "./Icon.js";
|
|
25
26
|
import { BUTTON_ARIA_TYPE_ACCEPT, BUTTON_ARIA_TYPE_REJECT, BUTTON_ARIA_TYPE_EMPHASIZED } from "./generated/i18n/i18n-defaults.js";
|
|
@@ -100,6 +101,9 @@ let Button = Button_1 = class Button extends UI5Element {
|
|
|
100
101
|
}
|
|
101
102
|
async onBeforeRendering() {
|
|
102
103
|
const formSupport = getFeature("FormSupport");
|
|
104
|
+
if (this.type !== ButtonType.Button && !formSupport) {
|
|
105
|
+
console.warn(`In order for the "type" property to have effect, you should also: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";`); // eslint-disable-line
|
|
106
|
+
}
|
|
103
107
|
if (this.submits && !formSupport) {
|
|
104
108
|
console.warn(`In order for the "submits" property to have effect, you should also: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";`); // eslint-disable-line
|
|
105
109
|
}
|
|
@@ -113,9 +117,12 @@ let Button = Button_1 = class Button extends UI5Element {
|
|
|
113
117
|
}
|
|
114
118
|
markEvent(e, "button");
|
|
115
119
|
const formSupport = getFeature("FormSupport");
|
|
116
|
-
if (formSupport && this.
|
|
120
|
+
if (formSupport && this._isSubmit) {
|
|
117
121
|
formSupport.triggerFormSubmit(this);
|
|
118
122
|
}
|
|
123
|
+
if (formSupport && this._isReset) {
|
|
124
|
+
formSupport.triggerFormReset(this);
|
|
125
|
+
}
|
|
119
126
|
if (isSafari()) {
|
|
120
127
|
this.getDomRef()?.focus();
|
|
121
128
|
}
|
|
@@ -201,6 +208,12 @@ let Button = Button_1 = class Button extends UI5Element {
|
|
|
201
208
|
get ariaLabelText() {
|
|
202
209
|
return getEffectiveAriaLabelText(this);
|
|
203
210
|
}
|
|
211
|
+
get _isSubmit() {
|
|
212
|
+
return this.type === ButtonType.Submit || this.submits;
|
|
213
|
+
}
|
|
214
|
+
get _isReset() {
|
|
215
|
+
return this.type === ButtonType.Reset;
|
|
216
|
+
}
|
|
204
217
|
static async onDefine() {
|
|
205
218
|
Button_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
|
|
206
219
|
}
|
|
@@ -232,6 +245,9 @@ __decorate([
|
|
|
232
245
|
__decorate([
|
|
233
246
|
property({ type: Object })
|
|
234
247
|
], Button.prototype, "accessibilityAttributes", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
property({ type: ButtonType, defaultValue: ButtonType.Button })
|
|
250
|
+
], Button.prototype, "type", void 0);
|
|
235
251
|
__decorate([
|
|
236
252
|
property({ type: Boolean })
|
|
237
253
|
], Button.prototype, "active", 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;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAG3E,OAAO,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAE/F,OAAO,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,GACR,MAAM,wCAAwC,CAAC;AAChD,OAAO,eAAe,MAAM,sDAAsD,CAAC;AAEnF,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AACzE,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAElI,SAAS;AACT,OAAO,SAAS,MAAM,kCAAkC,CAAC;AAGzD,IAAI,uBAAuB,GAAG,KAAK,CAAC;AACpC,IAAI,YAAY,GAAkB,IAAI,CAAC;AA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,IAAI,EAAE,OAAO,EAAE,CAAC;uCACV;AAOlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACH;AAOzB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;2CACX;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACJ;AAOvB;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;yCAChC;AAOnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAanB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;oCACnB;AA1Nd,MAAM;IApBX,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;;;;;;;;;;OAUG;;IACF,KAAK,CAAC,OAAO,CAAC;GACT,MAAM,CA0YX;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 { 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 ButtonTemplate from \"./generated/templates/ButtonTemplate.lit.js\";\nimport Icon from \"./Icon.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\nlet isGlobalHandlerAttached = false;\nlet activeButton: Button | null = null;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-button</code> component represents a simple push button.\n * It enables users to trigger actions by clicking or tapping the <code>ui5-button</code>, or by pressing\n * certain keyboard keys, such as Enter.\n *\n *\n * <h3>Usage</h3>\n *\n * For the <code>ui5-button</code> UI, you can define text, icon, or both. You can also specify\n * whether the text or the icon is displayed first.\n * <br><br>\n * You can choose from a set of predefined types that offer different\n * styling to correspond to the triggered action.\n * <br><br>\n * You can set the <code>ui5-button</code> as enabled or disabled. An enabled\n * <code>ui5-button</code> 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 <code>ui5-button</code> appears inactive and cannot be pressed.\n *\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-button</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>button - Used to style the native button element</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Button\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Button\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-button\n * @implements sap.ui.webc.main.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 * <br><br>\n * <b>Note:</b> The event will not be fired if the <code>disabled</code>\n * property is set to <code>true</code>.\n *\n * @event sap.ui.webc.main.Button#click\n * @public\n * @native\n */\n@event(\"click\")\nclass Button extends UI5Element implements IFormElement {\n\t/**\n\t * Defines the component design.\n\t *\n\t * <br><br>\n\t * <b>The available values are:</b>\n\t *\n\t * <ul>\n\t * <li><code>Default</code></li>\n\t * <li><code>Emphasized</code></li>\n\t * <li><code>Positive</code></li>\n\t * <li><code>Negative</code></li>\n\t * <li><code>Transparent</code></li>\n\t * <li><code>Attention</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.main.types.ButtonDesign}\n\t * @name sap.ui.webc.main.Button.prototype.design\n\t * @defaultvalue \"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 *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Button.prototype.disabled\n\t * @defaultvalue 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 * <br><br>\n\t * Example:\n\t *\n\t * See all the available icons within the <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">Icon Explorer</ui5-link>.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Button.prototype.icon\n\t * @defaultvalue \"\"\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 *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Button.prototype.iconEnd\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\ticonEnd!: boolean;\n\n\t/**\n\t * When set to <code>true</code>, the component will\n\t * automatically submit the nearest HTML form element on <code>press</code>.\n\t * <br><br>\n\t * <b>Note:</b> For the <code>submits</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Button.prototype.submits\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tsubmits!: boolean;\n\n\t/**\n\t * Defines the tooltip of the component.\n\t * <br>\n\t * <b>Note:</b> A tooltip attribute should be provided for icon-only buttons, in order to represent their exact meaning/function.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Button.prototype.tooltip\n\t * @defaultvalue \"\"\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 *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Button.prototype.accessibleName\n\t * @defaultvalue 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 *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Button.prototype.accessibleNameRef\n\t * @defaultvalue \"\"\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 * <ul>\n\t * \t\t<li><code>expanded</code>: Indicates whether the button, or another grouping element it controls, is currently expanded or collapsed. Accepts the following string values:\n\t *\t\t\t<ul>\n\t *\t\t\t\t<li><code>true</code></li>\n\t *\t\t\t\t<li><code>false</code></li>\n\t *\t\t\t</ul>\n\t * \t\t</li>\n\t * \t\t<li><code>hasPopup</code>: 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\t\t<ul>\n\t *\t\t\t\t<li><code>Dialog</code></li>\n\t *\t\t\t\t<li><code>Grid</code></li>\n\t *\t\t\t\t<li><code>ListBox</code></li>\n\t *\t\t\t\t<li><code>Menu</code></li>\n\t *\t\t\t\t<li><code>Tree</code></li>\n\t * \t\t\t</ul>\n\t * \t\t</li>\n\t * \t\t<li><code>controls</code>: Identifies the element (or elements) whose contents or presence are controlled by the button element. Accepts a string value.</li>\n\t * </ul>\n\t * @type {object}\n\t * @name sap.ui.webc.main.Button.prototype.accessibilityAttributes\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes!: { expanded: \"true\" | \"false\", hasPopup: \"Dialog\" | \"Grid\" | \"ListBox\" | \"Menu\" | \"Tree\", controls: string};\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@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\t_tabIndex!: 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 * <br><br>\n\t * <b>Note:</b> Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t *\n\t * @type {Node[]}\n\t * @name sap.ui.webc.main.Button.prototype.default\n\t * @slot\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.active = 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.active = 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.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\t\tmarkEvent(e, \"button\");\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport && this.submits) {\n\t\t\tformSupport.triggerFormSubmit(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.active = true;\n\t\tactiveButton = this; // eslint-disable-line\n\t}\n\n\t_ontouchend() {\n\t\tthis.active = false;\n\n\t\tif (activeButton) {\n\t\t\tactiveButton.active = 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.active = true;\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis.active = false;\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\t\tthis.active = false;\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\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 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._tabIndex;\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\tstatic async onDefine() {\n\t\tButton.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nButton.define();\n\nexport default Button;\n"]}
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.ts"],"names":[],"mappings":";;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element 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 { 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 ButtonTemplate from \"./generated/templates/ButtonTemplate.lit.js\";\nimport Icon from \"./Icon.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\nlet isGlobalHandlerAttached = false;\nlet activeButton: Button | null = null;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-button</code> component represents a simple push button.\n * It enables users to trigger actions by clicking or tapping the <code>ui5-button</code>, or by pressing\n * certain keyboard keys, such as Enter.\n *\n *\n * <h3>Usage</h3>\n *\n * For the <code>ui5-button</code> UI, you can define text, icon, or both. You can also specify\n * whether the text or the icon is displayed first.\n * <br><br>\n * You can choose from a set of predefined types that offer different\n * styling to correspond to the triggered action.\n * <br><br>\n * You can set the <code>ui5-button</code> as enabled or disabled. An enabled\n * <code>ui5-button</code> 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 <code>ui5-button</code> appears inactive and cannot be pressed.\n *\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-button</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>button - Used to style the native button element</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Button\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Button\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-button\n * @implements sap.ui.webc.main.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 * <br><br>\n * <b>Note:</b> The event will not be fired if the <code>disabled</code>\n * property is set to <code>true</code>.\n *\n * @event sap.ui.webc.main.Button#click\n * @public\n * @native\n */\n@event(\"click\")\nclass Button extends UI5Element implements IFormElement {\n\t/**\n\t * Defines the component design.\n\t *\n\t * <br><br>\n\t * <b>The available values are:</b>\n\t *\n\t * <ul>\n\t * <li><code>Default</code></li>\n\t * <li><code>Emphasized</code></li>\n\t * <li><code>Positive</code></li>\n\t * <li><code>Negative</code></li>\n\t * <li><code>Transparent</code></li>\n\t * <li><code>Attention</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.main.types.ButtonDesign}\n\t * @name sap.ui.webc.main.Button.prototype.design\n\t * @defaultvalue \"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 *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Button.prototype.disabled\n\t * @defaultvalue 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 * <br><br>\n\t * Example:\n\t *\n\t * See all the available icons within the <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">Icon Explorer</ui5-link>.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Button.prototype.icon\n\t * @defaultvalue \"\"\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 *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Button.prototype.iconEnd\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\ticonEnd!: boolean;\n\n\t/**\n\t * When set to <code>true</code>, the component will\n\t * automatically submit the nearest HTML form element on <code>press</code>.\n\t * <br><br>\n\t * <b>Note:</b> For the <code>submits</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Button.prototype.submits\n\t * @defaultvalue 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 * <br>\n\t * <b>Note:</b> A tooltip attribute should be provided for icon-only buttons, in order to represent their exact meaning/function.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Button.prototype.tooltip\n\t * @defaultvalue \"\"\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 *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Button.prototype.accessibleName\n\t * @defaultvalue 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 *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Button.prototype.accessibleNameRef\n\t * @defaultvalue \"\"\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 * <ul>\n\t * \t\t<li><code>expanded</code>: Indicates whether the button, or another grouping element it controls, is currently expanded or collapsed. Accepts the following string values:\n\t *\t\t\t<ul>\n\t *\t\t\t\t<li><code>true</code></li>\n\t *\t\t\t\t<li><code>false</code></li>\n\t *\t\t\t</ul>\n\t * \t\t</li>\n\t * \t\t<li><code>hasPopup</code>: 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\t\t<ul>\n\t *\t\t\t\t<li><code>Dialog</code></li>\n\t *\t\t\t\t<li><code>Grid</code></li>\n\t *\t\t\t\t<li><code>ListBox</code></li>\n\t *\t\t\t\t<li><code>Menu</code></li>\n\t *\t\t\t\t<li><code>Tree</code></li>\n\t * \t\t\t</ul>\n\t * \t\t</li>\n\t * \t\t<li><code>controls</code>: Identifies the element (or elements) whose contents or presence are controlled by the button element. Accepts a string value.</li>\n\t * </ul>\n\t * @type {object}\n\t * @name sap.ui.webc.main.Button.prototype.accessibilityAttributes\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes!: { expanded: \"true\" | \"false\", hasPopup: \"Dialog\" | \"Grid\" | \"ListBox\" | \"Menu\" | \"Tree\", controls: string};\n\n\t/**\n\t * Defines whether the button has special form-related functionality.\n\t *\n\t * <br><br>\n\t * <b>The available values are:</b>\n\t *\n\t * <ul>\n\t * <li><code>Button</code></li>\n\t * <li><code>Submit</code></li>\n\t * <li><code>Reset</code></li>\n\t * </ul>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> For the <code>type</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * @type {sap.ui.webc.main.types.ButtonType}\n\t * @name sap.ui.webc.main.Button.prototype.type\n\t * @defaultvalue \"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 * 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@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\t_tabIndex!: 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 * <br><br>\n\t * <b>Note:</b> Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t *\n\t * @type {Node[]}\n\t * @name sap.ui.webc.main.Button.prototype.default\n\t * @slot\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.active = 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.active = 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\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.active = true;\n\t\tactiveButton = this; // eslint-disable-line\n\t}\n\n\t_ontouchend() {\n\t\tthis.active = false;\n\n\t\tif (activeButton) {\n\t\t\tactiveButton.active = 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.active = true;\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis.active = false;\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\t\tthis.active = false;\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\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 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._tabIndex;\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;\n"]}
|
package/dist/CalendarHeader.js
CHANGED
|
@@ -37,10 +37,20 @@ let CalendarHeader = CalendarHeader_1 = class CalendarHeader extends UI5Element
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
onPrevButtonClick(e) {
|
|
40
|
+
if (this.isPrevButtonDisabled) {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
40
44
|
this.fireEvent("previous-press", e);
|
|
45
|
+
e.preventDefault();
|
|
41
46
|
}
|
|
42
47
|
onNextButtonClick(e) {
|
|
48
|
+
if (this.isNextButtonDisabled) {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
43
52
|
this.fireEvent("next-press", e);
|
|
53
|
+
e.preventDefault();
|
|
44
54
|
}
|
|
45
55
|
onMonthButtonClick(e) {
|
|
46
56
|
this.fireEvent("show-month-press", e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarHeader.js","sourceRoot":"","sources":["../src/CalendarHeader.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,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,OAAO,MAAM,+CAA+C,CAAC;AACpE,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,kDAAkD,CAAC;AAC1D,OAAO,mDAAmD,CAAC;AAC3D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,sBAAsB,MAAM,qDAAqD,CAAC;AACzF,OAAO,EACN,2BAA2B,EAC3B,+BAA+B,GAC/B,MAAM,mCAAmC,CAAC;AAE3C,SAAS;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,EAAE,OAAO,EAAE,CAAC;iDACd;AAUnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;2DACO;AAYxC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;6DACS;AAQ1C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0EACuC;AAGlE;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4DACG;AAG/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4DACG;AAG/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2DACE;AAG9B;IADC,QAAQ,EAAE;wDACe;AAG1B;IADC,QAAQ,EAAE;uDACc;AAGzB;IADC,QAAQ,EAAE;8DACqB;AAGhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0DACC;AA5DxB,cAAc;IAZnB,aAAa,CAAC;QACd,GAAG,EAAE,qBAAqB;QAC1B,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,sBAAsB;QAChC,MAAM,EAAE,oBAAoB;QAC5B,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;IACD,KAAK,CAAC,YAAY,CAAC;IACnB,KAAK,CAAC,gBAAgB,CAAC;IACvB,KAAK,CAAC,kBAAkB,CAAC;IACzB,KAAK,CAAC,iBAAiB,CAAC;GACnB,cAAc,CAgKnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-left.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\nimport Icon from \"./Icon.js\";\nimport CalendarHeaderTemplate from \"./generated/templates/CalendarHeaderTemplate.lit.js\";\nimport {\n\tCALENDAR_HEADER_NEXT_BUTTON,\n\tCALENDAR_HEADER_PREVIOUS_BUTTON,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport calendarHeaderStyles from \"./generated/themes/CalendarHeader.css.js\";\n\ntype SecondaryCalendarButtonTexts = {\n\tmonthButtonText: string,\n\tmonthButtonInfo: string,\n\tyearButtonText: string,\n}\n\n@customElement({\n\ttag: \"ui5-calendar-header\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: CalendarHeaderTemplate,\n\tstyles: calendarHeaderStyles,\n\tdependencies: [Icon],\n})\n@event(\"next-press\")\n@event(\"previous-press\")\n@event(\"show-month-press\")\n@event(\"show-year-press\")\nclass CalendarHeader extends UI5Element {\n\t/**\n\t * Defines component's timestamp.\n\t * <b>Note:</b> set by the Calendar component\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.CalendarHeader.prototype.timestamp\n\t * @public\n\t */\n\t@property({ validator: Integer })\n\ttimestamp?: number;\n\n\t/**\n\t * Defines component's primary calendar type.\n\t * <b>Note:</b> set by the Calendar component\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.CalendarHeader.prototype.primaryCalendarType\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tprimaryCalendarType?: `${CalendarType}`;\n\n\t/**\n\t * Defines component's secondary calendar type.\n\t * <b>Note:</b> set by the Calendar component\n\t * @sience 1.0.0-rc.16\n\t * @defaultvalue undefined\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.CalendarHeader.prototype.secondaryCalendarType\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tsecondaryCalendarType?: `${CalendarType}`;\n\n\t/**\n\t * Stores information for month button for secondary calendar type\n\t * @type {object}\n\t * @private\n\t*/\n\t@property({ type: Object })\n\tbuttonTextForSecondaryCalendarType!: SecondaryCalendarButtonTexts;\n\n\t@property({ type: Boolean })\n\tisNextButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\tisPrevButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\tisMonthButtonHidden!: boolean;\n\n\t@property()\n\t_monthButtonText!: string;\n\n\t@property()\n\t_yearButtonText!: string;\n\n\t@property()\n\t_yearButtonTextSecType!: string;\n\n\t@property({ type: Boolean })\n\tisYearButtonHidden!: boolean;\n\n\t_prevButtonText?: string;\n\t_nextButtonText?: string;\n\t_secondMonthButtonText?: string;\n\t_secondYearButtonText?: string;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tCalendarHeader.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._prevButtonText = CalendarHeader.i18nBundle.getText(CALENDAR_HEADER_PREVIOUS_BUTTON);\n\t\tthis._nextButtonText = CalendarHeader.i18nBundle.getText(CALENDAR_HEADER_NEXT_BUTTON);\n\n\t\tif (this.hasSecondaryCalendarType) {\n\t\t\tthis._secondMonthButtonText = this.buttonTextForSecondaryCalendarType.monthButtonText;\n\t\t\tthis._secondYearButtonText = this.buttonTextForSecondaryCalendarType.yearButtonText;\n\t\t}\n\t}\n\n\tonPrevButtonClick(e: MouseEvent) {\n\t\tthis.fireEvent(\"previous-press\", e);\n\t}\n\n\tonNextButtonClick(e: MouseEvent) {\n\t\tthis.fireEvent(\"next-press\", e);\n\t}\n\n\tonMonthButtonClick(e: MouseEvent) {\n\t\tthis.fireEvent(\"show-month-press\", e);\n\t}\n\n\tonMonthButtonKeyDown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireEvent(\"show-month-press\", e);\n\t\t}\n\t}\n\n\tonMonthButtonKeyUp(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.fireEvent(\"show-month-press\", e);\n\t\t}\n\t}\n\n\tonYearButtonClick(e: MouseEvent) {\n\t\tthis.fireEvent(\"show-year-press\", e);\n\t}\n\n\tonYearButtonKeyDown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireEvent(\"show-year-press\", e);\n\t\t}\n\t}\n\n\tonYearButtonKeyUp(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.fireEvent(\"show-year-press\", e);\n\t\t}\n\t}\n\n\tget hasSecondaryCalendarType() {\n\t\treturn !!this.secondaryCalendarType;\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tprevButton: {\n\t\t\t\t\"ui5-calheader-arrowbtn\": true,\n\t\t\t\t\"ui5-calheader-arrowbtn-disabled\": this.isPrevButtonDisabled,\n\t\t\t},\n\t\t\tnextButton: {\n\t\t\t\t\"ui5-calheader-arrowbtn\": true,\n\t\t\t\t\"ui5-calheader-arrowbtn-disabled\": this.isNextButtonDisabled,\n\t\t\t},\n\t\t};\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\tariaLabelMonthButton: this.hasSecondaryCalendarType\n\t\t\t\t? `${this._monthButtonText}, ${this.buttonTextForSecondaryCalendarType.monthButtonInfo}` : `${this._monthButtonText}`,\n\t\t};\n\t}\n}\n\nCalendarHeader.define();\n\nexport default CalendarHeader;\n"]}
|
|
1
|
+
{"version":3,"file":"CalendarHeader.js","sourceRoot":"","sources":["../src/CalendarHeader.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,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,OAAO,MAAM,+CAA+C,CAAC;AACpE,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,kDAAkD,CAAC;AAC1D,OAAO,mDAAmD,CAAC;AAC3D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,sBAAsB,MAAM,qDAAqD,CAAC;AACzF,OAAO,EACN,2BAA2B,EAC3B,+BAA+B,GAC/B,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAoB5E,IAAM,cAAc,sBAApB,MAAM,cAAe,SAAQ,UAAU;IAqEtC,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpB,gBAAc,CAAC,UAAU,GAAG,MAAM,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACvE,CAAC;IAED;QACC,KAAK,EAAE,CAAC;IACT,CAAC;IAED,iBAAiB;QAChB,IAAI,CAAC,eAAe,GAAG,gBAAc,CAAC,UAAU,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC;QAC1F,IAAI,CAAC,eAAe,GAAG,gBAAc,CAAC,UAAU,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;QAEtF,IAAI,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AI,EAAE,MAAM,EAAE,CAAC;0EACuC;AAGlE;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4DACG;AAG/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4DACG;AAG/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2DACE;AAG9B;IADC,QAAQ,EAAE;wDACe;AAG1B;IADC,QAAQ,EAAE;uDACc;AAGzB;IADC,QAAQ,EAAE;8DACqB;AAGhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0DACC;AA5DxB,cAAc;IAZnB,aAAa,CAAC;QACd,GAAG,EAAE,qBAAqB;QAC1B,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,sBAAsB;QAChC,MAAM,EAAE,oBAAoB;QAC5B,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;IACD,KAAK,CAAC,YAAY,CAAC;IACnB,KAAK,CAAC,gBAAgB,CAAC;IACvB,KAAK,CAAC,kBAAkB,CAAC;IACzB,KAAK,CAAC,iBAAiB,CAAC;GACnB,cAAc,CA4KnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-left.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\nimport Icon from \"./Icon.js\";\nimport CalendarHeaderTemplate from \"./generated/templates/CalendarHeaderTemplate.lit.js\";\nimport {\n\tCALENDAR_HEADER_NEXT_BUTTON,\n\tCALENDAR_HEADER_PREVIOUS_BUTTON,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport calendarHeaderStyles from \"./generated/themes/CalendarHeader.css.js\";\n\ntype SecondaryCalendarButtonTexts = {\n\tmonthButtonText: string,\n\tmonthButtonInfo: string,\n\tyearButtonText: string,\n}\n\n@customElement({\n\ttag: \"ui5-calendar-header\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: CalendarHeaderTemplate,\n\tstyles: calendarHeaderStyles,\n\tdependencies: [Icon],\n})\n@event(\"next-press\")\n@event(\"previous-press\")\n@event(\"show-month-press\")\n@event(\"show-year-press\")\nclass CalendarHeader extends UI5Element {\n\t/**\n\t * Defines component's timestamp.\n\t * <b>Note:</b> set by the Calendar component\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.CalendarHeader.prototype.timestamp\n\t * @public\n\t */\n\t@property({ validator: Integer })\n\ttimestamp?: number;\n\n\t/**\n\t * Defines component's primary calendar type.\n\t * <b>Note:</b> set by the Calendar component\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.CalendarHeader.prototype.primaryCalendarType\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tprimaryCalendarType?: `${CalendarType}`;\n\n\t/**\n\t * Defines component's secondary calendar type.\n\t * <b>Note:</b> set by the Calendar component\n\t * @sience 1.0.0-rc.16\n\t * @defaultvalue undefined\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.CalendarHeader.prototype.secondaryCalendarType\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tsecondaryCalendarType?: `${CalendarType}`;\n\n\t/**\n\t * Stores information for month button for secondary calendar type\n\t * @type {object}\n\t * @private\n\t*/\n\t@property({ type: Object })\n\tbuttonTextForSecondaryCalendarType!: SecondaryCalendarButtonTexts;\n\n\t@property({ type: Boolean })\n\tisNextButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\tisPrevButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\tisMonthButtonHidden!: boolean;\n\n\t@property()\n\t_monthButtonText!: string;\n\n\t@property()\n\t_yearButtonText!: string;\n\n\t@property()\n\t_yearButtonTextSecType!: string;\n\n\t@property({ type: Boolean })\n\tisYearButtonHidden!: boolean;\n\n\t_prevButtonText?: string;\n\t_nextButtonText?: string;\n\t_secondMonthButtonText?: string;\n\t_secondYearButtonText?: string;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tCalendarHeader.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._prevButtonText = CalendarHeader.i18nBundle.getText(CALENDAR_HEADER_PREVIOUS_BUTTON);\n\t\tthis._nextButtonText = CalendarHeader.i18nBundle.getText(CALENDAR_HEADER_NEXT_BUTTON);\n\n\t\tif (this.hasSecondaryCalendarType) {\n\t\t\tthis._secondMonthButtonText = this.buttonTextForSecondaryCalendarType.monthButtonText;\n\t\t\tthis._secondYearButtonText = this.buttonTextForSecondaryCalendarType.yearButtonText;\n\t\t}\n\t}\n\n\tonPrevButtonClick(e: MouseEvent) {\n\t\tif (this.isPrevButtonDisabled) {\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireEvent(\"previous-press\", e);\n\t\te.preventDefault();\n\t}\n\n\tonNextButtonClick(e: MouseEvent) {\n\t\tif (this.isNextButtonDisabled) {\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireEvent(\"next-press\", e);\n\t\te.preventDefault();\n\t}\n\n\tonMonthButtonClick(e: MouseEvent) {\n\t\tthis.fireEvent(\"show-month-press\", e);\n\t}\n\n\tonMonthButtonKeyDown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireEvent(\"show-month-press\", e);\n\t\t}\n\t}\n\n\tonMonthButtonKeyUp(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.fireEvent(\"show-month-press\", e);\n\t\t}\n\t}\n\n\tonYearButtonClick(e: MouseEvent) {\n\t\tthis.fireEvent(\"show-year-press\", e);\n\t}\n\n\tonYearButtonKeyDown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireEvent(\"show-year-press\", e);\n\t\t}\n\t}\n\n\tonYearButtonKeyUp(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.fireEvent(\"show-year-press\", e);\n\t\t}\n\t}\n\n\tget hasSecondaryCalendarType() {\n\t\treturn !!this.secondaryCalendarType;\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tprevButton: {\n\t\t\t\t\"ui5-calheader-arrowbtn\": true,\n\t\t\t\t\"ui5-calheader-arrowbtn-disabled\": this.isPrevButtonDisabled,\n\t\t\t},\n\t\t\tnextButton: {\n\t\t\t\t\"ui5-calheader-arrowbtn\": true,\n\t\t\t\t\"ui5-calheader-arrowbtn-disabled\": this.isNextButtonDisabled,\n\t\t\t},\n\t\t};\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\tariaLabelMonthButton: this.hasSecondaryCalendarType\n\t\t\t\t? `${this._monthButtonText}, ${this.buttonTextForSecondaryCalendarType.monthButtonInfo}` : `${this._monthButtonText}`,\n\t\t};\n\t}\n}\n\nCalendarHeader.define();\n\nexport default CalendarHeader;\n"]}
|
package/dist/CalendarPart.d.ts
CHANGED
|
@@ -45,9 +45,10 @@ declare class CalendarPart extends DateComponentBase {
|
|
|
45
45
|
* Modify a timestamp by a certain amount of days/months/years and enforce limits
|
|
46
46
|
* @param amount
|
|
47
47
|
* @param unit
|
|
48
|
+
* @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)
|
|
48
49
|
* @protected
|
|
49
50
|
*/
|
|
50
|
-
_safelyModifyTimestampBy(amount: number, unit: string): void;
|
|
51
|
+
_safelyModifyTimestampBy(amount: number, unit: string, preserveDate?: boolean): void;
|
|
51
52
|
_getTimestampFromDom(domNode: HTMLElement): number;
|
|
52
53
|
}
|
|
53
54
|
export default CalendarPart;
|
package/dist/CalendarPart.js
CHANGED
|
@@ -75,10 +75,11 @@ class CalendarPart extends DateComponentBase {
|
|
|
75
75
|
* Modify a timestamp by a certain amount of days/months/years and enforce limits
|
|
76
76
|
* @param amount
|
|
77
77
|
* @param unit
|
|
78
|
+
* @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)
|
|
78
79
|
* @protected
|
|
79
80
|
*/
|
|
80
|
-
_safelyModifyTimestampBy(amount, unit) {
|
|
81
|
-
const newDate = modifyDateBy(this._calendarDate, amount, unit);
|
|
81
|
+
_safelyModifyTimestampBy(amount, unit, preserveDate) {
|
|
82
|
+
const newDate = modifyDateBy(this._calendarDate, amount, unit, preserveDate);
|
|
82
83
|
this._safelySetTimestamp(newDate.valueOf() / 1000);
|
|
83
84
|
}
|
|
84
85
|
_getTimestampFromDom(domNode) {
|
package/dist/CalendarPart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarPart.js","sourceRoot":"","sources":["../src/CalendarPart.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,OAAO,MAAM,+CAA+C,CAAC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AAO,EAAE,CAAC;+CACd;AA4EpB,eAAe,YAAY,CAAC","sourcesContent":["import property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.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 DateComponentBase from \"./DateComponentBase.js\";\n\n/**\n * @class\n *\n * Abstract base class for Calendar, DayPicker, MonthPicker and YearPicker that adds support for:\n * - common properties (timestamp, selectedDates): declarations and methods that operate on them\n * - other common code\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.CalendarPart\n * @extends sap.ui.webc.main.DateComponentBase\n * @public\n */\nclass CalendarPart extends DateComponentBase {\n\t/**\n\t * The timestamp of the currently focused date. Set this property to move the component's focus to a certain date.\n\t * <b>Node:</b> Timestamp is 10-digit Integer representing the seconds (not milliseconds) since the Unix Epoch.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @protected\n\t */\n\t@property({ validator: Integer })\n\ttimestamp?: number;\n\n\tget _minTimestamp() {\n\t\treturn this._minDate.valueOf() / 1000;\n\t}\n\n\tget _maxTimestamp() {\n\t\treturn this._maxDate.valueOf() / 1000;\n\t}\n\n\t/**\n\t * Returns the effective timestamp to be used by the respective calendar part\n\t * @protected\n\t */\n\tget _timestamp() {\n\t\tlet timestamp = this.timestamp !== undefined ? this.timestamp : getTodayUTCTimestamp(this._primaryCalendarType);\n\n\t\tif (this._maxTimestamp && this._maxTimestamp < timestamp) {\n\t\t\ttimestamp = this._maxTimestamp;\n\t\t} else if (this._minTimestamp && this._minTimestamp > timestamp) {\n\t\t\ttimestamp = this._minTimestamp;\n\t\t}\n\n\t\treturn timestamp;\n\t}\n\n\tget _localDate() {\n\t\treturn new Date(this._timestamp * 1000);\n\t}\n\n\t/**\n\t * Returns a CalendarDate instance, representing the _timestamp getter - this date is central to all components' rendering logic\n\t * @protected\n\t */\n\tget _calendarDate() {\n\t\treturn CalendarDate.fromTimestamp(this._localDate.getTime(), this._primaryCalendarType);\n\t}\n\n\t/**\n\t * Change a timestamp and enforce limits\n\t *\n\t * @param timestamp\n\t * @protected\n\t */\n\t_safelySetTimestamp(timestamp: number) {\n\t\tconst min = this._minDate.valueOf() / 1000;\n\t\tconst max = this._maxDate.valueOf() / 1000;\n\n\t\tif (timestamp < min) {\n\t\t\ttimestamp = min;\n\t\t}\n\t\tif (timestamp > max) {\n\t\t\ttimestamp = max;\n\t\t}\n\n\t\tthis.timestamp = timestamp;\n\t}\n\n\t/**\n\t * Modify a timestamp by a certain amount of days/months/years and enforce limits\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_safelyModifyTimestampBy(amount: number, unit: string, preserveDate?: boolean) {\n\t\tconst newDate = modifyDateBy(this._calendarDate, amount, unit, preserveDate);\n\t\tthis._safelySetTimestamp(newDate.valueOf() / 1000);\n\t}\n\n\t_getTimestampFromDom(domNode: HTMLElement) {\n\t\tconst oMonthDomRef = domNode.getAttribute(\"data-sap-timestamp\")!;\n\t\treturn parseInt(oMonthDomRef);\n\t}\n}\n\nexport default CalendarPart;\n"]}
|
package/dist/DatePicker.d.ts
CHANGED
|
@@ -293,9 +293,10 @@ declare class DatePicker extends DateComponentBase implements IFormElement {
|
|
|
293
293
|
*
|
|
294
294
|
* @param { number } amount
|
|
295
295
|
* @param { string } unit
|
|
296
|
+
* @param { boolean } preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)
|
|
296
297
|
* @protected
|
|
297
298
|
*/
|
|
298
|
-
_modifyDateValue(amount: number, unit: string): void;
|
|
299
|
+
_modifyDateValue(amount: number, unit: string, preserveDate?: boolean): void;
|
|
299
300
|
_updateValueAndFireEvents(value: string, normalizeValue: boolean, events: Array<string>, updateValue?: boolean): void;
|
|
300
301
|
_updateValueState(): void;
|
|
301
302
|
_toggleAndFocusInput(): void;
|
package/dist/DatePicker.js
CHANGED
|
@@ -243,13 +243,14 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
|
|
|
243
243
|
*
|
|
244
244
|
* @param { number } amount
|
|
245
245
|
* @param { string } unit
|
|
246
|
+
* @param { boolean } preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)
|
|
246
247
|
* @protected
|
|
247
248
|
*/
|
|
248
|
-
_modifyDateValue(amount, unit) {
|
|
249
|
+
_modifyDateValue(amount, unit, preserveDate) {
|
|
249
250
|
if (!this.dateValue) {
|
|
250
251
|
return;
|
|
251
252
|
}
|
|
252
|
-
const modifiedDate = modifyDateBy(CalendarDate.fromLocalJSDate(this.dateValue), amount, unit, this._minDate, this._maxDate);
|
|
253
|
+
const modifiedDate = modifyDateBy(CalendarDate.fromLocalJSDate(this.dateValue), amount, unit, preserveDate, this._minDate, this._maxDate);
|
|
253
254
|
const newValue = this.formatValue(modifiedDate.toUTCJSDate());
|
|
254
255
|
this._updateValueAndFireEvents(newValue, true, ["change", "value-changed"]);
|
|
255
256
|
}
|