@ui5/webcomponents 1.13.2 → 1.14.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/Avatar.d.ts +3 -3
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.d.ts +2 -3
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +2 -2
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BusyIndicator.d.ts +1 -1
- package/dist/BusyIndicator.js.map +1 -1
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.d.ts +1 -1
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarHeader.d.ts +2 -2
- package/dist/CalendarHeader.js.map +1 -1
- package/dist/Carousel.d.ts +2 -2
- package/dist/Carousel.js.map +1 -1
- package/dist/CheckBox.d.ts +2 -2
- package/dist/CheckBox.js.map +1 -1
- package/dist/ComboBox.d.ts +4 -4
- package/dist/ComboBox.js.map +1 -1
- package/dist/DateComponentBase.d.ts +3 -3
- package/dist/DateComponentBase.js.map +1 -1
- package/dist/DatePicker.d.ts +1 -1
- package/dist/DatePicker.js.map +1 -1
- package/dist/DayPicker.d.ts +1 -1
- package/dist/DayPicker.js.map +1 -1
- package/dist/Dialog.d.ts +1 -1
- package/dist/Dialog.js.map +1 -1
- package/dist/FileUploader.d.ts +1 -1
- package/dist/FileUploader.js.map +1 -1
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.js.map +1 -1
- package/dist/Input.d.ts +2 -2
- package/dist/Input.js.map +1 -1
- package/dist/Label.d.ts +1 -7
- package/dist/Label.js +0 -9
- package/dist/Label.js.map +1 -1
- package/dist/Link.d.ts +2 -2
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +3 -3
- package/dist/List.js.map +1 -1
- package/dist/ListItem.d.ts +4 -4
- package/dist/ListItem.js.map +1 -1
- package/dist/MessageStrip.d.ts +3 -3
- package/dist/MessageStrip.js +8 -8
- package/dist/MessageStrip.js.map +1 -1
- package/dist/MultiComboBox.d.ts +4 -4
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/Panel.d.ts +2 -2
- package/dist/Panel.js.map +1 -1
- package/dist/Popover.d.ts +8 -8
- package/dist/Popover.js +2 -2
- package/dist/Popover.js.map +1 -1
- package/dist/Popup.d.ts +1 -1
- package/dist/Popup.js.map +1 -1
- package/dist/ProgressIndicator.d.ts +1 -1
- package/dist/ProgressIndicator.js.map +1 -1
- package/dist/RadioButton.d.ts +2 -2
- package/dist/RadioButton.js.map +1 -1
- package/dist/SegmentedButtonItem.d.ts +1 -1
- package/dist/SegmentedButtonItem.js.map +1 -1
- package/dist/Select.d.ts +1 -1
- package/dist/Select.js.map +1 -1
- package/dist/SplitButton.d.ts +1 -1
- package/dist/SplitButton.js.map +1 -1
- package/dist/StandardListItem.d.ts +2 -2
- package/dist/StandardListItem.js.map +1 -1
- package/dist/StepInput.d.ts +2 -2
- package/dist/StepInput.js.map +1 -1
- package/dist/SuggestionItem.d.ts +2 -2
- package/dist/SuggestionItem.js.map +1 -1
- package/dist/Switch.d.ts +1 -1
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.d.ts +1 -1
- package/dist/Tab.js.map +1 -1
- package/dist/TabContainer.d.ts +6 -6
- package/dist/TabContainer.js.map +1 -1
- package/dist/Table.d.ts +4 -4
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.d.ts +14 -0
- package/dist/TableCell.js +19 -2
- package/dist/TableCell.js.map +1 -1
- package/dist/TableColumn.d.ts +1 -1
- package/dist/TableColumn.js.map +1 -1
- package/dist/TableGroupRow.d.ts +1 -1
- package/dist/TableGroupRow.js.map +1 -1
- package/dist/TableRow.d.ts +2 -2
- package/dist/TableRow.js +1 -1
- package/dist/TableRow.js.map +1 -1
- package/dist/TextArea.d.ts +1 -1
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePickerBase.d.ts +1 -1
- package/dist/TimePickerBase.js.map +1 -1
- package/dist/Title.d.ts +2 -2
- package/dist/Title.js.map +1 -1
- package/dist/Toast.d.ts +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Tokenizer.d.ts +1 -1
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Tree.d.ts +1 -1
- package/dist/Tree.js.map +1 -1
- package/dist/TreeItem.d.ts +1 -1
- package/dist/TreeItem.js.map +1 -1
- package/dist/TreeItemBase.d.ts +3 -3
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/api.json +1 -1
- package/dist/assets/IgnoreCustomElements.2238457d.css +1 -0
- package/dist/assets/Label.95b96777.css +1 -0
- package/dist/assets/messagebundle_en_US_sappsd.aec484c1.js +1 -0
- package/dist/assets/{messagebundle_en_US_saprigi.8f67a54b.js → messagebundle_en_US_saprigi.f321a5ab.js} +1 -1
- package/dist/assets/messagebundle_en_US_saptrc.94f1e535.js +1 -0
- package/dist/assets/{parameters-bundle.css.64a1fcb3.js → parameters-bundle.css.026dc74e.js} +1 -1
- package/dist/assets/{parameters-bundle.css.2480d334.js → parameters-bundle.css.0c41d58c.js} +1 -1
- package/dist/assets/{parameters-bundle.css.b06aacf3.js → parameters-bundle.css.14a79875.js} +1 -1
- package/dist/assets/{parameters-bundle.css.4cf7b367.js → parameters-bundle.css.23269e5b.js} +1 -1
- package/dist/assets/{parameters-bundle.css.0910d303.js → parameters-bundle.css.51692b82.js} +1 -1
- package/dist/assets/{parameters-bundle.css.e59780e1.js → parameters-bundle.css.5ab8f243.js} +1 -1
- package/dist/assets/{parameters-bundle.css.0c80e05a.js → parameters-bundle.css.64406af3.js} +1 -1
- package/dist/assets/{parameters-bundle.css.a0b1bee1.js → parameters-bundle.css.7c9daf4d.js} +1 -1
- package/dist/assets/{parameters-bundle.css.691f8760.js → parameters-bundle.css.8289b958.js} +1 -1
- package/dist/assets/{parameters-bundle.css.8a87377e.js → parameters-bundle.css.ba16125d.js} +1 -1
- package/dist/assets/{parameters-bundle.css.b8d253d9.js → parameters-bundle.css.db425c28.js} +1 -1
- package/dist/assets/{parameters-bundle.css.731f329b.js → parameters-bundle.css.eef2edf1.js} +1 -1
- package/dist/assets/test/pages/{ComboBox.html.7a8266c1.js → ComboBox.html.95e153b8.js} +1 -1
- package/dist/assets/test/pages/{Icon.html.ae37223a.js → Icon.html.251f84e4.js} +1 -1
- package/dist/assets/test/pages/{Label.html.227cb1b0.js → Label.html.df067063.js} +1 -1
- package/dist/assets/test/pages/{Popups.html.0c15c9f3.js → Popups.html.67ffb6cc.js} +1 -1
- package/dist/css/themes/Label.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/sap_belize/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_belize_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_belize_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_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/InputSuggestions.d.ts +2 -2
- package/dist/features/InputSuggestions.js.map +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/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 +2 -1
- package/dist/generated/i18n/i18n-defaults.js +2 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/templates/LabelTemplate.lit.js +2 -2
- package/dist/generated/templates/LabelTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Label.css.js +1 -1
- package/dist/generated/themes/Label.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/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 +3 -0
- package/dist/i18n/messagebundle_en_US_sappsd.properties +2 -0
- package/dist/i18n/messagebundle_en_US_saprigi.properties +2 -0
- package/dist/i18n/messagebundle_en_US_saptrc.properties +2 -0
- 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 +1 -1
- package/dist/test/pages/Calendar.html +1 -1
- package/dist/test/pages/Card.html +1 -1
- 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/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 +45 -42
- 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 +1 -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 +3 -3
- 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/TimeSelection.html +1 -1
- 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/Tree.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 +26 -0
- 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/package.json +7 -7
- package/src/Label.hbs +4 -6
- package/src/i18n/messagebundle.properties +3 -0
- package/src/i18n/messagebundle_en_US_sappsd.properties +2 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +2 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +2 -0
- package/src/themes/Label.css +11 -28
- package/src/themes/TextArea.css +16 -7
- package/src/themes/base/TextArea-parameters.css +0 -1
- package/src/themes/sap_horizon/TextArea-parameters.css +0 -5
- package/src/themes/sap_horizon_dark/TextArea-parameters.css +0 -5
- package/dist/assets/Label.b48eb771.css +0 -1
- package/dist/assets/messagebundle_en_US_sappsd.4b5e22df.js +0 -1
- package/dist/assets/messagebundle_en_US_saptrc.1c1645fc.js +0 -1
package/dist/Button.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ declare class Button extends UI5Element implements IFormElement {
|
|
|
69
69
|
* @defaultvalue "Default"
|
|
70
70
|
* @public
|
|
71
71
|
*/
|
|
72
|
-
design: ButtonDesign
|
|
72
|
+
design: `${ButtonDesign}`;
|
|
73
73
|
/**
|
|
74
74
|
* Defines whether the component is disabled.
|
|
75
75
|
* A disabled component can't be pressed or
|
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,SAA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ACT;AAOnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACV;AAOlB;IADC,QAAQ,CAAC,EAAE,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\nBut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ADC,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"]}
|
package/dist/Calendar.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ declare class Calendar extends CalendarPart {
|
|
|
148
148
|
* @defaultvalue "Single"
|
|
149
149
|
* @public
|
|
150
150
|
*/
|
|
151
|
-
selectionMode: CalendarSelectionMode
|
|
151
|
+
selectionMode: `${CalendarSelectionMode}`;
|
|
152
152
|
/**
|
|
153
153
|
* Defines the visibility of the week numbers column.
|
|
154
154
|
* <br><br>
|
package/dist/Calendar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../src/Calendar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,4BAA4B,MAAM,4EAA4E,CAAC;AACtH,OAAO,+BAA+B,MAAM,+EAA+E,CAAC;AAC5H,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EACN,IAAI,EACJ,SAAS,GACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAC9G,OAAO,SAAS,MAAM,kDAAkD,CAAC;AACzE,OAAO,UAAU,MAAM,oDAAoD,CAAC;AAC5E,OAAO,KAAK,qBAAqB,MAAM,mBAAmB,CAAC;AAE3D,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,OAAO,qBAAqB,MAAM,kCAAkC,CAAC;AACrE,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AAEjE,gCAAgC;AAChC,OAAO,qEAAqE,CAAC;AAE7E,WAAW;AACX,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAE7E,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAkB7D;;;;;;;;;;;;;;;;;;;;;;;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AuB,EAAE;QAC/B,MAAM,EAAE;YACP,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;YACtB,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;SACvB;KACD,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC;IACzB,KAAK,CAAC,iBAAiB,CAAC;GACnB,QAAQ,CAwTb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport transformDateToSecondaryType from \"@ui5/webcomponents-localization/dist/dates/transformDateToSecondaryType.js\";\nimport convertMonthNumbersToMonthNames from \"@ui5/webcomponents-localization/dist/dates/convertMonthNumbersToMonthNames.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisF4,\n\tisF4Shift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport * as CalendarDateComponent from \"./CalendarDate.js\";\nimport type CalendarDateComponentT from \"./CalendarDate.js\";\nimport CalendarPart from \"./CalendarPart.js\";\nimport CalendarHeader from \"./CalendarHeader.js\";\nimport DayPicker from \"./DayPicker.js\";\nimport type { DayPickerChangeEventDetail } from \"./DayPicker.js\";\nimport MonthPicker from \"./MonthPicker.js\";\nimport type { MonthPickerChangeEventDetail } from \"./MonthPicker.js\";\nimport YearPicker from \"./YearPicker.js\";\nimport type { YearPickerChangeEventDetail } from \"./YearPicker.js\";\nimport CalendarSelectionMode from \"./types/CalendarSelectionMode.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\n\n// Default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Template\nimport CalendarTemplate from \"./generated/templates/CalendarTemplate.lit.js\";\n\n// Styles\nimport calendarCSS from \"./generated/themes/Calendar.css.js\";\n\ninterface ICalendarPicker {\n\t_showPreviousPage: () => void,\n\t_showNextPage: () => void,\n\t_hasPreviousPage: () => boolean,\n\t_hasNextPage: () => boolean,\n\t_autoFocus?: boolean,\n\t_firstYear?: number,\n\t_lastYear?: number,\n}\n\ntype CalendarChangeEventDetail = {\n\tvalues: Array<string>,\n\tdates: Array<number>,\n\ttimestamp: number | undefined,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-calendar</code> component allows users to select one or more dates.\n * <br><br>\n * Currently selected dates are represented with instances of <code>ui5-date</code> as\n * children of the <code>ui5-calendar</code>. The value property of each <code>ui5-date</code> must be a\n * date string, correctly formatted according to the <code>ui5-calendar</code>'s <code>formatPattern</code> property.\n * Whenever the user changes the date selection, <code>ui5-calendar</code> will automatically create/remove instances\n * of <code>ui5-date</code> in itself, unless you prevent this behavior by calling <code>preventDefault()</code> for the\n * <code>selected-dates-change</code> event. This is useful if you want to control the selected dates externally.\n * <br><br>\n *\n * <h3>Usage</h3>\n *\n * The user can navigate to a particular date by:\n * <br>\n * <ul>\n * <li>Pressing over a month inside the months view</li>\n * <li>Pressing over an year inside the years view</li>\n * </ul>\n * <br>\n * The user can confirm a date selection by pressing over a date inside the days view.\n * <br><br>\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-calendar</code> provides advanced keyboard handling.\n * When a picker is showed and focused the user can use the following keyboard\n * shortcuts in order to perform a navigation:\n * <br>\n * - Day picker: <br>\n * <ul>\n * <li>[F4] - Shows month picker</li>\n * <li>[SHIFT] + [F4] - Shows year picker</li>\n * <li>[PAGEUP] - Navigate to the previous month</li>\n * <li>[PAGEDOWN] - Navigate to the next month</li>\n * <li>[SHIFT] + [PAGEUP] - Navigate to the previous year</li>\n * <li>[SHIFT] + [PAGEDOWN] - Navigate to the next year</li>\n * <li>[CTRL] + [SHIFT] + [PAGEUP] - Navigate ten years backwards</li>\n * <li>[CTRL] + [SHIFT] + [PAGEDOWN] - Navigate ten years forwards</li>\n * <li>[HOME] - Navigate to the first day of the week</li>\n * <li>[END] - Navigate to the last day of the week</li>\n * <li>[CTRL] + [HOME] - Navigate to the first day of the month</li>\n * <li>[CTRL] + [END] - Navigate to the last day of the month</li>\n * </ul>\n * <br>\n * - Month picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year</li>\n * <li>[PAGEDOWN] - Navigate to the next year</li>\n * <li>[HOME] - Navigate to the first month of the current row</li>\n * <li>[END] - Navigate to the last month of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first month of the current year</li>\n * <li>[CTRL] + [END] - Navigate to the last month of the year</li>\n * </ul>\n * <br>\n * - Year picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year range</li>\n * <li>[PAGEDOWN] - Navigate the next year range</li>\n * <li>[HOME] - Navigate to the first year of the current row</li>\n * <li>[END] - Navigate to the last year of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first year of the current year range</li>\n * <li>[CTRL] + [END] - Navigate to the last year of the current year range</li>\n * </ul>\n * <br>\n *\n * <h4>Fast Navigation</h4>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\n *\n* <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <code>\n * <script data-id=\"sap-ui-config\" type=\"application/json\">\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * </script>\n * </code>\n *\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Calendar\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Calendar\n * @extends sap.ui.webc.main.CalendarPart\n * @tagname ui5-calendar\n * @appenddocs sap.ui.webc.main.CalendarDate\n * @public\n * @since 1.0.0-rc.11\n */\n@customElement({\n\ttag: \"ui5-calendar\",\n\tfastNavigation: true,\n\ttemplate: CalendarTemplate,\n\tstyles: calendarCSS,\n\tdependencies: [\n\t\tCalendarDateComponent.default,\n\t\tCalendarHeader,\n\t\tDayPicker,\n\t\tMonthPicker,\n\t\tYearPicker,\n\t],\n})\n/**\n * Fired when the selected dates change.\n * <b>Note:</b> If you call <code>preventDefault()</code> for this event, the component will not\n * create instances of <code>ui5-date</code> for the newly selected dates. In that case you should do this manually.\n *\n * @event sap.ui.webc.main.Calendar#selected-dates-change\n * @allowPreventDefault\n * @param {Array} values The selected dates\n * @param {Array} dates The selected dates as UTC timestamps\n * @public\n */\n@event(\"selected-dates-change\", {\n\tdetail: {\n\t\tdates: { type: Array },\n\t\tvalues: { type: Array },\n\t},\n})\n\n@event(\"show-month-press\")\n@event(\"show-year-press\")\nclass Calendar extends CalendarPart {\n\t/**\n\t * Defines the type of selection used in the calendar component.\n\t * Accepted property values are:<br>\n\t * <ul>\n\t * <li><code>CalendarSelectionMode.Single</code> - enables a single date selection.(default value)</li>\n\t * <li><code>CalendarSelectionMode.Range</code> - enables selection of a date range.</li>\n\t * <li><code>CalendarSelectionMode.Multiple</code> - enables selection of multiple dates.</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CalendarSelectionMode}\n\t * @name sap.ui.webc.main.Calendar.prototype.selectionMode\n\t * @defaultvalue \"Single\"\n\t * @public\n\t */\n\t@property({\n\t\ttype: CalendarSelectionMode,\n\t\tdefaultValue: CalendarSelectionMode.Single,\n\t})\n\tselectionMode!: CalendarSelectionMode;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Calendar.prototype.hideWeekNumbers\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Which picker is currently visible to the user: day/month/year\n\t */\n\t@property({ defaultValue: \"day\" })\n\t_currentPicker!: string;\n\n\t@property({ type: Boolean })\n\t_previousButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\t_nextButtonDisabled!: boolean;\n\n\t@property()\n\t_headerMonthButtonText!: string;\n\n\t@property()\n\t_headerYearButtonText!: string;\n\n\t@property()\n\t_headerYearButtonTextSecType!: string;\n\n\t@property({ type: CalendarPickersMode, defaultValue: CalendarPickersMode.DAY_MONTH_YEAR, noAttribute: true })\n\t_pickersMode!: CalendarPickersMode;\n\n\t/**\n\t * Defines the selected date or dates (depending on the <code>selectionMode</code> property)\n\t * for this calendar as instances of <code>ui5-date</code>.\n\t *\n\t * @type {sap.ui.webc.main.ICalendarDate[]}\n\t * @name sap.ui.webc.main.Calendar.prototype.default\n\t * @slot dates\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\tdates!: Array<CalendarDateComponentT>;\n\n\t/**\n\t * @private\n\t */\n\tget _selectedDatesTimestamps(): Array<number> {\n\t\treturn this.dates.map(date => {\n\t\t\tconst value = date.value;\n\t\t\tconst validValue = value && !!this.getFormat().parse(value);\n\t\t\treturn validValue ? this._getTimeStampFromString(value)! / 1000 : undefined;\n\t\t}).filter((date): date is number => !!date);\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_setSelectedDates(selectedDates: Array<number>) {\n\t\tconst selectedValues = selectedDates.map(timestamp => this.getFormat().format(new Date(timestamp * 1000), true)); // Format as UTC\n\t\tconst valuesInDOM = [...this.dates].map(dateElement => dateElement.value);\n\n\t\t// Remove all elements for dates that are no longer selected\n\t\tthis.dates.filter(dateElement => !selectedValues.includes(dateElement.value)).forEach(dateElement => {\n\t\t\tthis.removeChild(dateElement);\n\t\t});\n\n\t\t// Create tags for the selected dates that don't already exist in DOM\n\t\tselectedValues.filter(value => !valuesInDOM.includes(value)).forEach(value => {\n\t\t\tconst dateElement = document.createElement(CalendarDateComponent.default.getMetadata().getTag()) as CalendarDateComponentT;\n\t\t\tdateElement.value = value;\n\t\t\tthis.appendChild(dateElement);\n\t\t});\n\t}\n\n\t/**\n\t * Makes sure that _currentPicker is always set to a value, allowed by _pickersMode\n\t */\n\t_normalizeCurrentPicker() {\n\t\tif (this._currentPicker === \"day\" && this._pickersMode !== CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (this._currentPicker === \"month\" && this._pickersMode === CalendarPickersMode.YEAR) {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._normalizeCurrentPicker();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished(); // Await for the current picker to render and then ask if it has previous/next pages\n\t\tthis._previousButtonDisabled = !this._currentPickerDOM._hasPreviousPage();\n\t\tthis._nextButtonDisabled = !this._currentPickerDOM._hasNextPage();\n\n\t\tconst yearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.primaryCalendarType });\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\tthis._headerMonthButtonText = localeData.getMonthsStandAlone(\"wide\", this.primaryCalendarType)[this._calendarDate.getMonth()];\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tthis._headerYearButtonText = `${yearFormat.format(rangeStart.toLocalJSDate(), true)} - ${yearFormat.format(rangeEnd.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonText = String(yearFormat.format(this._localDate, true));\n\t\t}\n\n\t\tthis.secondaryCalendarType && this._setSecondaryCalendarTypeButtonText();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"month\";\n\t\tthis.fireEvent(\"show-month-press\", e);\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"year\";\n\t\tthis.fireEvent(\"show-year-press\", e);\n\t}\n\n\tget _currentPickerDOM() {\n\t\t// Calendar's shadowRoot and all the pickers are always present - the \"!\" is safe to be used.\n\t\treturn this.shadowRoot!.querySelector(`[ui5-${this._currentPicker}picker]`)! as unknown as ICalendarPicker;\n\t}\n\n\t/**\n\t * The year clicked the \"Previous\" button in the header\n\t */\n\tonHeaderPreviousPress() {\n\t\tthis._currentPickerDOM._showPreviousPage();\n\t}\n\n\t/**\n\t * The year clicked the \"Next\" button in the header\n\t */\n\tonHeaderNextPress() {\n\t\tthis._currentPickerDOM._showNextPage();\n\t}\n\n\t_setSecondaryCalendarTypeButtonText() {\n\t\tconst yearFormatSecType = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tconst rangeStartSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeStart.valueOf() / 1000, true)\n\t\t\t\t.firstDate;\n\t\t\tconst rangeEndSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeEnd.valueOf() / 1000, true)\n\t\t\t\t.lastDate;\n\t\t\tthis._headerYearButtonTextSecType = `${yearFormatSecType.format(rangeStartSecType.toLocalJSDate(), true)} - ${yearFormatSecType.format(rangeEndSecType.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonTextSecType = String(yearFormatSecType.format(this._localDate, true));\n\t\t}\n\t}\n\n\tget secondaryCalendarTypeButtonText() {\n\t\tif (!this.secondaryCalendarType) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst localDate = new Date(this._timestamp * 1000);\n\t\tconst secondYearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\t\tconst dateInSecType = transformDateToSecondaryType(this._primaryCalendarType, this.secondaryCalendarType, this._timestamp);\n\t\tconst secondMonthInfo = convertMonthNumbersToMonthNames(dateInSecType.firstDate.getMonth(), dateInSecType.lastDate.getMonth(), this.secondaryCalendarType);\n\t\tconst secondYearText = secondYearFormat.format(localDate, true);\n\n\t\treturn {\n\t\t\tyearButtonText: secondYearText,\n\t\t\tmonthButtonText: secondMonthInfo.text,\n\t\t\tmonthButtonInfo: secondMonthInfo.textInfo,\n\t\t};\n\t}\n\n\t/**\n\t * The month button is hidden when the month picker or year picker is shown\n\t * @returns {boolean}\n\t * @private\n\t */\n\tget _isHeaderMonthButtonHidden() {\n\t\treturn this._currentPicker === \"month\" || this._currentPicker === \"year\";\n\t}\n\n\tget _isDayPickerHidden() {\n\t\treturn this._currentPicker !== \"day\";\n\t}\n\n\tget _isMonthPickerHidden() {\n\t\treturn this._currentPicker !== \"month\";\n\t}\n\n\tget _isYearPickerHidden() {\n\t\treturn this._currentPicker !== \"year\";\n\t}\n\n\t_fireEventAndUpdateSelectedDates(selectedDates: Array<number>) {\n\t\tconst datesValues = selectedDates.map(timestamp => {\n\t\t\tconst calendarDate = CalendarDate.fromTimestamp(timestamp * 1000, this._primaryCalendarType);\n\t\t\treturn this.getFormat().format(calendarDate.toUTCJSDate(), true);\n\t\t});\n\n\t\tconst defaultPrevented = !this.fireEvent<CalendarChangeEventDetail>(\"selected-dates-change\", { timestamp: this.timestamp, dates: [...selectedDates], values: datesValues }, true);\n\t\tif (!defaultPrevented) {\n\t\t\tthis._setSelectedDates(selectedDates);\n\t\t}\n\t}\n\n\tonSelectedDatesChange(e: CustomEvent<DayPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t\tthis._fireEventAndUpdateSelectedDates(e.detail.dates);\n\t}\n\n\tonSelectedMonthChange(e: CustomEvent<MonthPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonSelectedYearChange(e: CustomEvent<YearPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else if (this._pickersMode === CalendarPickersMode.MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonNavigate(e: CustomEvent) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isF4(e) && this._currentPicker !== \"month\") {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (isF4Shift(e) && this._currentPicker !== \"year\") {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array of UTC timestamps, representing the selected dates.\n\t * @protected\n\t * @deprecated\n\t */\n\tget selectedDates(): Array<number> {\n\t\treturn this._selectedDatesTimestamps;\n\t}\n\n\t/**\n\t * Creates instances of <code>ui5-date</code> inside this <code>ui5-calendar</code> with values, equal to the provided UTC timestamps\n\t * @protected\n\t * @deprecated\n\t * @param { Array<number> } selectedDates Array of UTC timestamps\n\t */\n\tset selectedDates(selectedDates: Array<number>) {\n\t\tthis._setSelectedDates(selectedDates);\n\t}\n}\n\nCalendar.define();\n\nexport default Calendar;\nexport type {\n\tICalendarPicker,\n\tCalendarChangeEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../src/Calendar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,4BAA4B,MAAM,4EAA4E,CAAC;AACtH,OAAO,+BAA+B,MAAM,+EAA+E,CAAC;AAC5H,OAAO,YAAY,MAAM,4DAA4D,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AAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDACM;AAGlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACE;AAG9B;IADC,QAAQ,EAAE;wDACqB;AAGhC;IADC,QAAQ,EAAE;uDACoB;AAG/B;IADC,QAAQ,EAAE;8DAC2B;AAGtC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,YAAY,EAAE,mBAAmB,CAAC,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;8CAC1E;AAYnC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;uCACtC;AArEjC,QAAQ;IAjCb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,WAAW;QACnB,YAAY,EAAE;YACb,qBAAqB,CAAC,OAAO;YAC7B,cAAc;YACd,SAAS;YACT,WAAW;YACX,UAAU;SACV;KACD,CAAC;IACF;;;;;;;;;;OAUG;;IACF,KAAK,CAAC,uBAAuB,EAAE;QAC/B,MAAM,EAAE;YACP,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;YACtB,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;SACvB;KACD,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC;IACzB,KAAK,CAAC,iBAAiB,CAAC;GACnB,QAAQ,CAwTb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport transformDateToSecondaryType from \"@ui5/webcomponents-localization/dist/dates/transformDateToSecondaryType.js\";\nimport convertMonthNumbersToMonthNames from \"@ui5/webcomponents-localization/dist/dates/convertMonthNumbersToMonthNames.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisF4,\n\tisF4Shift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport * as CalendarDateComponent from \"./CalendarDate.js\";\nimport type CalendarDateComponentT from \"./CalendarDate.js\";\nimport CalendarPart from \"./CalendarPart.js\";\nimport CalendarHeader from \"./CalendarHeader.js\";\nimport DayPicker from \"./DayPicker.js\";\nimport type { DayPickerChangeEventDetail } from \"./DayPicker.js\";\nimport MonthPicker from \"./MonthPicker.js\";\nimport type { MonthPickerChangeEventDetail } from \"./MonthPicker.js\";\nimport YearPicker from \"./YearPicker.js\";\nimport type { YearPickerChangeEventDetail } from \"./YearPicker.js\";\nimport CalendarSelectionMode from \"./types/CalendarSelectionMode.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\n\n// Default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Template\nimport CalendarTemplate from \"./generated/templates/CalendarTemplate.lit.js\";\n\n// Styles\nimport calendarCSS from \"./generated/themes/Calendar.css.js\";\n\ninterface ICalendarPicker {\n\t_showPreviousPage: () => void,\n\t_showNextPage: () => void,\n\t_hasPreviousPage: () => boolean,\n\t_hasNextPage: () => boolean,\n\t_autoFocus?: boolean,\n\t_firstYear?: number,\n\t_lastYear?: number,\n}\n\ntype CalendarChangeEventDetail = {\n\tvalues: Array<string>,\n\tdates: Array<number>,\n\ttimestamp: number | undefined,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-calendar</code> component allows users to select one or more dates.\n * <br><br>\n * Currently selected dates are represented with instances of <code>ui5-date</code> as\n * children of the <code>ui5-calendar</code>. The value property of each <code>ui5-date</code> must be a\n * date string, correctly formatted according to the <code>ui5-calendar</code>'s <code>formatPattern</code> property.\n * Whenever the user changes the date selection, <code>ui5-calendar</code> will automatically create/remove instances\n * of <code>ui5-date</code> in itself, unless you prevent this behavior by calling <code>preventDefault()</code> for the\n * <code>selected-dates-change</code> event. This is useful if you want to control the selected dates externally.\n * <br><br>\n *\n * <h3>Usage</h3>\n *\n * The user can navigate to a particular date by:\n * <br>\n * <ul>\n * <li>Pressing over a month inside the months view</li>\n * <li>Pressing over an year inside the years view</li>\n * </ul>\n * <br>\n * The user can confirm a date selection by pressing over a date inside the days view.\n * <br><br>\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-calendar</code> provides advanced keyboard handling.\n * When a picker is showed and focused the user can use the following keyboard\n * shortcuts in order to perform a navigation:\n * <br>\n * - Day picker: <br>\n * <ul>\n * <li>[F4] - Shows month picker</li>\n * <li>[SHIFT] + [F4] - Shows year picker</li>\n * <li>[PAGEUP] - Navigate to the previous month</li>\n * <li>[PAGEDOWN] - Navigate to the next month</li>\n * <li>[SHIFT] + [PAGEUP] - Navigate to the previous year</li>\n * <li>[SHIFT] + [PAGEDOWN] - Navigate to the next year</li>\n * <li>[CTRL] + [SHIFT] + [PAGEUP] - Navigate ten years backwards</li>\n * <li>[CTRL] + [SHIFT] + [PAGEDOWN] - Navigate ten years forwards</li>\n * <li>[HOME] - Navigate to the first day of the week</li>\n * <li>[END] - Navigate to the last day of the week</li>\n * <li>[CTRL] + [HOME] - Navigate to the first day of the month</li>\n * <li>[CTRL] + [END] - Navigate to the last day of the month</li>\n * </ul>\n * <br>\n * - Month picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year</li>\n * <li>[PAGEDOWN] - Navigate to the next year</li>\n * <li>[HOME] - Navigate to the first month of the current row</li>\n * <li>[END] - Navigate to the last month of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first month of the current year</li>\n * <li>[CTRL] + [END] - Navigate to the last month of the year</li>\n * </ul>\n * <br>\n * - Year picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year range</li>\n * <li>[PAGEDOWN] - Navigate the next year range</li>\n * <li>[HOME] - Navigate to the first year of the current row</li>\n * <li>[END] - Navigate to the last year of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first year of the current year range</li>\n * <li>[CTRL] + [END] - Navigate to the last year of the current year range</li>\n * </ul>\n * <br>\n *\n * <h4>Fast Navigation</h4>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\n *\n* <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <code>\n * <script data-id=\"sap-ui-config\" type=\"application/json\">\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * </script>\n * </code>\n *\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Calendar\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Calendar\n * @extends sap.ui.webc.main.CalendarPart\n * @tagname ui5-calendar\n * @appenddocs sap.ui.webc.main.CalendarDate\n * @public\n * @since 1.0.0-rc.11\n */\n@customElement({\n\ttag: \"ui5-calendar\",\n\tfastNavigation: true,\n\ttemplate: CalendarTemplate,\n\tstyles: calendarCSS,\n\tdependencies: [\n\t\tCalendarDateComponent.default,\n\t\tCalendarHeader,\n\t\tDayPicker,\n\t\tMonthPicker,\n\t\tYearPicker,\n\t],\n})\n/**\n * Fired when the selected dates change.\n * <b>Note:</b> If you call <code>preventDefault()</code> for this event, the component will not\n * create instances of <code>ui5-date</code> for the newly selected dates. In that case you should do this manually.\n *\n * @event sap.ui.webc.main.Calendar#selected-dates-change\n * @allowPreventDefault\n * @param {Array} values The selected dates\n * @param {Array} dates The selected dates as UTC timestamps\n * @public\n */\n@event(\"selected-dates-change\", {\n\tdetail: {\n\t\tdates: { type: Array },\n\t\tvalues: { type: Array },\n\t},\n})\n\n@event(\"show-month-press\")\n@event(\"show-year-press\")\nclass Calendar extends CalendarPart {\n\t/**\n\t * Defines the type of selection used in the calendar component.\n\t * Accepted property values are:<br>\n\t * <ul>\n\t * <li><code>CalendarSelectionMode.Single</code> - enables a single date selection.(default value)</li>\n\t * <li><code>CalendarSelectionMode.Range</code> - enables selection of a date range.</li>\n\t * <li><code>CalendarSelectionMode.Multiple</code> - enables selection of multiple dates.</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CalendarSelectionMode}\n\t * @name sap.ui.webc.main.Calendar.prototype.selectionMode\n\t * @defaultvalue \"Single\"\n\t * @public\n\t */\n\t@property({\n\t\ttype: CalendarSelectionMode,\n\t\tdefaultValue: CalendarSelectionMode.Single,\n\t})\n\tselectionMode!: `${CalendarSelectionMode}`;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Calendar.prototype.hideWeekNumbers\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Which picker is currently visible to the user: day/month/year\n\t */\n\t@property({ defaultValue: \"day\" })\n\t_currentPicker!: string;\n\n\t@property({ type: Boolean })\n\t_previousButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\t_nextButtonDisabled!: boolean;\n\n\t@property()\n\t_headerMonthButtonText!: string;\n\n\t@property()\n\t_headerYearButtonText!: string;\n\n\t@property()\n\t_headerYearButtonTextSecType!: string;\n\n\t@property({ type: CalendarPickersMode, defaultValue: CalendarPickersMode.DAY_MONTH_YEAR, noAttribute: true })\n\t_pickersMode!: CalendarPickersMode;\n\n\t/**\n\t * Defines the selected date or dates (depending on the <code>selectionMode</code> property)\n\t * for this calendar as instances of <code>ui5-date</code>.\n\t *\n\t * @type {sap.ui.webc.main.ICalendarDate[]}\n\t * @name sap.ui.webc.main.Calendar.prototype.default\n\t * @slot dates\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\tdates!: Array<CalendarDateComponentT>;\n\n\t/**\n\t * @private\n\t */\n\tget _selectedDatesTimestamps(): Array<number> {\n\t\treturn this.dates.map(date => {\n\t\t\tconst value = date.value;\n\t\t\tconst validValue = value && !!this.getFormat().parse(value);\n\t\t\treturn validValue ? this._getTimeStampFromString(value)! / 1000 : undefined;\n\t\t}).filter((date): date is number => !!date);\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_setSelectedDates(selectedDates: Array<number>) {\n\t\tconst selectedValues = selectedDates.map(timestamp => this.getFormat().format(new Date(timestamp * 1000), true)); // Format as UTC\n\t\tconst valuesInDOM = [...this.dates].map(dateElement => dateElement.value);\n\n\t\t// Remove all elements for dates that are no longer selected\n\t\tthis.dates.filter(dateElement => !selectedValues.includes(dateElement.value)).forEach(dateElement => {\n\t\t\tthis.removeChild(dateElement);\n\t\t});\n\n\t\t// Create tags for the selected dates that don't already exist in DOM\n\t\tselectedValues.filter(value => !valuesInDOM.includes(value)).forEach(value => {\n\t\t\tconst dateElement = document.createElement(CalendarDateComponent.default.getMetadata().getTag()) as CalendarDateComponentT;\n\t\t\tdateElement.value = value;\n\t\t\tthis.appendChild(dateElement);\n\t\t});\n\t}\n\n\t/**\n\t * Makes sure that _currentPicker is always set to a value, allowed by _pickersMode\n\t */\n\t_normalizeCurrentPicker() {\n\t\tif (this._currentPicker === \"day\" && this._pickersMode !== CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (this._currentPicker === \"month\" && this._pickersMode === CalendarPickersMode.YEAR) {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._normalizeCurrentPicker();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished(); // Await for the current picker to render and then ask if it has previous/next pages\n\t\tthis._previousButtonDisabled = !this._currentPickerDOM._hasPreviousPage();\n\t\tthis._nextButtonDisabled = !this._currentPickerDOM._hasNextPage();\n\n\t\tconst yearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.primaryCalendarType });\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\tthis._headerMonthButtonText = localeData.getMonthsStandAlone(\"wide\", this.primaryCalendarType)[this._calendarDate.getMonth()];\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tthis._headerYearButtonText = `${yearFormat.format(rangeStart.toLocalJSDate(), true)} - ${yearFormat.format(rangeEnd.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonText = String(yearFormat.format(this._localDate, true));\n\t\t}\n\n\t\tthis.secondaryCalendarType && this._setSecondaryCalendarTypeButtonText();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"month\";\n\t\tthis.fireEvent(\"show-month-press\", e);\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"year\";\n\t\tthis.fireEvent(\"show-year-press\", e);\n\t}\n\n\tget _currentPickerDOM() {\n\t\t// Calendar's shadowRoot and all the pickers are always present - the \"!\" is safe to be used.\n\t\treturn this.shadowRoot!.querySelector(`[ui5-${this._currentPicker}picker]`)! as unknown as ICalendarPicker;\n\t}\n\n\t/**\n\t * The year clicked the \"Previous\" button in the header\n\t */\n\tonHeaderPreviousPress() {\n\t\tthis._currentPickerDOM._showPreviousPage();\n\t}\n\n\t/**\n\t * The year clicked the \"Next\" button in the header\n\t */\n\tonHeaderNextPress() {\n\t\tthis._currentPickerDOM._showNextPage();\n\t}\n\n\t_setSecondaryCalendarTypeButtonText() {\n\t\tconst yearFormatSecType = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tconst rangeStartSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeStart.valueOf() / 1000, true)\n\t\t\t\t.firstDate;\n\t\t\tconst rangeEndSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeEnd.valueOf() / 1000, true)\n\t\t\t\t.lastDate;\n\t\t\tthis._headerYearButtonTextSecType = `${yearFormatSecType.format(rangeStartSecType.toLocalJSDate(), true)} - ${yearFormatSecType.format(rangeEndSecType.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonTextSecType = String(yearFormatSecType.format(this._localDate, true));\n\t\t}\n\t}\n\n\tget secondaryCalendarTypeButtonText() {\n\t\tif (!this.secondaryCalendarType) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst localDate = new Date(this._timestamp * 1000);\n\t\tconst secondYearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\t\tconst dateInSecType = transformDateToSecondaryType(this._primaryCalendarType, this.secondaryCalendarType, this._timestamp);\n\t\tconst secondMonthInfo = convertMonthNumbersToMonthNames(dateInSecType.firstDate.getMonth(), dateInSecType.lastDate.getMonth(), this.secondaryCalendarType);\n\t\tconst secondYearText = secondYearFormat.format(localDate, true);\n\n\t\treturn {\n\t\t\tyearButtonText: secondYearText,\n\t\t\tmonthButtonText: secondMonthInfo.text,\n\t\t\tmonthButtonInfo: secondMonthInfo.textInfo,\n\t\t};\n\t}\n\n\t/**\n\t * The month button is hidden when the month picker or year picker is shown\n\t * @returns {boolean}\n\t * @private\n\t */\n\tget _isHeaderMonthButtonHidden() {\n\t\treturn this._currentPicker === \"month\" || this._currentPicker === \"year\";\n\t}\n\n\tget _isDayPickerHidden() {\n\t\treturn this._currentPicker !== \"day\";\n\t}\n\n\tget _isMonthPickerHidden() {\n\t\treturn this._currentPicker !== \"month\";\n\t}\n\n\tget _isYearPickerHidden() {\n\t\treturn this._currentPicker !== \"year\";\n\t}\n\n\t_fireEventAndUpdateSelectedDates(selectedDates: Array<number>) {\n\t\tconst datesValues = selectedDates.map(timestamp => {\n\t\t\tconst calendarDate = CalendarDate.fromTimestamp(timestamp * 1000, this._primaryCalendarType);\n\t\t\treturn this.getFormat().format(calendarDate.toUTCJSDate(), true);\n\t\t});\n\n\t\tconst defaultPrevented = !this.fireEvent<CalendarChangeEventDetail>(\"selected-dates-change\", { timestamp: this.timestamp, dates: [...selectedDates], values: datesValues }, true);\n\t\tif (!defaultPrevented) {\n\t\t\tthis._setSelectedDates(selectedDates);\n\t\t}\n\t}\n\n\tonSelectedDatesChange(e: CustomEvent<DayPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t\tthis._fireEventAndUpdateSelectedDates(e.detail.dates);\n\t}\n\n\tonSelectedMonthChange(e: CustomEvent<MonthPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonSelectedYearChange(e: CustomEvent<YearPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else if (this._pickersMode === CalendarPickersMode.MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonNavigate(e: CustomEvent) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isF4(e) && this._currentPicker !== \"month\") {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (isF4Shift(e) && this._currentPicker !== \"year\") {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array of UTC timestamps, representing the selected dates.\n\t * @protected\n\t * @deprecated\n\t */\n\tget selectedDates(): Array<number> {\n\t\treturn this._selectedDatesTimestamps;\n\t}\n\n\t/**\n\t * Creates instances of <code>ui5-date</code> inside this <code>ui5-calendar</code> with values, equal to the provided UTC timestamps\n\t * @protected\n\t * @deprecated\n\t * @param { Array<number> } selectedDates Array of UTC timestamps\n\t */\n\tset selectedDates(selectedDates: Array<number>) {\n\t\tthis._setSelectedDates(selectedDates);\n\t}\n}\n\nCalendar.define();\n\nexport default Calendar;\nexport type {\n\tICalendarPicker,\n\tCalendarChangeEventDetail,\n};\n"]}
|
package/dist/CalendarHeader.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare class CalendarHeader extends UI5Element {
|
|
|
24
24
|
* @name sap.ui.webc.main.CalendarHeader.prototype.primaryCalendarType
|
|
25
25
|
* @public
|
|
26
26
|
*/
|
|
27
|
-
primaryCalendarType?: CalendarType
|
|
27
|
+
primaryCalendarType?: `${CalendarType}`;
|
|
28
28
|
/**
|
|
29
29
|
* Defines component's secondary calendar type.
|
|
30
30
|
* <b>Note:</b> set by the Calendar component
|
|
@@ -34,7 +34,7 @@ declare class CalendarHeader extends UI5Element {
|
|
|
34
34
|
* @name sap.ui.webc.main.CalendarHeader.prototype.secondaryCalendarType
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
37
|
-
secondaryCalendarType?: CalendarType
|
|
37
|
+
secondaryCalendarType?: `${CalendarType}`;
|
|
38
38
|
/**
|
|
39
39
|
* Stores information for month button for secondary calendar type
|
|
40
40
|
* @type {object}
|
|
@@ -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,K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IADC,QAAQ,CAAC,EAAE,SAAS,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"]}
|
package/dist/Carousel.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ declare class Carousel extends UI5Element {
|
|
|
146
146
|
* @defaultvalue "Default"
|
|
147
147
|
* @public
|
|
148
148
|
*/
|
|
149
|
-
pageIndicatorStyle: CarouselPageIndicatorStyle
|
|
149
|
+
pageIndicatorStyle: `${CarouselPageIndicatorStyle}`;
|
|
150
150
|
/**
|
|
151
151
|
* Defines the index of the initially selected item.
|
|
152
152
|
* @type {sap.ui.webc.base.types.Integer}
|
|
@@ -172,7 +172,7 @@ declare class Carousel extends UI5Element {
|
|
|
172
172
|
* @defaultvalue "Content"
|
|
173
173
|
* @public
|
|
174
174
|
*/
|
|
175
|
-
arrowsPlacement: CarouselArrowsPlacement
|
|
175
|
+
arrowsPlacement: `${CarouselArrowsPlacement}`;
|
|
176
176
|
/**
|
|
177
177
|
* Defines the carousel width in pixels.
|
|
178
178
|
* @private
|
package/dist/Carousel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../src/Carousel.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,OAAO,MAAM,+CAA+C,CAAC;AACpE,OAAO,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,IAAI,EACJ,IAAI,GACJ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,g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QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;QAC1B,YAAY,EAAE;YACb,MAAM;YACN,KAAK;SACL;KACD,CAAC;IACF;;;;;;;;;OASG;;IACF,KAAK,CAAC,UAAU,EAAE;QAClB,MAAM,EAAE;YACP,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAChC;KACD,CAAC;GAEI,QAAQ,CAgkBb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,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 Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport {\n\tisLeft,\n\tisRight,\n\tisDown,\n\tisUp,\n\tisF7,\n} 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 ScrollEnablement from \"@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js\";\nimport type { ScrollEnablementEventListenerParam } from \"@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport AnimationMode from \"@ui5/webcomponents-base/dist/types/AnimationMode.js\";\nimport { getAnimationMode } from \"@ui5/webcomponents-base/dist/config/AnimationMode.js\";\nimport {\n\tCAROUSEL_OF_TEXT,\n\tCAROUSEL_DOT_TEXT,\n\tCAROUSEL_PREVIOUS_ARROW_TEXT,\n\tCAROUSEL_NEXT_ARROW_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport CarouselArrowsPlacement from \"./types/CarouselArrowsPlacement.js\";\nimport CarouselPageIndicatorStyle from \"./types/CarouselPageIndicatorStyle.js\";\nimport CarouselTemplate from \"./generated/templates/CarouselTemplate.lit.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-left.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\n\nimport Button from \"./Button.js\";\nimport Label from \"./Label.js\";\n\n// Styles\nimport CarouselCss from \"./generated/themes/Carousel.css.js\";\n\ntype CarouselNavigateEventDetail = {\n\tselectedIndex: number;\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The Carousel allows the user to browse through a set of items.\n * The component is mostly used for showing a gallery of images, but can hold any other HTML element.\n * <br>\n * There are several ways to perform navigation:\n * <ul>\n * <li>on desktop - the user can navigate using the navigation arrows or with keyboard shorcuts.</li>\n * <li>on mobile - the user can use swipe gestures.</li>\n * </ul>\n *\n * <h3>Usage</h3>\n *\n * <h4>When to use:</h4>\n *\n * <ul>\n * <li>The items you want to display are very different from each other.</li>\n * <li>You want to display the items one after the other.</li>\n * </ul>\n *\n * <h4>When not to use:</h4>\n *\n * <ul>\n * <li>The items you want to display need to be visible at the same time.</li>\n * <li>The items you want to display are uniform and very similar.</li>\n * </ul>\n *\n * <h3>Keyboard Handling</h3>\n *\n * <h4>Basic Navigation</h4>\n * When the <code>ui5-carousel</code> is focused the user can navigate between the items\n * with the following keyboard shortcuts:\n * <br>\n * <ul>\n * <li>[UP/DOWN] - Navigates to previous and next item</li>\n * <li>[LEFT/RIGHT] - Navigates to previous and next item</li>\n * </ul>\n *\n * <h3>Fast Navigation</h3>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\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-carousel</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>content - Used to style the content of the component</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Carousel.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Carousel\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-carousel\n * @since 1.0.0-rc.6\n * @public\n */\n@customElement({\n\ttag: \"ui5-carousel\",\n\tlanguageAware: true,\n\tfastNavigation: true,\n\trenderer: litRender,\n\tstyles: CarouselCss,\n\ttemplate: CarouselTemplate,\n\tdependencies: [\n\t\tButton,\n\t\tLabel,\n\t],\n})\n/**\n * Fired whenever the page changes due to user interaction,\n * when the user clicks on the navigation arrows or while resizing,\n * based on the <code>items-per-page-l</code>, <code>items-per-page-m</code> and <code>items-per-page-s</code> properties.\n *\n * @event sap.ui.webc.main.Carousel#navigate\n * @param {Integer} selectedIndex the current selected index\n * @public\n * @since 1.0.0-rc.7\n */\n@event(\"navigate\", {\n\tdetail: {\n\t\tselectedIndex: { type: Integer },\n\t},\n})\n\nclass Carousel extends UI5Element {\n\t/**\n\t * Defines whether the carousel should loop, i.e show the first page after the last page is reached and vice versa.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.cyclic\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tcyclic!: boolean;\n\n\t/**\n\t * Defines the number of items per page on small size (up to 640px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageS\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageS!: number;\n\n\t/**\n\t * Defines the number of items per page on medium size (from 640px to 1024px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageM\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageM!: number;\n\n\t/**\n\t * Defines the number of items per page on large size (more than 1024px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageL\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageL!: number;\n\n\t/**\n\t * Defines the visibility of the navigation arrows.\n\t * If set to true the navigation arrows will be hidden.\n\t * <br><br>\n\t * <b>Note:</b> The navigation arrows are never displayed on touch devices.\n\t * In this case, the user can swipe to navigate through the items.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.hideNavigationArrows\n\t * @since 1.0.0-rc.15\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideNavigationArrows!: boolean;\n\n\t/**\n\t * Defines the visibility of the page indicator.\n\t * If set to true the page indicator will be hidden.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.hidePageIndicator\n\t * @since 1.0.0-rc.15\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thidePageIndicator!: boolean;\n\n\t/**\n\t * Defines the style of the page indicator.\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Default</code> - The page indicator will be visualized as dots if there are fewer than 9 pages. If there are more pages, the page indicator will switch to displaying the current page and the total number of pages. (e.g. X of Y)</li>\n\t * <li><code>Numeric</code> - The page indicator will display the current page and the total number of pages. (e.g. X of Y)</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CarouselPageIndicatorStyle}\n\t * @name sap.ui.webc.main.Carousel.prototype.pageIndicatorStyle\n\t * @since 1.10\n\t * @defaultvalue \"Default\"\n\t * @public\n\t */\n\t@property({ type: CarouselPageIndicatorStyle, defaultValue: CarouselPageIndicatorStyle.Default })\n\tpageIndicatorStyle!: CarouselPageIndicatorStyle;\n\n\t/**\n\t * Defines the index of the initially selected item.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype._selectedIndex\n\t * @defaultvalue 0\n\t * @private\n\t */\n\t@property({ validator: Integer, defaultValue: 0 })\n\t_selectedIndex!: number;\n\n\t/**\n\t * Defines the position of arrows.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Content</code></li>\n\t * <li><code>Navigation</code></li>\n\t * </ul>\n\t * <br>\n\t * When set to \"Content\", the arrows are placed on the sides of the current page.\n\t * <br>\n\t * When set to \"Navigation\", the arrows are placed on the sides of the page indicator.\n\t * @type {sap.ui.webc.main.types.CarouselArrowsPlacement}\n\t * @name sap.ui.webc.main.Carousel.prototype.arrowsPlacement\n\t * @defaultvalue \"Content\"\n\t * @public\n\t */\n\t@property({ type: CarouselArrowsPlacement, defaultValue: CarouselArrowsPlacement.Content })\n\tarrowsPlacement!: CarouselArrowsPlacement;\n\n\t/**\n\t * Defines the carousel width in pixels.\n\t * @private\n\t */\n\t@property({ validator: Integer })\n\t_width?: number;\n\n\t/**\n\t * Defines the carousel item width in pixels.\n\t * @private\n\t */\n\t@property({ validator: Integer })\n\t_itemWidth?: number;\n\n\t/**\n\t * If set to true navigation arrows are shown.\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_visibleNavigationArrows!: boolean;\n\n\t_scrollEnablement: ScrollEnablement;\n\t_onResizeBound: ResizeObserverCallback;\n\t_resizing: boolean;\n\t_lastFocusedElements: Array<HTMLElement>;\n\t_orderOfLastFocusedPages: Array<number>;\n\n\t/**\n\t * Defines the content of the component.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @name sap.ui.webc.main.Carousel.prototype.default\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcontent!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic get pageTypeLimit() {\n\t\treturn 9;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._scrollEnablement = new ScrollEnablement(this);\n\t\tthis._scrollEnablement.attachEvent(\"touchend\", e => {\n\t\t\tthis._updateScrolling(e);\n\t\t});\n\t\tthis._onResizeBound = this._onResize.bind(this);\n\t\tthis._resizing = false; // indicates if the carousel is in process of resizing\n\n\t\tthis._lastFocusedElements = [];\n\t\tthis._orderOfLastFocusedPages = [];\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Navigation) {\n\t\t\tthis._visibleNavigationArrows = true;\n\t\t}\n\n\t\tthis.validateSelectedIndex();\n\t}\n\n\tonAfterRendering() {\n\t\tthis._scrollEnablement.scrollContainer = this.getDomRef()!;\n\t\tthis._resizing = false; // not invalidating\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResizeBound);\n\t}\n\n\tvalidateSelectedIndex() {\n\t\tif (!this.isIndexInRange(this._selectedIndex)) {\n\t\t\tthis._selectedIndex = 0;\n\t\t}\n\t}\n\n\t_onResize() {\n\t\tconst previousItemsPerPage = this.effectiveItemsPerPage;\n\n\t\t// Set the resizing flag to suppress animation while resizing\n\t\tthis._resizing = true;\n\n\t\t// Change transitively effectiveItemsPerPage by modifying _width\n\t\tthis._width = this.offsetWidth;\n\t\tthis._itemWidth = Math.floor(this._width / this.effectiveItemsPerPage);\n\n\t\t// Items per page did not change or the current,\n\t\t// therefore page index does not need to be re-adjusted\n\t\tif (this.effectiveItemsPerPage === previousItemsPerPage) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._selectedIndex > this.pagesCount - 1) {\n\t\t\tthis._selectedIndex = this.pagesCount - 1;\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\t_updateScrolling(e: ScrollEnablementEventListenerParam) {\n\t\tif (!e) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.isLeft) {\n\t\t\tthis.navigateLeft();\n\t\t} else if (e.isRight) {\n\t\t\tthis.navigateRight();\n\t\t}\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tif (isF7(e)) {\n\t\t\tthis._handleF7Key(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.target !== this.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isLeft(e) || isDown(e)) {\n\t\t\tthis.navigateLeft();\n\t\t\tawait renderFinished();\n\t\t\tthis.getDomRef()!.focus();\n\t\t} else if (isRight(e) || isUp(e)) {\n\t\t\tthis.navigateRight();\n\t\t\tawait renderFinished();\n\t\t\tthis.getDomRef()!.focus();\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (target === this.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet pageIndex = -1;\n\t\tfor (let i = 0; i < this.content.length; i++) {\n\t\t\tif (this.content[i].contains(target)) {\n\t\t\t\tpageIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (pageIndex === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Save reference of the last focused element for each page\n\t\tthis._lastFocusedElements[pageIndex] = target;\n\n\t\tconst sortedPageIndex = this._orderOfLastFocusedPages.indexOf(pageIndex);\n\t\tif (sortedPageIndex === -1) {\n\t\t\tthis._orderOfLastFocusedPages.unshift(pageIndex);\n\t\t} else {\n\t\t\tthis._orderOfLastFocusedPages.splice(0, 0, this._orderOfLastFocusedPages.splice(sortedPageIndex, 1)[0]);\n\t\t}\n\t}\n\n\t_onmouseout() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Content) {\n\t\t\tthis._visibleNavigationArrows = false;\n\t\t}\n\t}\n\n\t_onmouseover() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Content) {\n\t\t\tthis._visibleNavigationArrows = true;\n\t\t}\n\t}\n\n\t_handleF7Key(e: KeyboardEvent) {\n\t\tconst lastFocusedElement = this._lastFocusedElements[this._getLastFocusedActivePageIndex];\n\n\t\tif (e.target === this.getDomRef() && lastFocusedElement) {\n\t\t\tlastFocusedElement.focus();\n\t\t} else {\n\t\t\tthis.getDomRef()!.focus();\n\t\t}\n\t}\n\n\tget _getLastFocusedActivePageIndex() {\n\t\tfor (let i = 0; i < this._orderOfLastFocusedPages.length; i++) {\n\t\t\tconst pageIndex = this._orderOfLastFocusedPages[i];\n\n\t\t\tif (this.isItemInViewport(pageIndex)) {\n\t\t\t\treturn pageIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn this._selectedIndex;\n\t}\n\n\tnavigateLeft() {\n\t\tthis._resizing = false;\n\n\t\tconst previousSelectedIndex = this._selectedIndex;\n\n\t\tif (this._selectedIndex - 1 < 0) {\n\t\t\tif (this.cyclic) {\n\t\t\t\tthis._selectedIndex = this.pagesCount - 1;\n\t\t\t}\n\t\t} else {\n\t\t\t--this._selectedIndex;\n\t\t}\n\n\t\tif (previousSelectedIndex !== this._selectedIndex) {\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\tnavigateRight() {\n\t\tthis._resizing = false;\n\n\t\tconst previousSelectedIndex = this._selectedIndex;\n\n\t\tif (this._selectedIndex + 1 > this.pagesCount - 1) {\n\t\t\tif (this.cyclic) {\n\t\t\t\tthis._selectedIndex = 0;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t++this._selectedIndex;\n\t\t}\n\n\t\tif (previousSelectedIndex !== this._selectedIndex) {\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\t_navButtonClick(e: MouseEvent) {\n\t\tconst button = e.target as Button;\n\t\tif (button.hasAttribute(\"arrow-forward\")) {\n\t\t\tthis.navigateRight();\n\t\t} else {\n\t\t\tthis.navigateLeft();\n\t\t}\n\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Changes the currently displayed page.\n\t * @param {Integer} itemIndex The index of the target page\n\t * @since 1.0.0-rc.15\n\t * @method\n\t * @name sap.ui.webc.main.Carousel#navigateTo\n\t * @public\n\t */\n\tnavigateTo(itemIndex: number) {\n\t\tthis._resizing = false;\n\t\tthis._selectedIndex = itemIndex;\n\t}\n\n\t/**\n\t * Assuming that all items have the same width\n\t * @private\n\t */\n\tget items() {\n\t\treturn this.content.map((item, idx) => {\n\t\t\tconst visible = this.isItemInViewport(idx);\n\t\t\treturn {\n\t\t\t\tid: `${this._id}-carousel-item-${idx + 1}`,\n\t\t\t\titem,\n\t\t\t\ttabIndex: visible ? \"0\" : \"-1\",\n\t\t\t\tposinset: `${idx + 1}`,\n\t\t\t\tsetsize: `${this.content.length}`,\n\t\t\t\tstyles: {\n\t\t\t\t\twidth: `${this._itemWidth || 0}px`,\n\t\t\t\t},\n\t\t\t\tclasses: visible ? \"\" : \"ui5-carousel-item--hidden\",\n\t\t\t};\n\t\t});\n\t}\n\n\tget effectiveItemsPerPage(): number {\n\t\tif (!this._width) {\n\t\t\treturn this.itemsPerPageL;\n\t\t}\n\n\t\tif (this._width <= 640) {\n\t\t\treturn this.itemsPerPageS;\n\t\t}\n\n\t\tif (this._width <= 1024) {\n\t\t\treturn this.itemsPerPageM;\n\t\t}\n\n\t\treturn this.itemsPerPageL;\n\t}\n\n\tisItemInViewport(index: number): boolean {\n\t\treturn index >= this._selectedIndex && index <= this._selectedIndex + this.effectiveItemsPerPage - 1;\n\t}\n\n\tisIndexInRange(index: number): boolean {\n\t\treturn index >= 0 && index <= this.pagesCount - 1;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tget renderNavigation() {\n\t\tif (!this.hasManyPages) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.hidePageIndicator) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tget hasManyPages() {\n\t\treturn this.pagesCount > 1;\n\t}\n\n\tget styles() {\n\t\tconst items = this._itemWidth || 0;\n\t\treturn {\n\t\t\tcontent: {\n\t\t\t\ttransform: `translateX(${this._isRTL ? \"\" : \"-\"}${this._selectedIndex * items}px`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tviewport: {\n\t\t\t\t\"ui5-carousel-viewport\": true,\n\t\t\t\t\"ui5-carousel-viewport--single\": this.pagesCount === 1,\n\t\t\t},\n\t\t\tcontent: {\n\t\t\t\t\"ui5-carousel-content\": true,\n\t\t\t\t\"ui5-carousel-content-no-animation\": this.suppressAnimation,\n\t\t\t\t\"ui5-carousel-content-has-navigation\": this.renderNavigation,\n\t\t\t\t\"ui5-carousel-content-has-navigation-and-buttons\": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,\n\t\t\t},\n\t\t\tnavigation: {\n\t\t\t\t\"ui5-carousel-navigation-wrapper\": true,\n\t\t\t\t\"ui5-carousel-navigation-with-buttons\": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,\n\t\t\t},\n\t\t\tnavPrevButton: {\n\t\t\t\t\"ui5-carousel-navigation-button--hidden\": !this.hasPrev,\n\t\t\t},\n\t\t\tnavNextButton: {\n\t\t\t\t\"ui5-carousel-navigation-button--hidden\": !this.hasNext,\n\t\t\t},\n\t\t};\n\t}\n\n\tget pagesCount() {\n\t\tconst items = this.content.length;\n\t\treturn items > this.effectiveItemsPerPage ? items - this.effectiveItemsPerPage + 1 : 1;\n\t}\n\n\tget isPageTypeDots() {\n\t\tif (this.pageIndicatorStyle === CarouselPageIndicatorStyle.Numeric) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.pagesCount < Carousel.pageTypeLimit;\n\t}\n\n\tget dots() {\n\t\tconst dots = [];\n\t\tconst pages = this.pagesCount;\n\n\t\tfor (let index = 0; index < pages; index++) {\n\t\t\tdots.push({\n\t\t\t\tactive: index === this._selectedIndex,\n\t\t\t\tariaLabel: Carousel.i18nBundle.getText(CAROUSEL_DOT_TEXT, index + 1, pages),\n\t\t\t});\n\t\t}\n\n\t\treturn dots;\n\t}\n\n\tget showArrows() {\n\t\tconst displayArrows = this._visibleNavigationArrows && this.hasManyPages && isDesktop();\n\n\t\treturn {\n\t\t\tcontent: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Content,\n\t\t\tnavigation: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Navigation,\n\t\t};\n\t}\n\n\tget hasPrev() {\n\t\treturn this.cyclic || this._selectedIndex - 1 >= 0;\n\t}\n\n\tget hasNext() {\n\t\treturn this.cyclic || this._selectedIndex + 1 <= this.pagesCount - 1;\n\t}\n\n\tget suppressAnimation() {\n\t\treturn this._resizing || getAnimationMode() === AnimationMode.None;\n\t}\n\n\tget _isRTL() {\n\t\treturn this.effectiveDir === \"rtl\";\n\t}\n\n\tget selectedIndexToShow() {\n\t\treturn this._isRTL ? this.pagesCount - (this.pagesCount - this._selectedIndex) + 1 : this._selectedIndex + 1;\n\t}\n\n\tget ofText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_OF_TEXT);\n\t}\n\n\tget ariaActiveDescendant() {\n\t\treturn this.content.length ? `${this._id}-carousel-item-${this._selectedIndex + 1}` : undefined;\n\t}\n\n\tget nextPageText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_NEXT_ARROW_TEXT);\n\t}\n\n\tget previousPageText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_PREVIOUS_ARROW_TEXT);\n\t}\n\n\t/**\n\t * The indices of the currently visible items of the component.\n\t * @public\n\t * @readonly\n\t * @since 1.0.0-rc.15\n\t * @returns {Integer[]} the indices of the visible items\n\t */\n\tget visibleItemsIndices() {\n\t\tconst visibleItemsIndices: Array<number> = [];\n\n\t\tthis.items.forEach((item, index) => {\n\t\t\tif (this.isItemInViewport(index)) {\n\t\t\t\tvisibleItemsIndices.push(index);\n\t\t\t}\n\t\t});\n\n\t\treturn visibleItemsIndices;\n\t}\n\n\tstatic async onDefine() {\n\t\tCarousel.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCarousel.define();\n\nexport default Carousel;\nexport type {\n\tCarouselNavigateEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../src/Carousel.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,OAAO,MAAM,+CAA+C,CAAC;AACpE,OAAO,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,IAAI,EACJ,IAAI,GACJ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,gBAAgB,MAAM,2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EAAE,IAAI;QACpB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;QAC1B,YAAY,EAAE;YACb,MAAM;YACN,KAAK;SACL;KACD,CAAC;IACF;;;;;;;;;OASG;;IACF,KAAK,CAAC,UAAU,EAAE;QAClB,MAAM,EAAE;YACP,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAChC;KACD,CAAC;GAEI,QAAQ,CAgkBb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,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 Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport {\n\tisLeft,\n\tisRight,\n\tisDown,\n\tisUp,\n\tisF7,\n} 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 ScrollEnablement from \"@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js\";\nimport type { ScrollEnablementEventListenerParam } from \"@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport AnimationMode from \"@ui5/webcomponents-base/dist/types/AnimationMode.js\";\nimport { getAnimationMode } from \"@ui5/webcomponents-base/dist/config/AnimationMode.js\";\nimport {\n\tCAROUSEL_OF_TEXT,\n\tCAROUSEL_DOT_TEXT,\n\tCAROUSEL_PREVIOUS_ARROW_TEXT,\n\tCAROUSEL_NEXT_ARROW_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport CarouselArrowsPlacement from \"./types/CarouselArrowsPlacement.js\";\nimport CarouselPageIndicatorStyle from \"./types/CarouselPageIndicatorStyle.js\";\nimport CarouselTemplate from \"./generated/templates/CarouselTemplate.lit.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-left.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\n\nimport Button from \"./Button.js\";\nimport Label from \"./Label.js\";\n\n// Styles\nimport CarouselCss from \"./generated/themes/Carousel.css.js\";\n\ntype CarouselNavigateEventDetail = {\n\tselectedIndex: number;\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The Carousel allows the user to browse through a set of items.\n * The component is mostly used for showing a gallery of images, but can hold any other HTML element.\n * <br>\n * There are several ways to perform navigation:\n * <ul>\n * <li>on desktop - the user can navigate using the navigation arrows or with keyboard shorcuts.</li>\n * <li>on mobile - the user can use swipe gestures.</li>\n * </ul>\n *\n * <h3>Usage</h3>\n *\n * <h4>When to use:</h4>\n *\n * <ul>\n * <li>The items you want to display are very different from each other.</li>\n * <li>You want to display the items one after the other.</li>\n * </ul>\n *\n * <h4>When not to use:</h4>\n *\n * <ul>\n * <li>The items you want to display need to be visible at the same time.</li>\n * <li>The items you want to display are uniform and very similar.</li>\n * </ul>\n *\n * <h3>Keyboard Handling</h3>\n *\n * <h4>Basic Navigation</h4>\n * When the <code>ui5-carousel</code> is focused the user can navigate between the items\n * with the following keyboard shortcuts:\n * <br>\n * <ul>\n * <li>[UP/DOWN] - Navigates to previous and next item</li>\n * <li>[LEFT/RIGHT] - Navigates to previous and next item</li>\n * </ul>\n *\n * <h3>Fast Navigation</h3>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\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-carousel</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>content - Used to style the content of the component</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Carousel.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Carousel\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-carousel\n * @since 1.0.0-rc.6\n * @public\n */\n@customElement({\n\ttag: \"ui5-carousel\",\n\tlanguageAware: true,\n\tfastNavigation: true,\n\trenderer: litRender,\n\tstyles: CarouselCss,\n\ttemplate: CarouselTemplate,\n\tdependencies: [\n\t\tButton,\n\t\tLabel,\n\t],\n})\n/**\n * Fired whenever the page changes due to user interaction,\n * when the user clicks on the navigation arrows or while resizing,\n * based on the <code>items-per-page-l</code>, <code>items-per-page-m</code> and <code>items-per-page-s</code> properties.\n *\n * @event sap.ui.webc.main.Carousel#navigate\n * @param {Integer} selectedIndex the current selected index\n * @public\n * @since 1.0.0-rc.7\n */\n@event(\"navigate\", {\n\tdetail: {\n\t\tselectedIndex: { type: Integer },\n\t},\n})\n\nclass Carousel extends UI5Element {\n\t/**\n\t * Defines whether the carousel should loop, i.e show the first page after the last page is reached and vice versa.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.cyclic\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tcyclic!: boolean;\n\n\t/**\n\t * Defines the number of items per page on small size (up to 640px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageS\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageS!: number;\n\n\t/**\n\t * Defines the number of items per page on medium size (from 640px to 1024px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageM\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageM!: number;\n\n\t/**\n\t * Defines the number of items per page on large size (more than 1024px). One item per page shown by default.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype.itemsPerPageL\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 1 })\n\titemsPerPageL!: number;\n\n\t/**\n\t * Defines the visibility of the navigation arrows.\n\t * If set to true the navigation arrows will be hidden.\n\t * <br><br>\n\t * <b>Note:</b> The navigation arrows are never displayed on touch devices.\n\t * In this case, the user can swipe to navigate through the items.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.hideNavigationArrows\n\t * @since 1.0.0-rc.15\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideNavigationArrows!: boolean;\n\n\t/**\n\t * Defines the visibility of the page indicator.\n\t * If set to true the page indicator will be hidden.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Carousel.prototype.hidePageIndicator\n\t * @since 1.0.0-rc.15\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thidePageIndicator!: boolean;\n\n\t/**\n\t * Defines the style of the page indicator.\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Default</code> - The page indicator will be visualized as dots if there are fewer than 9 pages. If there are more pages, the page indicator will switch to displaying the current page and the total number of pages. (e.g. X of Y)</li>\n\t * <li><code>Numeric</code> - The page indicator will display the current page and the total number of pages. (e.g. X of Y)</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CarouselPageIndicatorStyle}\n\t * @name sap.ui.webc.main.Carousel.prototype.pageIndicatorStyle\n\t * @since 1.10\n\t * @defaultvalue \"Default\"\n\t * @public\n\t */\n\t@property({ type: CarouselPageIndicatorStyle, defaultValue: CarouselPageIndicatorStyle.Default })\n\tpageIndicatorStyle!: `${CarouselPageIndicatorStyle}`;\n\n\t/**\n\t * Defines the index of the initially selected item.\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.Carousel.prototype._selectedIndex\n\t * @defaultvalue 0\n\t * @private\n\t */\n\t@property({ validator: Integer, defaultValue: 0 })\n\t_selectedIndex!: number;\n\n\t/**\n\t * Defines the position of arrows.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>Content</code></li>\n\t * <li><code>Navigation</code></li>\n\t * </ul>\n\t * <br>\n\t * When set to \"Content\", the arrows are placed on the sides of the current page.\n\t * <br>\n\t * When set to \"Navigation\", the arrows are placed on the sides of the page indicator.\n\t * @type {sap.ui.webc.main.types.CarouselArrowsPlacement}\n\t * @name sap.ui.webc.main.Carousel.prototype.arrowsPlacement\n\t * @defaultvalue \"Content\"\n\t * @public\n\t */\n\t@property({ type: CarouselArrowsPlacement, defaultValue: CarouselArrowsPlacement.Content })\n\tarrowsPlacement!: `${CarouselArrowsPlacement}`;\n\n\t/**\n\t * Defines the carousel width in pixels.\n\t * @private\n\t */\n\t@property({ validator: Integer })\n\t_width?: number;\n\n\t/**\n\t * Defines the carousel item width in pixels.\n\t * @private\n\t */\n\t@property({ validator: Integer })\n\t_itemWidth?: number;\n\n\t/**\n\t * If set to true navigation arrows are shown.\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_visibleNavigationArrows!: boolean;\n\n\t_scrollEnablement: ScrollEnablement;\n\t_onResizeBound: ResizeObserverCallback;\n\t_resizing: boolean;\n\t_lastFocusedElements: Array<HTMLElement>;\n\t_orderOfLastFocusedPages: Array<number>;\n\n\t/**\n\t * Defines the content of the component.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @name sap.ui.webc.main.Carousel.prototype.default\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcontent!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic get pageTypeLimit() {\n\t\treturn 9;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._scrollEnablement = new ScrollEnablement(this);\n\t\tthis._scrollEnablement.attachEvent(\"touchend\", e => {\n\t\t\tthis._updateScrolling(e);\n\t\t});\n\t\tthis._onResizeBound = this._onResize.bind(this);\n\t\tthis._resizing = false; // indicates if the carousel is in process of resizing\n\n\t\tthis._lastFocusedElements = [];\n\t\tthis._orderOfLastFocusedPages = [];\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Navigation) {\n\t\t\tthis._visibleNavigationArrows = true;\n\t\t}\n\n\t\tthis.validateSelectedIndex();\n\t}\n\n\tonAfterRendering() {\n\t\tthis._scrollEnablement.scrollContainer = this.getDomRef()!;\n\t\tthis._resizing = false; // not invalidating\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResizeBound);\n\t}\n\n\tvalidateSelectedIndex() {\n\t\tif (!this.isIndexInRange(this._selectedIndex)) {\n\t\t\tthis._selectedIndex = 0;\n\t\t}\n\t}\n\n\t_onResize() {\n\t\tconst previousItemsPerPage = this.effectiveItemsPerPage;\n\n\t\t// Set the resizing flag to suppress animation while resizing\n\t\tthis._resizing = true;\n\n\t\t// Change transitively effectiveItemsPerPage by modifying _width\n\t\tthis._width = this.offsetWidth;\n\t\tthis._itemWidth = Math.floor(this._width / this.effectiveItemsPerPage);\n\n\t\t// Items per page did not change or the current,\n\t\t// therefore page index does not need to be re-adjusted\n\t\tif (this.effectiveItemsPerPage === previousItemsPerPage) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._selectedIndex > this.pagesCount - 1) {\n\t\t\tthis._selectedIndex = this.pagesCount - 1;\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\t_updateScrolling(e: ScrollEnablementEventListenerParam) {\n\t\tif (!e) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.isLeft) {\n\t\t\tthis.navigateLeft();\n\t\t} else if (e.isRight) {\n\t\t\tthis.navigateRight();\n\t\t}\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tif (isF7(e)) {\n\t\t\tthis._handleF7Key(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.target !== this.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isLeft(e) || isDown(e)) {\n\t\t\tthis.navigateLeft();\n\t\t\tawait renderFinished();\n\t\t\tthis.getDomRef()!.focus();\n\t\t} else if (isRight(e) || isUp(e)) {\n\t\t\tthis.navigateRight();\n\t\t\tawait renderFinished();\n\t\t\tthis.getDomRef()!.focus();\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (target === this.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet pageIndex = -1;\n\t\tfor (let i = 0; i < this.content.length; i++) {\n\t\t\tif (this.content[i].contains(target)) {\n\t\t\t\tpageIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (pageIndex === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Save reference of the last focused element for each page\n\t\tthis._lastFocusedElements[pageIndex] = target;\n\n\t\tconst sortedPageIndex = this._orderOfLastFocusedPages.indexOf(pageIndex);\n\t\tif (sortedPageIndex === -1) {\n\t\t\tthis._orderOfLastFocusedPages.unshift(pageIndex);\n\t\t} else {\n\t\t\tthis._orderOfLastFocusedPages.splice(0, 0, this._orderOfLastFocusedPages.splice(sortedPageIndex, 1)[0]);\n\t\t}\n\t}\n\n\t_onmouseout() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Content) {\n\t\t\tthis._visibleNavigationArrows = false;\n\t\t}\n\t}\n\n\t_onmouseover() {\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Content) {\n\t\t\tthis._visibleNavigationArrows = true;\n\t\t}\n\t}\n\n\t_handleF7Key(e: KeyboardEvent) {\n\t\tconst lastFocusedElement = this._lastFocusedElements[this._getLastFocusedActivePageIndex];\n\n\t\tif (e.target === this.getDomRef() && lastFocusedElement) {\n\t\t\tlastFocusedElement.focus();\n\t\t} else {\n\t\t\tthis.getDomRef()!.focus();\n\t\t}\n\t}\n\n\tget _getLastFocusedActivePageIndex() {\n\t\tfor (let i = 0; i < this._orderOfLastFocusedPages.length; i++) {\n\t\t\tconst pageIndex = this._orderOfLastFocusedPages[i];\n\n\t\t\tif (this.isItemInViewport(pageIndex)) {\n\t\t\t\treturn pageIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn this._selectedIndex;\n\t}\n\n\tnavigateLeft() {\n\t\tthis._resizing = false;\n\n\t\tconst previousSelectedIndex = this._selectedIndex;\n\n\t\tif (this._selectedIndex - 1 < 0) {\n\t\t\tif (this.cyclic) {\n\t\t\t\tthis._selectedIndex = this.pagesCount - 1;\n\t\t\t}\n\t\t} else {\n\t\t\t--this._selectedIndex;\n\t\t}\n\n\t\tif (previousSelectedIndex !== this._selectedIndex) {\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\tnavigateRight() {\n\t\tthis._resizing = false;\n\n\t\tconst previousSelectedIndex = this._selectedIndex;\n\n\t\tif (this._selectedIndex + 1 > this.pagesCount - 1) {\n\t\t\tif (this.cyclic) {\n\t\t\t\tthis._selectedIndex = 0;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t++this._selectedIndex;\n\t\t}\n\n\t\tif (previousSelectedIndex !== this._selectedIndex) {\n\t\t\tthis.fireEvent<CarouselNavigateEventDetail>(\"navigate\", { selectedIndex: this._selectedIndex });\n\t\t}\n\t}\n\n\t_navButtonClick(e: MouseEvent) {\n\t\tconst button = e.target as Button;\n\t\tif (button.hasAttribute(\"arrow-forward\")) {\n\t\t\tthis.navigateRight();\n\t\t} else {\n\t\t\tthis.navigateLeft();\n\t\t}\n\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Changes the currently displayed page.\n\t * @param {Integer} itemIndex The index of the target page\n\t * @since 1.0.0-rc.15\n\t * @method\n\t * @name sap.ui.webc.main.Carousel#navigateTo\n\t * @public\n\t */\n\tnavigateTo(itemIndex: number) {\n\t\tthis._resizing = false;\n\t\tthis._selectedIndex = itemIndex;\n\t}\n\n\t/**\n\t * Assuming that all items have the same width\n\t * @private\n\t */\n\tget items() {\n\t\treturn this.content.map((item, idx) => {\n\t\t\tconst visible = this.isItemInViewport(idx);\n\t\t\treturn {\n\t\t\t\tid: `${this._id}-carousel-item-${idx + 1}`,\n\t\t\t\titem,\n\t\t\t\ttabIndex: visible ? \"0\" : \"-1\",\n\t\t\t\tposinset: `${idx + 1}`,\n\t\t\t\tsetsize: `${this.content.length}`,\n\t\t\t\tstyles: {\n\t\t\t\t\twidth: `${this._itemWidth || 0}px`,\n\t\t\t\t},\n\t\t\t\tclasses: visible ? \"\" : \"ui5-carousel-item--hidden\",\n\t\t\t};\n\t\t});\n\t}\n\n\tget effectiveItemsPerPage(): number {\n\t\tif (!this._width) {\n\t\t\treturn this.itemsPerPageL;\n\t\t}\n\n\t\tif (this._width <= 640) {\n\t\t\treturn this.itemsPerPageS;\n\t\t}\n\n\t\tif (this._width <= 1024) {\n\t\t\treturn this.itemsPerPageM;\n\t\t}\n\n\t\treturn this.itemsPerPageL;\n\t}\n\n\tisItemInViewport(index: number): boolean {\n\t\treturn index >= this._selectedIndex && index <= this._selectedIndex + this.effectiveItemsPerPage - 1;\n\t}\n\n\tisIndexInRange(index: number): boolean {\n\t\treturn index >= 0 && index <= this.pagesCount - 1;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tget renderNavigation() {\n\t\tif (!this.hasManyPages) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.hidePageIndicator) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tget hasManyPages() {\n\t\treturn this.pagesCount > 1;\n\t}\n\n\tget styles() {\n\t\tconst items = this._itemWidth || 0;\n\t\treturn {\n\t\t\tcontent: {\n\t\t\t\ttransform: `translateX(${this._isRTL ? \"\" : \"-\"}${this._selectedIndex * items}px`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tviewport: {\n\t\t\t\t\"ui5-carousel-viewport\": true,\n\t\t\t\t\"ui5-carousel-viewport--single\": this.pagesCount === 1,\n\t\t\t},\n\t\t\tcontent: {\n\t\t\t\t\"ui5-carousel-content\": true,\n\t\t\t\t\"ui5-carousel-content-no-animation\": this.suppressAnimation,\n\t\t\t\t\"ui5-carousel-content-has-navigation\": this.renderNavigation,\n\t\t\t\t\"ui5-carousel-content-has-navigation-and-buttons\": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,\n\t\t\t},\n\t\t\tnavigation: {\n\t\t\t\t\"ui5-carousel-navigation-wrapper\": true,\n\t\t\t\t\"ui5-carousel-navigation-with-buttons\": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,\n\t\t\t},\n\t\t\tnavPrevButton: {\n\t\t\t\t\"ui5-carousel-navigation-button--hidden\": !this.hasPrev,\n\t\t\t},\n\t\t\tnavNextButton: {\n\t\t\t\t\"ui5-carousel-navigation-button--hidden\": !this.hasNext,\n\t\t\t},\n\t\t};\n\t}\n\n\tget pagesCount() {\n\t\tconst items = this.content.length;\n\t\treturn items > this.effectiveItemsPerPage ? items - this.effectiveItemsPerPage + 1 : 1;\n\t}\n\n\tget isPageTypeDots() {\n\t\tif (this.pageIndicatorStyle === CarouselPageIndicatorStyle.Numeric) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.pagesCount < Carousel.pageTypeLimit;\n\t}\n\n\tget dots() {\n\t\tconst dots = [];\n\t\tconst pages = this.pagesCount;\n\n\t\tfor (let index = 0; index < pages; index++) {\n\t\t\tdots.push({\n\t\t\t\tactive: index === this._selectedIndex,\n\t\t\t\tariaLabel: Carousel.i18nBundle.getText(CAROUSEL_DOT_TEXT, index + 1, pages),\n\t\t\t});\n\t\t}\n\n\t\treturn dots;\n\t}\n\n\tget showArrows() {\n\t\tconst displayArrows = this._visibleNavigationArrows && this.hasManyPages && isDesktop();\n\n\t\treturn {\n\t\t\tcontent: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Content,\n\t\t\tnavigation: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Navigation,\n\t\t};\n\t}\n\n\tget hasPrev() {\n\t\treturn this.cyclic || this._selectedIndex - 1 >= 0;\n\t}\n\n\tget hasNext() {\n\t\treturn this.cyclic || this._selectedIndex + 1 <= this.pagesCount - 1;\n\t}\n\n\tget suppressAnimation() {\n\t\treturn this._resizing || getAnimationMode() === AnimationMode.None;\n\t}\n\n\tget _isRTL() {\n\t\treturn this.effectiveDir === \"rtl\";\n\t}\n\n\tget selectedIndexToShow() {\n\t\treturn this._isRTL ? this.pagesCount - (this.pagesCount - this._selectedIndex) + 1 : this._selectedIndex + 1;\n\t}\n\n\tget ofText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_OF_TEXT);\n\t}\n\n\tget ariaActiveDescendant() {\n\t\treturn this.content.length ? `${this._id}-carousel-item-${this._selectedIndex + 1}` : undefined;\n\t}\n\n\tget nextPageText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_NEXT_ARROW_TEXT);\n\t}\n\n\tget previousPageText() {\n\t\treturn Carousel.i18nBundle.getText(CAROUSEL_PREVIOUS_ARROW_TEXT);\n\t}\n\n\t/**\n\t * The indices of the currently visible items of the component.\n\t * @public\n\t * @readonly\n\t * @since 1.0.0-rc.15\n\t * @returns {Integer[]} the indices of the visible items\n\t */\n\tget visibleItemsIndices() {\n\t\tconst visibleItemsIndices: Array<number> = [];\n\n\t\tthis.items.forEach((item, index) => {\n\t\t\tif (this.isItemInViewport(index)) {\n\t\t\t\tvisibleItemsIndices.push(index);\n\t\t\t}\n\t\t});\n\n\t\treturn visibleItemsIndices;\n\t}\n\n\tstatic async onDefine() {\n\t\tCarousel.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCarousel.define();\n\nexport default Carousel;\nexport type {\n\tCarouselNavigateEventDetail,\n};\n"]}
|
package/dist/CheckBox.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ declare class CheckBox extends UI5Element implements IFormElement {
|
|
|
175
175
|
* @defaultvalue "None"
|
|
176
176
|
* @public
|
|
177
177
|
*/
|
|
178
|
-
valueState: ValueState
|
|
178
|
+
valueState: `${ValueState}`;
|
|
179
179
|
/**
|
|
180
180
|
* Defines whether the component text wraps when there is not enough space.
|
|
181
181
|
* <br><br>
|
|
@@ -190,7 +190,7 @@ declare class CheckBox extends UI5Element implements IFormElement {
|
|
|
190
190
|
* @defaultvalue "None"
|
|
191
191
|
* @public
|
|
192
192
|
*/
|
|
193
|
-
wrappingType: WrappingType
|
|
193
|
+
wrappingType: `${WrappingType}`;
|
|
194
194
|
/**
|
|
195
195
|
* Determines the name with which the component will be submitted in an HTML form.
|
|
196
196
|
*
|