@ui5/webcomponents 2.5.0-rc.2 → 2.5.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/cypress/specs/Button.cy.ts +84 -70
- package/cypress/specs/FormSupport.cy.ts +64 -0
- package/cypress/specs/Link.cy.ts +16 -0
- package/cypress/specs/List.cy.ts +84 -0
- package/cypress/specs/Menu.cy.ts +39 -0
- package/cypress/specs/RatingIndicator.cy.ts +39 -0
- package/cypress/specs/TableVirtualizer.cy.ts +246 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +3 -0
- package/dist/Avatar.js +1 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.d.ts +4 -0
- package/dist/AvatarGroup.js +2 -13
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/Bar.d.ts +3 -0
- package/dist/Bar.js +3 -0
- package/dist/Bar.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +7 -4
- package/dist/Breadcrumbs.js +1 -23
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Button.d.ts +12 -0
- package/dist/Button.js +7 -1
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.d.ts +7 -2
- package/dist/Calendar.js +11 -22
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarLegend.d.ts +4 -0
- package/dist/CalendarLegend.js +1 -4
- package/dist/CalendarLegend.js.map +1 -1
- package/dist/CardHeader.d.ts +3 -0
- package/dist/CardHeader.js +1 -1
- package/dist/CardHeader.js.map +1 -1
- package/dist/Carousel.d.ts +3 -0
- package/dist/Carousel.js +1 -7
- package/dist/Carousel.js.map +1 -1
- package/dist/CheckBox.d.ts +4 -0
- package/dist/CheckBox.js +1 -1
- package/dist/CheckBox.js.map +1 -1
- package/dist/ColorPalette.d.ts +3 -0
- package/dist/ColorPalette.js +2 -11
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPalettePopover.d.ts +4 -0
- package/dist/ColorPalettePopover.js +1 -9
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ColorPicker.d.ts +3 -0
- package/dist/ColorPicker.js +1 -1
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ComboBox.d.ts +5 -0
- package/dist/ComboBox.js +1 -7
- package/dist/ComboBox.js.map +1 -1
- package/dist/DatePicker.d.ts +9 -1
- package/dist/DatePicker.js +2 -44
- package/dist/DatePicker.js.map +1 -1
- package/dist/DayPicker.d.ts +4 -0
- package/dist/DayPicker.js +1 -1
- package/dist/DayPicker.js.map +1 -1
- package/dist/Dialog.d.ts +1 -0
- package/dist/Dialog.js.map +1 -1
- package/dist/FileUploader.d.ts +4 -0
- package/dist/FileUploader.js +1 -13
- package/dist/FileUploader.js.map +1 -1
- package/dist/Icon.d.ts +3 -0
- package/dist/Icon.js +1 -1
- package/dist/Icon.js.map +1 -1
- package/dist/Input.d.ts +10 -0
- package/dist/Input.js +2 -28
- package/dist/Input.js.map +1 -1
- package/dist/Link.d.ts +11 -0
- package/dist/Link.js +7 -19
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +13 -0
- package/dist/List.js +29 -84
- package/dist/List.js.map +1 -1
- package/dist/ListItem.d.ts +7 -0
- package/dist/ListItem.js +1 -4
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.d.ts +9 -2
- package/dist/ListItemBase.js +1 -1
- package/dist/ListItemBase.js.map +1 -1
- package/dist/ListItemGroup.d.ts +4 -0
- package/dist/ListItemGroup.js +1 -21
- package/dist/ListItemGroup.js.map +1 -1
- package/dist/Menu.d.ts +8 -0
- package/dist/Menu.js +13 -38
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.d.ts +1 -0
- package/dist/MenuItem.js +8 -0
- package/dist/MenuItem.js.map +1 -1
- package/dist/MessageStrip.d.ts +3 -0
- package/dist/MessageStrip.js +1 -1
- package/dist/MessageStrip.js.map +1 -1
- package/dist/MonthPicker.d.ts +4 -0
- package/dist/MonthPicker.js +1 -1
- package/dist/MonthPicker.js.map +1 -1
- package/dist/MultiComboBox.d.ts +7 -0
- package/dist/MultiComboBox.js +1 -9
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiComboBoxItem.d.ts +4 -0
- package/dist/MultiComboBoxItem.js +1 -1
- package/dist/MultiComboBoxItem.js.map +1 -1
- package/dist/MultiInput.d.ts +4 -0
- package/dist/MultiInput.js +1 -7
- package/dist/MultiInput.js.map +1 -1
- package/dist/Panel.d.ts +3 -0
- package/dist/Panel.js +1 -1
- package/dist/Panel.js.map +1 -1
- package/dist/Popover.js +7 -2
- package/dist/Popover.js.map +1 -1
- package/dist/Popup.d.ts +7 -0
- package/dist/Popup.js +4 -12
- package/dist/Popup.js.map +1 -1
- package/dist/RadioButton.d.ts +3 -0
- package/dist/RadioButton.js +1 -1
- package/dist/RadioButton.js.map +1 -1
- package/dist/RatingIndicator.d.ts +4 -0
- package/dist/RatingIndicator.js +4 -1
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/ResponsivePopover.d.ts +5 -3
- package/dist/ResponsivePopover.js +10 -8
- package/dist/ResponsivePopover.js.map +1 -1
- package/dist/SegmentedButton.d.ts +3 -0
- package/dist/SegmentedButton.js +2 -9
- package/dist/SegmentedButton.js.map +1 -1
- package/dist/Select.d.ts +8 -0
- package/dist/Select.js +1 -13
- package/dist/Select.js.map +1 -1
- package/dist/SliderBase.d.ts +4 -0
- package/dist/SliderBase.js +1 -1
- package/dist/SliderBase.js.map +1 -1
- package/dist/SplitButton.d.ts +4 -0
- package/dist/SplitButton.js +1 -1
- package/dist/SplitButton.js.map +1 -1
- package/dist/StepInput.d.ts +4 -0
- package/dist/StepInput.js +2 -16
- package/dist/StepInput.js.map +1 -1
- package/dist/Switch.d.ts +4 -0
- package/dist/Switch.js +1 -1
- package/dist/Switch.js.map +1 -1
- package/dist/TabContainer.d.ts +5 -0
- package/dist/TabContainer.js +1 -31
- package/dist/TabContainer.js.map +1 -1
- package/dist/Table.d.ts +12 -1
- package/dist/Table.js +20 -11
- package/dist/Table.js.map +1 -1
- package/dist/TableGrowing.d.ts +4 -1
- package/dist/TableGrowing.js +2 -2
- package/dist/TableGrowing.js.map +1 -1
- package/dist/TableNavigation.js +6 -1
- package/dist/TableNavigation.js.map +1 -1
- package/dist/TableRow.d.ts +7 -0
- package/dist/TableRow.js +13 -0
- package/dist/TableRow.js.map +1 -1
- package/dist/TableSelection.d.ts +3 -0
- package/dist/TableSelection.js +1 -1
- package/dist/TableSelection.js.map +1 -1
- package/dist/TableUtils.d.ts +2 -1
- package/dist/TableUtils.js +10 -1
- package/dist/TableUtils.js.map +1 -1
- package/dist/TableVirtualizer.d.ts +99 -0
- package/dist/TableVirtualizer.js +251 -0
- package/dist/TableVirtualizer.js.map +1 -0
- package/dist/Tag.d.ts +3 -0
- package/dist/Tag.js +1 -1
- package/dist/Tag.js.map +1 -1
- package/dist/TextArea.d.ts +7 -0
- package/dist/TextArea.js +5 -5
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePicker.d.ts +8 -1
- package/dist/TimePicker.js +1 -29
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerClock.d.ts +3 -0
- package/dist/TimePickerClock.js +7 -21
- package/dist/TimePickerClock.js.map +1 -1
- package/dist/TimePickerInternals.d.ts +3 -0
- package/dist/TimePickerInternals.js +1 -5
- package/dist/TimePickerInternals.js.map +1 -1
- package/dist/TimeSelectionClocks.d.ts +3 -0
- package/dist/TimeSelectionClocks.js +1 -1
- package/dist/TimeSelectionClocks.js.map +1 -1
- package/dist/TimeSelectionInputs.d.ts +3 -0
- package/dist/TimeSelectionInputs.js +1 -1
- package/dist/TimeSelectionInputs.js.map +1 -1
- package/dist/Toast.d.ts +3 -0
- package/dist/Toast.js +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Token.d.ts +6 -2
- package/dist/Token.js +1 -5
- package/dist/Token.js.map +1 -1
- package/dist/Tokenizer.d.ts +6 -0
- package/dist/Tokenizer.js +1 -10
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.d.ts +3 -0
- package/dist/Toolbar.js +2 -7
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarButton.d.ts +3 -0
- package/dist/ToolbarButton.js +5 -2
- package/dist/ToolbarButton.js.map +1 -1
- package/dist/ToolbarSelect.d.ts +5 -0
- package/dist/ToolbarSelect.js +1 -7
- package/dist/ToolbarSelect.js.map +1 -1
- package/dist/Tree.d.ts +11 -0
- package/dist/Tree.js +1 -56
- package/dist/Tree.js.map +1 -1
- package/dist/TreeItemBase.d.ts +5 -0
- package/dist/TreeItemBase.js +1 -10
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/YearPicker.d.ts +4 -0
- package/dist/YearPicker.js +1 -1
- package/dist/YearPicker.js.map +1 -1
- package/dist/bundle.esm.js +1 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/Bar.css +1 -1
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/BusyIndicator.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/CalendarLegend.css +1 -1
- package/dist/css/themes/CalendarLegendItem.css +1 -1
- package/dist/css/themes/Card.css +1 -1
- package/dist/css/themes/CardHeader.css +1 -1
- package/dist/css/themes/Carousel.css +1 -1
- package/dist/css/themes/CheckBox.css +1 -1
- package/dist/css/themes/ColorPalette.css +1 -1
- package/dist/css/themes/ColorPaletteItem.css +1 -1
- package/dist/css/themes/ColorPalettePopover.css +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/ComboBox.css +1 -1
- package/dist/css/themes/ComboBoxItem.css +1 -1
- package/dist/css/themes/DatePicker.css +1 -1
- package/dist/css/themes/DateTimePickerPopover.css +1 -1
- package/dist/css/themes/DayPicker.css +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/FileUploader.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItem.css +1 -1
- package/dist/css/themes/FormItemSpan.css +1 -1
- package/dist/css/themes/GrowingButton.css +1 -1
- package/dist/css/themes/Icon.css +1 -1
- package/dist/css/themes/Input.css +1 -1
- package/dist/css/themes/InputIcon.css +1 -1
- package/dist/css/themes/InputSharedStyles.css +1 -1
- package/dist/css/themes/Link.css +1 -1
- package/dist/css/themes/List.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/ListItemBase.css +1 -1
- package/dist/css/themes/ListItemCustom.css +1 -1
- package/dist/css/themes/ListItemGroup.css +1 -1
- package/dist/css/themes/ListItemGroupHeader.css +1 -1
- package/dist/css/themes/ListItemIcon.css +1 -1
- package/dist/css/themes/Menu.css +1 -1
- package/dist/css/themes/MenuItem.css +1 -1
- package/dist/css/themes/MessageStrip.css +1 -1
- package/dist/css/themes/MonthPicker.css +1 -1
- package/dist/css/themes/MultiComboBox.css +1 -1
- package/dist/css/themes/MultiComboBoxItem.css +1 -1
- package/dist/css/themes/MultiComboBoxPopover.css +1 -1
- package/dist/css/themes/MultiInput.css +1 -1
- package/dist/css/themes/NavigationMenu.css +1 -1
- package/dist/css/themes/NavigationMenuItem.css +1 -1
- package/dist/css/themes/OptionBase.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/Popover.css +1 -1
- package/dist/css/themes/PopupsCommon.css +1 -1
- package/dist/css/themes/ProgressIndicator.css +1 -1
- package/dist/css/themes/RadioButton.css +1 -1
- package/dist/css/themes/RangeSlider.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/ResponsivePopover.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/SegmentedButton.css +1 -1
- package/dist/css/themes/SegmentedButtonItem.css +1 -1
- package/dist/css/themes/Select.css +1 -1
- package/dist/css/themes/SliderBase.css +1 -1
- package/dist/css/themes/SplitButton.css +1 -1
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/SuggestionItem.css +1 -1
- package/dist/css/themes/SuggestionItemCustom.css +1 -1
- package/dist/css/themes/Switch.css +1 -1
- package/dist/css/themes/TabContainer.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/css/themes/TabInStrip.css +1 -1
- package/dist/css/themes/TabSemanticIcon.css +1 -1
- package/dist/css/themes/TabSeparatorInOverflow.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/css/themes/TableCellBase.css +1 -1
- package/dist/css/themes/TableHeaderRow.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TableRowBase.css +1 -1
- package/dist/css/themes/Tag.css +1 -1
- package/dist/css/themes/Text.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/TimePicker.css +1 -1
- package/dist/css/themes/Toast.css +1 -1
- package/dist/css/themes/ToggleButton.css +1 -1
- package/dist/css/themes/Token.css +1 -1
- package/dist/css/themes/Tokenizer.css +1 -1
- package/dist/css/themes/TokenizerPopover.css +1 -1
- package/dist/css/themes/Toolbar.css +1 -1
- package/dist/css/themes/ToolbarPopover.css +1 -1
- package/dist/css/themes/TreeItem.css +1 -1
- package/dist/css/themes/ValueStateMessage.css +1 -1
- package/dist/css/themes/YearPicker.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw_exp/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +270 -8
- package/dist/custom-elements.json +220 -0
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/templates/BarTemplate.lit.js +1 -1
- package/dist/generated/templates/BarTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js.map +1 -1
- package/dist/generated/templates/RatingIndicatorTemplate.lit.js +1 -1
- package/dist/generated/templates/RatingIndicatorTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ResponsivePopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/ResponsivePopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TableTemplate.lit.js +1 -1
- package/dist/generated/templates/TableTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ToggleButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/Bar.css.js +1 -1
- package/dist/generated/themes/Bar.css.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/BusyIndicator.css.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegend.css.js +1 -1
- package/dist/generated/themes/CalendarLegend.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js.map +1 -1
- package/dist/generated/themes/Card.css.js +1 -1
- package/dist/generated/themes/Card.css.js.map +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/Carousel.css.js.map +1 -1
- package/dist/generated/themes/CheckBox.css.js +1 -1
- package/dist/generated/themes/CheckBox.css.js.map +1 -1
- package/dist/generated/themes/ColorPalette.css.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js.map +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js.map +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js.map +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/ComboBox.css.js +1 -1
- package/dist/generated/themes/ComboBox.css.js.map +1 -1
- package/dist/generated/themes/ComboBoxItem.css.js +1 -1
- package/dist/generated/themes/ComboBoxItem.css.js.map +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js.map +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/DayPicker.css.js +1 -1
- package/dist/generated/themes/DayPicker.css.js.map +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/FileUploader.css.js +1 -1
- package/dist/generated/themes/FileUploader.css.js.map +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItem.css.js +1 -1
- package/dist/generated/themes/FormItem.css.js.map +1 -1
- package/dist/generated/themes/FormItemSpan.css.js +1 -1
- package/dist/generated/themes/FormItemSpan.css.js.map +1 -1
- package/dist/generated/themes/GrowingButton.css.js +1 -1
- package/dist/generated/themes/GrowingButton.css.js.map +1 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +1 -1
- package/dist/generated/themes/Input.css.js +1 -1
- package/dist/generated/themes/Input.css.js.map +1 -1
- package/dist/generated/themes/InputIcon.css.js +1 -1
- package/dist/generated/themes/InputIcon.css.js.map +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js.map +1 -1
- package/dist/generated/themes/Link.css.js +1 -1
- package/dist/generated/themes/Link.css.js.map +1 -1
- package/dist/generated/themes/List.css.js +1 -1
- package/dist/generated/themes/List.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/ListItemCustom.css.js +1 -1
- package/dist/generated/themes/ListItemCustom.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroup.css.js +1 -1
- package/dist/generated/themes/ListItemGroup.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/ListItemIcon.css.js +1 -1
- package/dist/generated/themes/ListItemIcon.css.js.map +1 -1
- package/dist/generated/themes/Menu.css.js +1 -1
- package/dist/generated/themes/Menu.css.js.map +1 -1
- package/dist/generated/themes/MenuItem.css.js +1 -1
- package/dist/generated/themes/MenuItem.css.js.map +1 -1
- package/dist/generated/themes/MessageStrip.css.js +1 -1
- package/dist/generated/themes/MessageStrip.css.js.map +1 -1
- package/dist/generated/themes/MonthPicker.css.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxItem.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxItem.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenu.css.js +1 -1
- package/dist/generated/themes/NavigationMenu.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js.map +1 -1
- package/dist/generated/themes/OptionBase.css.js +1 -1
- package/dist/generated/themes/OptionBase.css.js.map +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/Popover.css.js +1 -1
- package/dist/generated/themes/Popover.css.js.map +1 -1
- package/dist/generated/themes/PopupsCommon.css.js +1 -1
- package/dist/generated/themes/PopupsCommon.css.js.map +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RadioButton.css.js.map +1 -1
- package/dist/generated/themes/RangeSlider.css.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButton.css.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js.map +1 -1
- package/dist/generated/themes/Select.css.js +1 -1
- package/dist/generated/themes/Select.css.js.map +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js.map +1 -1
- package/dist/generated/themes/SplitButton.css.js +1 -1
- package/dist/generated/themes/SplitButton.css.js.map +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItem.css.js +1 -1
- package/dist/generated/themes/SuggestionItem.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js.map +1 -1
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.css.js.map +1 -1
- package/dist/generated/themes/TabContainer.css.js +1 -1
- package/dist/generated/themes/TabContainer.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/generated/themes/TabInStrip.css.js +1 -1
- package/dist/generated/themes/TabInStrip.css.js.map +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js.map +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js.map +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCellBase.css.js +1 -1
- package/dist/generated/themes/TableCellBase.css.js.map +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/TableRowBase.css.js +1 -1
- package/dist/generated/themes/TableRowBase.css.js.map +1 -1
- package/dist/generated/themes/Tag.css.js +1 -1
- package/dist/generated/themes/Tag.css.js.map +1 -1
- package/dist/generated/themes/Text.css.js +1 -1
- package/dist/generated/themes/Text.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/TimePicker.css.js +1 -1
- package/dist/generated/themes/TimePicker.css.js.map +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/Toast.css.js.map +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/Tokenizer.css.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js.map +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js.map +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js.map +1 -1
- package/dist/generated/themes/TreeItem.css.js +1 -1
- package/dist/generated/themes/TreeItem.css.js.map +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js.map +1 -1
- package/dist/generated/themes/YearPicker.css.js +1 -1
- package/dist/generated/themes/YearPicker.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +43 -1
- package/dist/web-types.json +107 -2
- package/package.json +9 -9
- package/src/Bar.hbs +3 -3
- package/src/Button.hbs +1 -0
- package/src/Link.hbs +1 -0
- package/src/RatingIndicator.hbs +1 -1
- package/src/ResponsivePopover.hbs +2 -2
- package/src/Table.hbs +6 -1
- package/src/i18n/messagebundle_ar.properties +2 -0
- package/src/i18n/messagebundle_bg.properties +2 -0
- package/src/i18n/messagebundle_ca.properties +2 -0
- package/src/i18n/messagebundle_cnr.properties +2 -0
- package/src/i18n/messagebundle_cs.properties +2 -0
- package/src/i18n/messagebundle_cy.properties +2 -0
- package/src/i18n/messagebundle_da.properties +2 -0
- package/src/i18n/messagebundle_de.properties +2 -0
- package/src/i18n/messagebundle_el.properties +2 -0
- package/src/i18n/messagebundle_en_GB.properties +2 -0
- package/src/i18n/messagebundle_es.properties +2 -0
- package/src/i18n/messagebundle_es_MX.properties +2 -0
- package/src/i18n/messagebundle_et.properties +2 -0
- package/src/i18n/messagebundle_fi.properties +2 -0
- package/src/i18n/messagebundle_fr.properties +2 -0
- package/src/i18n/messagebundle_fr_CA.properties +2 -0
- package/src/i18n/messagebundle_hi.properties +2 -0
- package/src/i18n/messagebundle_hr.properties +2 -0
- package/src/i18n/messagebundle_hu.properties +2 -0
- package/src/i18n/messagebundle_id.properties +2 -0
- package/src/i18n/messagebundle_it.properties +2 -0
- package/src/i18n/messagebundle_iw.properties +2 -0
- package/src/i18n/messagebundle_ja.properties +2 -0
- package/src/i18n/messagebundle_kk.properties +2 -0
- package/src/i18n/messagebundle_ko.properties +2 -0
- package/src/i18n/messagebundle_lt.properties +2 -0
- package/src/i18n/messagebundle_lv.properties +2 -0
- package/src/i18n/messagebundle_mk.properties +2 -0
- package/src/i18n/messagebundle_ms.properties +2 -0
- package/src/i18n/messagebundle_nl.properties +2 -0
- package/src/i18n/messagebundle_no.properties +2 -0
- package/src/i18n/messagebundle_pl.properties +2 -0
- package/src/i18n/messagebundle_pt.properties +2 -0
- package/src/i18n/messagebundle_pt_PT.properties +2 -0
- package/src/i18n/messagebundle_ro.properties +2 -0
- package/src/i18n/messagebundle_ru.properties +2 -0
- package/src/i18n/messagebundle_sh.properties +2 -0
- package/src/i18n/messagebundle_sk.properties +2 -0
- package/src/i18n/messagebundle_sl.properties +2 -0
- package/src/i18n/messagebundle_sr.properties +2 -0
- package/src/i18n/messagebundle_sv.properties +2 -0
- package/src/i18n/messagebundle_th.properties +2 -0
- package/src/i18n/messagebundle_tr.properties +2 -0
- package/src/i18n/messagebundle_uk.properties +2 -0
- package/src/i18n/messagebundle_vi.properties +2 -0
- package/src/i18n/messagebundle_zh_CN.properties +2 -0
- package/src/i18n/messagebundle_zh_TW.properties +2 -0
- package/src/themes/ListItem.css +4 -0
- package/src/themes/ListItemBase.css +8 -0
- package/src/themes/RatingIndicator.css +1 -0
- package/src/themes/Table.css +15 -2
- package/src/themes/TableCellBase.css +1 -1
- package/src/themes/TableRow.css +5 -0
- package/src/themes/Tag.css +10 -0
- package/src/themes/base/RatingIndicator-parameters.css +3 -2
- package/src/themes/base/Tag-parameters.css +6 -0
- package/src/themes/sap_fiori_3_hcb/Tag-parameters.css +2 -0
- package/src/themes/sap_fiori_3_hcw/Tag-parameters.css +2 -0
- package/src/themes/sap_horizon/RatingIndicator-parameters.css +0 -2
- package/src/themes/sap_horizon_dark/RatingIndicator-parameters.css +0 -2
- package/src/themes/sap_horizon_hcb/RatingIndicator-parameters.css +0 -1
- package/src/themes/sap_horizon_hcb/Tag-parameters.css +2 -0
- package/src/themes/sap_horizon_hcw/RatingIndicator-parameters.css +0 -1
- package/src/themes/sap_horizon_hcw/Tag-parameters.css +2 -0
package/dist/Dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../src/Dialog.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MA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nE,CAAC;CACD,CAAA;AA/hBA;IADC,QAAQ,EAAE;0CACS;AAWpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACZ;AAgBhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAelB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAYlB;IADC,QAAQ,EAAE;qCACqB;AAgChC;IADC,IAAI,EAAE;sCACqB;AAS5B;IADC,IAAI,EAAE;sCACqB;AAGrB;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AA3GzB,MAAM;IAdX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE;YACP,KAAK,CAAC,MAAM;YACZ,eAAe;YACf,SAAS;YACT,0BAA0B,EAAE;SAC5B;QACD,YAAY,EAAE;YACb,IAAI;YACJ,GAAG,KAAK,CAAC,YAAY;SACrB;KACD,CAAC;GACI,MAAM,CAwiBX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport getEffectiveScrollbarStyle from \"@ui5/webcomponents-base/dist/util/getEffectiveScrollbarStyle.js\";\nimport {\n\tisUp, isDown, isLeft, isRight,\n\tisUpShift, isDownShift, isLeftShift, isRightShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport Popup from \"./Popup.js\";\nimport type { PopupBeforeCloseEventDetail as DialogBeforeCloseEventDetail } from \"./Popup.js\";\nimport Icon from \"./Icon.js\";\nimport \"@ui5/webcomponents-icons/dist/resize-corner.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\n\nimport {\n\tDIALOG_HEADER_ARIA_ROLE_DESCRIPTION,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport DialogTemplate from \"./generated/templates/DialogTemplate.lit.js\";\n// Styles\nimport PopupsCommonCss from \"./generated/themes/PopupsCommon.css.js\";\nimport dialogCSS from \"./generated/themes/Dialog.css.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\n\n/**\n * Defines the step size at which this component would change by when being dragged or resized with the keyboard.\n */\nconst STEP_SIZE = 16;\n\ntype ValueStateWithIcon = ValueState.Negative | ValueState.Critical | ValueState.Positive | ValueState.Information;\n/**\n * Defines the icons corresponding to the dialog's state.\n */\nconst ICON_PER_STATE: Record<ValueStateWithIcon, string> = {\n\t[ValueState.Negative]: \"error\",\n\t[ValueState.Critical]: \"alert\",\n\t[ValueState.Positive]: \"sys-enter-2\",\n\t[ValueState.Information]: \"information\",\n};\n\n/**\n * @class\n * ### Overview\n * The `ui5-dialog` component is used to temporarily display some information in a\n * size-limited window in front of the regular app screen.\n * It is used to prompt the user for an action or a confirmation.\n * The `ui5-dialog` interrupts the current app processing as it is the only focused UI element and\n * the main screen is dimmed/blocked.\n * The dialog combines concepts known from other technologies where the windows have\n * names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n *\n * The `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.\n * To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\n * The content of the `ui5-dialog` is fully customizable.\n *\n * ### Structure\n * A `ui5-dialog` consists of a header, content, and a footer for action buttons.\n * The `ui5-dialog` is usually displayed at the center of the screen.\n * Its position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.\n\n *\n * ### Responsive Behavior\n * The `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.\n *\n * **Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.\n *\n * For more information see the sample \"Bar in Header/Footer\".\n\n * ### Keyboard Handling\n *\n * #### Basic Navigation\n * When the `ui5-dialog` has the `draggable` property set to `true` and the header is focused, the user can move the dialog\n * with the following keyboard shortcuts:\n *\n * - [Up] or [Down] arrow keys - Move the dialog up/down.\n * - [Left] or [Right] arrow keys - Move the dialog left/right.\n *\n * #### Resizing\n * When the `ui5-dialog` has the `resizable` property set to `true` and the header is focused, the user can change the size of the dialog\n * with the following keyboard shortcuts:\n *\n * - [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.\n * - [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Dialog\";`\n *\n * @constructor\n * @extends Popup\n * @public\n * @csspart header - Used to style the header of the component\n * @csspart content - Used to style the content of the component\n * @csspart footer - Used to style the footer of the component\n */\n@customElement({\n\ttag: \"ui5-dialog\",\n\ttemplate: DialogTemplate,\n\tstyles: [\n\t\tPopup.styles,\n\t\tPopupsCommonCss,\n\t\tdialogCSS,\n\t\tgetEffectiveScrollbarStyle(),\n\t],\n\tdependencies: [\n\t\tIcon,\n\t\t...Popup.dependencies,\n\t],\n})\nclass Dialog extends Popup {\n\t/**\n\t * Defines the header text.\n\t *\n\t * **Note:** If `header` slot is provided, the `headerText` is ignored.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Determines if the dialog will be stretched to full screen on mobile. On desktop,\n\t * the dialog will be stretched to approximately 90% of the viewport.\n\t *\n\t * **Note:** For better usability of the component it is recommended to set this property to \"true\" when the dialog is opened on phone.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tstretch = false;\n\n\t/**\n\t * Determines whether the component is draggable.\n\t * If this property is set to true, the Dialog will be draggable by its header.\n\t *\n\t * **Note:** The component can be draggable only in desktop mode.\n\t *\n\t * **Note:** This property overrides the default HTML \"draggable\" attribute native behavior.\n\t * When \"draggable\" is set to true, the native browser \"draggable\"\n\t * behavior is prevented and only the Dialog custom logic (\"draggable by its header\") works.\n\t * @default false\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdraggable = false;\n\n\t/**\n\t * Configures the component to be resizable.\n\t * If this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages.\n\t * In RTL languages, the resize handle will be placed in the bottom left corner.\n\t *\n\t * **Note:** The component can be resizable only in desktop mode.\n\t *\n\t * **Note:** Upon resizing, externally defined height and width styling will be ignored.\n\t * @default false\n\t * @since 1.0.0-rc.10\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tresizable = false;\n\n\t/**\n\t * Defines the state of the `Dialog`.\n\t *\n\t * **Note:** If `\"Negative\"` and `\"Critical\"` states is set, it will change the\n\t * accessibility role to \"alertdialog\", if the accessibleRole property is set to `\"Dialog\"`.\n\t * @default \"None\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tstate: `${ValueState}` = \"None\";\n\n\t_screenResizeHandler: () => void;\n\t_dragMouseMoveHandler: (e: MouseEvent) => void;\n\t_dragMouseUpHandler: (e: MouseEvent) => void;\n\t_resizeMouseMoveHandler: (e: MouseEvent) => void;\n\t_resizeMouseUpHandler: (e: MouseEvent) => void;\n\t_dragStartHandler: (e: DragEvent) => void;\n\t_y?: number;\n\t_x?: number;\n\t_isRTL?: boolean;\n\t_screenResizeHandlerAttached?: boolean;\n\t_initialX?: number;\n\t_initialY?: number;\n\t_initialWidth?: number;\n\t_initialHeight?: number;\n\t_initialTop?: number;\n\t_initialLeft?: number;\n\t_minWidth?: number;\n\t_cachedMinHeight?: number;\n\t_draggedOrResized = false;\n\n\t/**\n\t * Defines the header HTML Element.\n\t *\n\t * **Note:** When a `ui5-bar` is used in the header, you should remove the default dialog's paddings.\n\t *\n\t * **Note:** If `header` slot is provided, the labelling of the dialog is a responsibility of the application developer.\n\t * `accessibleName` should be used.\n\t * @public\n\t */\n\t@slot()\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the footer HTML Element.\n\t *\n\t * **Note:** When a `ui5-bar` is used in the footer, you should remove the default dialog's paddings.\n\t * @public\n\t */\n\t@slot()\n\tfooter!: Array<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._screenResizeHandler = this._screenResize.bind(this);\n\n\t\tthis._dragMouseMoveHandler = this._onDragMouseMove.bind(this);\n\t\tthis._dragMouseUpHandler = this._onDragMouseUp.bind(this);\n\n\t\tthis._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);\n\t\tthis._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);\n\n\t\tthis._dragStartHandler = this._handleDragStart.bind(this);\n\t}\n\n\tstatic _isHeader(element: HTMLElement) {\n\t\treturn element.classList.contains(\"ui5-popup-header-root\") || element.getAttribute(\"slot\") === \"header\";\n\t}\n\n\tget isModal() {\n\t\treturn true;\n\t}\n\n\tget _ariaLabelledBy() {\n\t\tlet ariaLabelledById;\n\n\t\tif (this.headerText && !this._ariaLabel) {\n\t\t\tariaLabelledById = \"ui5-popup-header-text\";\n\t\t}\n\n\t\treturn ariaLabelledById;\n\t}\n\n\tget ariaRoleDescriptionHeaderText() {\n\t\treturn (this.resizable || this.draggable) ? Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_ROLE_DESCRIPTION) : undefined;\n\t}\n\n\tget effectiveAriaDescribedBy() {\n\t\treturn (this.resizable || this.draggable) ? `${this._id}-descr` : undefined;\n\t}\n\n\tget ariaDescribedByHeaderTextResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE);\n\t}\n\n\tget ariaDescribedByHeaderTextDraggable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE);\n\t}\n\n\tget ariaDescribedByHeaderTextDraggableAndResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE);\n\t}\n\n\t/**\n\t * Determines if the header should be shown.\n\t */\n\tget _displayHeader() {\n\t\treturn this.header.length || this.headerText || this.draggable || this.resizable;\n\t}\n\n\tget _movable() {\n\t\treturn !this.stretch && this.onDesktop && (this.draggable || this.resizable);\n\t}\n\n\tget _headerTabIndex() {\n\t\treturn this._movable ? \"0\" : undefined;\n\t}\n\n\tget _showResizeHandle() {\n\t\treturn this.resizable && this.onDesktop;\n\t}\n\n\tget _minHeight() {\n\t\tlet minHeight = Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);\n\n\t\tconst header = this._root.querySelector<HTMLElement>(\".ui5-popup-header-root\");\n\t\tif (header) {\n\t\t\tminHeight += header.offsetHeight;\n\t\t}\n\n\t\tconst footer = this._root.querySelector<HTMLElement>(\".ui5-popup-footer-root\");\n\t\tif (footer) {\n\t\t\tminHeight += footer.offsetHeight;\n\t\t}\n\n\t\treturn minHeight;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.state !== ValueState.None;\n\t}\n\n\tget _dialogStateIcon() {\n\t\treturn ICON_PER_STATE[this.state as ValueStateWithIcon];\n\t}\n\n\tget _role(): string | undefined {\n\t\tif (this.accessibleRole === PopupAccessibleRole.None) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (this.state === ValueState.Negative || this.state === ValueState.Critical) {\n\t\t\treturn PopupAccessibleRole.AlertDialog.toLowerCase();\n\t\t}\n\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\t_show() {\n\t\tsuper._show();\n\t\tthis._center();\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\n\t\tthis._isRTL = this.effectiveDir === \"rtl\";\n\t}\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tthis._attachScreenResizeHandler();\n\n\t\tthis.addEventListener(\"dragstart\", this._dragStartHandler);\n\t}\n\n\tonExitDOM() {\n\t\tsuper.onExitDOM();\n\t\tthis._detachScreenResizeHandler();\n\n\t\tthis.removeEventListener(\"dragstart\", this._dragStartHandler);\n\t}\n\n\t/**\n\t * @override\n\t */\n\t_resize() {\n\t\tsuper._resize();\n\n\t\tif (!this._draggedOrResized) {\n\t\t\tthis._center();\n\t\t}\n\t}\n\n\t_screenResize() {\n\t\tthis._center();\n\t}\n\n\t_attachScreenResizeHandler() {\n\t\tif (!this._screenResizeHandlerAttached) {\n\t\t\twindow.addEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = true;\n\t\t}\n\t}\n\n\t_detachScreenResizeHandler() {\n\t\tif (this._screenResizeHandlerAttached) {\n\t\t\twindow.removeEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = false; // prevent dialog from repositioning during resizing\n\t\t}\n\t}\n\n\t_center() {\n\t\tconst height = window.innerHeight - this.offsetHeight,\n\t\t\twidth = window.innerWidth - this.offsetWidth;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${Math.round(height / 2)}px`,\n\t\t\tleft: `${Math.round(width / 2)}px`,\n\t\t});\n\t}\n\n\t_revertSize = () => {\n\t\tObject.assign(this.style, {\n\t\t\ttop: \"\",\n\t\t\tleft: \"\",\n\t\t\twidth: \"\",\n\t\t\theight: \"\",\n\t\t});\n\t}\n\n\t/**\n\t * Event handlers\n\t */\n\t_onDragMouseDown(e: DragEvent) {\n\t\t// allow dragging only on the header\n\t\tif (!this._movable || !this.draggable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t} = window.getComputedStyle(this);\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t\twidth: `${Math.round(Number.parseFloat(width) * 100) / 100}px`,\n\t\t\theight: `${Math.round(Number.parseFloat(height) * 100) / 100}px`,\n\t\t});\n\n\t\tthis._x = e.clientX;\n\t\tthis._y = e.clientY;\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseDragHandlers();\n\t}\n\n\t_onDragMouseMove(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tconst { clientX, clientY } = e;\n\t\tconst calcX = this._x! - clientX;\n\t\tconst calcY = this._y! - clientY;\n\t\tconst {\n\t\t\tleft,\n\t\t\ttop,\n\t\t} = this.getBoundingClientRect();\n\n\t\tObject.assign(this.style, {\n\t\t\tleft: `${Math.floor(left - calcX)}px`,\n\t\t\ttop: `${Math.floor(top - calcY)}px`,\n\t\t});\n\n\t\tthis._x = clientX;\n\t\tthis._y = clientY;\n\t}\n\n\t_onDragMouseUp() {\n\t\tdelete this._x;\n\t\tdelete this._y;\n\n\t\tthis._detachMouseDragHandlers();\n\t}\n\n\t_onDragOrResizeKeyDown(e: KeyboardEvent) {\n\t\tif (!this._movable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.draggable && [isUp, isDown, isLeft, isRight].some(key => key(e))) {\n\t\t\tthis._dragWithEvent(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.resizable && [isUpShift, isDownShift, isLeftShift, isRightShift].some(key => key(e))) {\n\t\t\tthis._resizeWithEvent(e);\n\t\t}\n\t}\n\n\t_dragWithEvent(e: KeyboardEvent) {\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t\twidth,\n\t\t\theight,\n\t\t} = this.getBoundingClientRect();\n\n\t\tlet newPos = 0;\n\t\tlet posDirection: \"top\" | \"left\" = \"top\";\n\n\t\tswitch (true) {\n\t\tcase isUp(e):\n\t\t\tnewPos = top - STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isDown(e):\n\t\t\tnewPos = top + STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isLeft(e):\n\t\t\tnewPos = left - STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\tcase isRight(e):\n\t\t\tnewPos = left + STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\t}\n\n\t\tnewPos = clamp(\n\t\t\tnewPos,\n\t\t\t0,\n\t\t\tposDirection === \"left\" ? window.innerWidth - width : window.innerHeight - height,\n\t\t);\n\n\t\tthis.style[posDirection] = `${newPos}px`;\n\t}\n\n\t_resizeWithEvent(e: KeyboardEvent) {\n\t\tthis._draggedOrResized = true;\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\n\t\tconst { top, left } = this.getBoundingClientRect(),\n\t\t\tstyle = window.getComputedStyle(this),\n\t\t\tminWidth = Number.parseFloat(style.minWidth),\n\t\t\tmaxWidth = window.innerWidth - left,\n\t\t\tmaxHeight = window.innerHeight - top;\n\n\t\tlet width = Number.parseFloat(style.width),\n\t\t\theight = Number.parseFloat(style.height);\n\n\t\tswitch (true) {\n\t\tcase isUpShift(e):\n\t\t\theight -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isDownShift(e):\n\t\t\theight += STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isLeftShift(e):\n\t\t\twidth -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isRightShift(e):\n\t\t\twidth += STEP_SIZE;\n\t\t\tbreak;\n\t\t}\n\n\t\twidth = clamp(width, minWidth, maxWidth);\n\t\theight = clamp(height, this._minHeight, maxHeight);\n\n\t\tObject.assign(this.style, {\n\t\t\twidth: `${width}px`,\n\t\t\theight: `${height}px`,\n\t\t});\n\t}\n\n\t_attachMouseDragHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_detachMouseDragHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_onResizeMouseDown(e: MouseEvent) {\n\t\tif (!this._movable || !this.resizable) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tminWidth,\n\t\t} = window.getComputedStyle(this);\n\n\t\tthis._initialX = e.clientX;\n\t\tthis._initialY = e.clientY;\n\t\tthis._initialWidth = Number.parseFloat(width);\n\t\tthis._initialHeight = Number.parseFloat(height);\n\t\tthis._initialTop = top;\n\t\tthis._initialLeft = left;\n\t\tthis._minWidth = Number.parseFloat(minWidth);\n\t\tthis._cachedMinHeight = this._minHeight;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t});\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseResizeHandlers();\n\t}\n\n\t_onResizeMouseMove(e: MouseEvent) {\n\t\tconst { clientX, clientY } = e;\n\n\t\tlet newWidth,\n\t\t\tnewLeft;\n\n\t\tif (this._isRTL) {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! - (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\tthis._initialLeft! + this._initialWidth!,\n\t\t\t);\n\n\t\t\tnewLeft = clamp(\n\t\t\t\tthis._initialLeft! + (clientX - this._initialX!),\n\t\t\t\t0,\n\t\t\t\tthis._initialX! + this._initialWidth! - this._minWidth!,\n\t\t\t);\n\t\t} else {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! + (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\twindow.innerWidth - this._initialLeft!,\n\t\t\t);\n\t\t}\n\n\t\tconst newHeight = clamp(\n\t\t\tthis._initialHeight! + (clientY - this._initialY!),\n\t\t\tthis._cachedMinHeight!,\n\t\t\twindow.innerHeight - this._initialTop!,\n\t\t);\n\n\t\tObject.assign(this.style, {\n\t\t\theight: `${newHeight}px`,\n\t\t\twidth: `${newWidth}px`,\n\t\t\tleft: newLeft ? `${newLeft}px` : undefined,\n\t\t});\n\t}\n\n\t_onResizeMouseUp() {\n\t\tdelete this._initialX;\n\t\tdelete this._initialY;\n\t\tdelete this._initialWidth;\n\t\tdelete this._initialHeight;\n\t\tdelete this._initialTop;\n\t\tdelete this._initialLeft;\n\t\tdelete this._minWidth;\n\t\tdelete this._cachedMinHeight;\n\n\t\tthis._detachMouseResizeHandlers();\n\t}\n\n\t_handleDragStart(e: DragEvent) {\n\t\tif (this.draggable) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_attachMouseResizeHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\t}\n\n\t_detachMouseResizeHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n}\n\nDialog.define();\n\nexport default Dialog;\nexport type {\n\tDialogBeforeCloseEventDetail,\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EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,0BAA0B;QACzB,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACtE,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACnE,CAAC;CACD,CAAA;AA/hBA;IADC,QAAQ,EAAE;0CACS;AAWpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACZ;AAgBhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAelB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAYlB;IADC,QAAQ,EAAE;qCACqB;AAgChC;IADC,IAAI,EAAE;sCACqB;AAS5B;IADC,IAAI,EAAE;sCACqB;AAGrB;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AA5GzB,MAAM;IAdX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE;YACP,KAAK,CAAC,MAAM;YACZ,eAAe;YACf,SAAS;YACT,0BAA0B,EAAE;SAC5B;QACD,YAAY,EAAE;YACb,IAAI;YACJ,GAAG,KAAK,CAAC,YAAY;SACrB;KACD,CAAC;GACI,MAAM,CAyiBX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport getEffectiveScrollbarStyle from \"@ui5/webcomponents-base/dist/util/getEffectiveScrollbarStyle.js\";\nimport {\n\tisUp, isDown, isLeft, isRight,\n\tisUpShift, isDownShift, isLeftShift, isRightShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport Popup from \"./Popup.js\";\nimport type { PopupBeforeCloseEventDetail as DialogBeforeCloseEventDetail } from \"./Popup.js\";\nimport Icon from \"./Icon.js\";\nimport \"@ui5/webcomponents-icons/dist/resize-corner.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\n\nimport {\n\tDIALOG_HEADER_ARIA_ROLE_DESCRIPTION,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE,\n\tDIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport DialogTemplate from \"./generated/templates/DialogTemplate.lit.js\";\n// Styles\nimport PopupsCommonCss from \"./generated/themes/PopupsCommon.css.js\";\nimport dialogCSS from \"./generated/themes/Dialog.css.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\n\n/**\n * Defines the step size at which this component would change by when being dragged or resized with the keyboard.\n */\nconst STEP_SIZE = 16;\n\ntype ValueStateWithIcon = ValueState.Negative | ValueState.Critical | ValueState.Positive | ValueState.Information;\n/**\n * Defines the icons corresponding to the dialog's state.\n */\nconst ICON_PER_STATE: Record<ValueStateWithIcon, string> = {\n\t[ValueState.Negative]: \"error\",\n\t[ValueState.Critical]: \"alert\",\n\t[ValueState.Positive]: \"sys-enter-2\",\n\t[ValueState.Information]: \"information\",\n};\n\n/**\n * @class\n * ### Overview\n * The `ui5-dialog` component is used to temporarily display some information in a\n * size-limited window in front of the regular app screen.\n * It is used to prompt the user for an action or a confirmation.\n * The `ui5-dialog` interrupts the current app processing as it is the only focused UI element and\n * the main screen is dimmed/blocked.\n * The dialog combines concepts known from other technologies where the windows have\n * names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n *\n * The `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.\n * To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\n * The content of the `ui5-dialog` is fully customizable.\n *\n * ### Structure\n * A `ui5-dialog` consists of a header, content, and a footer for action buttons.\n * The `ui5-dialog` is usually displayed at the center of the screen.\n * Its position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.\n\n *\n * ### Responsive Behavior\n * The `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.\n *\n * **Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.\n *\n * For more information see the sample \"Bar in Header/Footer\".\n\n * ### Keyboard Handling\n *\n * #### Basic Navigation\n * When the `ui5-dialog` has the `draggable` property set to `true` and the header is focused, the user can move the dialog\n * with the following keyboard shortcuts:\n *\n * - [Up] or [Down] arrow keys - Move the dialog up/down.\n * - [Left] or [Right] arrow keys - Move the dialog left/right.\n *\n * #### Resizing\n * When the `ui5-dialog` has the `resizable` property set to `true` and the header is focused, the user can change the size of the dialog\n * with the following keyboard shortcuts:\n *\n * - [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.\n * - [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Dialog\";`\n *\n * @constructor\n * @extends Popup\n * @public\n * @csspart header - Used to style the header of the component\n * @csspart content - Used to style the content of the component\n * @csspart footer - Used to style the footer of the component\n */\n@customElement({\n\ttag: \"ui5-dialog\",\n\ttemplate: DialogTemplate,\n\tstyles: [\n\t\tPopup.styles,\n\t\tPopupsCommonCss,\n\t\tdialogCSS,\n\t\tgetEffectiveScrollbarStyle(),\n\t],\n\tdependencies: [\n\t\tIcon,\n\t\t...Popup.dependencies,\n\t],\n})\nclass Dialog extends Popup {\n\teventDetails!: Popup[\"eventDetails\"];\n\t/**\n\t * Defines the header text.\n\t *\n\t * **Note:** If `header` slot is provided, the `headerText` is ignored.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Determines if the dialog will be stretched to full screen on mobile. On desktop,\n\t * the dialog will be stretched to approximately 90% of the viewport.\n\t *\n\t * **Note:** For better usability of the component it is recommended to set this property to \"true\" when the dialog is opened on phone.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tstretch = false;\n\n\t/**\n\t * Determines whether the component is draggable.\n\t * If this property is set to true, the Dialog will be draggable by its header.\n\t *\n\t * **Note:** The component can be draggable only in desktop mode.\n\t *\n\t * **Note:** This property overrides the default HTML \"draggable\" attribute native behavior.\n\t * When \"draggable\" is set to true, the native browser \"draggable\"\n\t * behavior is prevented and only the Dialog custom logic (\"draggable by its header\") works.\n\t * @default false\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdraggable = false;\n\n\t/**\n\t * Configures the component to be resizable.\n\t * If this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages.\n\t * In RTL languages, the resize handle will be placed in the bottom left corner.\n\t *\n\t * **Note:** The component can be resizable only in desktop mode.\n\t *\n\t * **Note:** Upon resizing, externally defined height and width styling will be ignored.\n\t * @default false\n\t * @since 1.0.0-rc.10\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tresizable = false;\n\n\t/**\n\t * Defines the state of the `Dialog`.\n\t *\n\t * **Note:** If `\"Negative\"` and `\"Critical\"` states is set, it will change the\n\t * accessibility role to \"alertdialog\", if the accessibleRole property is set to `\"Dialog\"`.\n\t * @default \"None\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tstate: `${ValueState}` = \"None\";\n\n\t_screenResizeHandler: () => void;\n\t_dragMouseMoveHandler: (e: MouseEvent) => void;\n\t_dragMouseUpHandler: (e: MouseEvent) => void;\n\t_resizeMouseMoveHandler: (e: MouseEvent) => void;\n\t_resizeMouseUpHandler: (e: MouseEvent) => void;\n\t_dragStartHandler: (e: DragEvent) => void;\n\t_y?: number;\n\t_x?: number;\n\t_isRTL?: boolean;\n\t_screenResizeHandlerAttached?: boolean;\n\t_initialX?: number;\n\t_initialY?: number;\n\t_initialWidth?: number;\n\t_initialHeight?: number;\n\t_initialTop?: number;\n\t_initialLeft?: number;\n\t_minWidth?: number;\n\t_cachedMinHeight?: number;\n\t_draggedOrResized = false;\n\n\t/**\n\t * Defines the header HTML Element.\n\t *\n\t * **Note:** When a `ui5-bar` is used in the header, you should remove the default dialog's paddings.\n\t *\n\t * **Note:** If `header` slot is provided, the labelling of the dialog is a responsibility of the application developer.\n\t * `accessibleName` should be used.\n\t * @public\n\t */\n\t@slot()\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the footer HTML Element.\n\t *\n\t * **Note:** When a `ui5-bar` is used in the footer, you should remove the default dialog's paddings.\n\t * @public\n\t */\n\t@slot()\n\tfooter!: Array<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._screenResizeHandler = this._screenResize.bind(this);\n\n\t\tthis._dragMouseMoveHandler = this._onDragMouseMove.bind(this);\n\t\tthis._dragMouseUpHandler = this._onDragMouseUp.bind(this);\n\n\t\tthis._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);\n\t\tthis._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);\n\n\t\tthis._dragStartHandler = this._handleDragStart.bind(this);\n\t}\n\n\tstatic _isHeader(element: HTMLElement) {\n\t\treturn element.classList.contains(\"ui5-popup-header-root\") || element.getAttribute(\"slot\") === \"header\";\n\t}\n\n\tget isModal() {\n\t\treturn true;\n\t}\n\n\tget _ariaLabelledBy() {\n\t\tlet ariaLabelledById;\n\n\t\tif (this.headerText && !this._ariaLabel) {\n\t\t\tariaLabelledById = \"ui5-popup-header-text\";\n\t\t}\n\n\t\treturn ariaLabelledById;\n\t}\n\n\tget ariaRoleDescriptionHeaderText() {\n\t\treturn (this.resizable || this.draggable) ? Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_ROLE_DESCRIPTION) : undefined;\n\t}\n\n\tget effectiveAriaDescribedBy() {\n\t\treturn (this.resizable || this.draggable) ? `${this._id}-descr` : undefined;\n\t}\n\n\tget ariaDescribedByHeaderTextResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE);\n\t}\n\n\tget ariaDescribedByHeaderTextDraggable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE);\n\t}\n\n\tget ariaDescribedByHeaderTextDraggableAndResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE);\n\t}\n\n\t/**\n\t * Determines if the header should be shown.\n\t */\n\tget _displayHeader() {\n\t\treturn this.header.length || this.headerText || this.draggable || this.resizable;\n\t}\n\n\tget _movable() {\n\t\treturn !this.stretch && this.onDesktop && (this.draggable || this.resizable);\n\t}\n\n\tget _headerTabIndex() {\n\t\treturn this._movable ? \"0\" : undefined;\n\t}\n\n\tget _showResizeHandle() {\n\t\treturn this.resizable && this.onDesktop;\n\t}\n\n\tget _minHeight() {\n\t\tlet minHeight = Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);\n\n\t\tconst header = this._root.querySelector<HTMLElement>(\".ui5-popup-header-root\");\n\t\tif (header) {\n\t\t\tminHeight += header.offsetHeight;\n\t\t}\n\n\t\tconst footer = this._root.querySelector<HTMLElement>(\".ui5-popup-footer-root\");\n\t\tif (footer) {\n\t\t\tminHeight += footer.offsetHeight;\n\t\t}\n\n\t\treturn minHeight;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.state !== ValueState.None;\n\t}\n\n\tget _dialogStateIcon() {\n\t\treturn ICON_PER_STATE[this.state as ValueStateWithIcon];\n\t}\n\n\tget _role(): string | undefined {\n\t\tif (this.accessibleRole === PopupAccessibleRole.None) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (this.state === ValueState.Negative || this.state === ValueState.Critical) {\n\t\t\treturn PopupAccessibleRole.AlertDialog.toLowerCase();\n\t\t}\n\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\t_show() {\n\t\tsuper._show();\n\t\tthis._center();\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\n\t\tthis._isRTL = this.effectiveDir === \"rtl\";\n\t}\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tthis._attachScreenResizeHandler();\n\n\t\tthis.addEventListener(\"dragstart\", this._dragStartHandler);\n\t}\n\n\tonExitDOM() {\n\t\tsuper.onExitDOM();\n\t\tthis._detachScreenResizeHandler();\n\n\t\tthis.removeEventListener(\"dragstart\", this._dragStartHandler);\n\t}\n\n\t/**\n\t * @override\n\t */\n\t_resize() {\n\t\tsuper._resize();\n\n\t\tif (!this._draggedOrResized) {\n\t\t\tthis._center();\n\t\t}\n\t}\n\n\t_screenResize() {\n\t\tthis._center();\n\t}\n\n\t_attachScreenResizeHandler() {\n\t\tif (!this._screenResizeHandlerAttached) {\n\t\t\twindow.addEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = true;\n\t\t}\n\t}\n\n\t_detachScreenResizeHandler() {\n\t\tif (this._screenResizeHandlerAttached) {\n\t\t\twindow.removeEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = false; // prevent dialog from repositioning during resizing\n\t\t}\n\t}\n\n\t_center() {\n\t\tconst height = window.innerHeight - this.offsetHeight,\n\t\t\twidth = window.innerWidth - this.offsetWidth;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${Math.round(height / 2)}px`,\n\t\t\tleft: `${Math.round(width / 2)}px`,\n\t\t});\n\t}\n\n\t_revertSize = () => {\n\t\tObject.assign(this.style, {\n\t\t\ttop: \"\",\n\t\t\tleft: \"\",\n\t\t\twidth: \"\",\n\t\t\theight: \"\",\n\t\t});\n\t}\n\n\t/**\n\t * Event handlers\n\t */\n\t_onDragMouseDown(e: DragEvent) {\n\t\t// allow dragging only on the header\n\t\tif (!this._movable || !this.draggable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t} = window.getComputedStyle(this);\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t\twidth: `${Math.round(Number.parseFloat(width) * 100) / 100}px`,\n\t\t\theight: `${Math.round(Number.parseFloat(height) * 100) / 100}px`,\n\t\t});\n\n\t\tthis._x = e.clientX;\n\t\tthis._y = e.clientY;\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseDragHandlers();\n\t}\n\n\t_onDragMouseMove(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tconst { clientX, clientY } = e;\n\t\tconst calcX = this._x! - clientX;\n\t\tconst calcY = this._y! - clientY;\n\t\tconst {\n\t\t\tleft,\n\t\t\ttop,\n\t\t} = this.getBoundingClientRect();\n\n\t\tObject.assign(this.style, {\n\t\t\tleft: `${Math.floor(left - calcX)}px`,\n\t\t\ttop: `${Math.floor(top - calcY)}px`,\n\t\t});\n\n\t\tthis._x = clientX;\n\t\tthis._y = clientY;\n\t}\n\n\t_onDragMouseUp() {\n\t\tdelete this._x;\n\t\tdelete this._y;\n\n\t\tthis._detachMouseDragHandlers();\n\t}\n\n\t_onDragOrResizeKeyDown(e: KeyboardEvent) {\n\t\tif (!this._movable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.draggable && [isUp, isDown, isLeft, isRight].some(key => key(e))) {\n\t\t\tthis._dragWithEvent(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.resizable && [isUpShift, isDownShift, isLeftShift, isRightShift].some(key => key(e))) {\n\t\t\tthis._resizeWithEvent(e);\n\t\t}\n\t}\n\n\t_dragWithEvent(e: KeyboardEvent) {\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t\twidth,\n\t\t\theight,\n\t\t} = this.getBoundingClientRect();\n\n\t\tlet newPos = 0;\n\t\tlet posDirection: \"top\" | \"left\" = \"top\";\n\n\t\tswitch (true) {\n\t\tcase isUp(e):\n\t\t\tnewPos = top - STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isDown(e):\n\t\t\tnewPos = top + STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isLeft(e):\n\t\t\tnewPos = left - STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\tcase isRight(e):\n\t\t\tnewPos = left + STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\t}\n\n\t\tnewPos = clamp(\n\t\t\tnewPos,\n\t\t\t0,\n\t\t\tposDirection === \"left\" ? window.innerWidth - width : window.innerHeight - height,\n\t\t);\n\n\t\tthis.style[posDirection] = `${newPos}px`;\n\t}\n\n\t_resizeWithEvent(e: KeyboardEvent) {\n\t\tthis._draggedOrResized = true;\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\n\t\tconst { top, left } = this.getBoundingClientRect(),\n\t\t\tstyle = window.getComputedStyle(this),\n\t\t\tminWidth = Number.parseFloat(style.minWidth),\n\t\t\tmaxWidth = window.innerWidth - left,\n\t\t\tmaxHeight = window.innerHeight - top;\n\n\t\tlet width = Number.parseFloat(style.width),\n\t\t\theight = Number.parseFloat(style.height);\n\n\t\tswitch (true) {\n\t\tcase isUpShift(e):\n\t\t\theight -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isDownShift(e):\n\t\t\theight += STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isLeftShift(e):\n\t\t\twidth -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isRightShift(e):\n\t\t\twidth += STEP_SIZE;\n\t\t\tbreak;\n\t\t}\n\n\t\twidth = clamp(width, minWidth, maxWidth);\n\t\theight = clamp(height, this._minHeight, maxHeight);\n\n\t\tObject.assign(this.style, {\n\t\t\twidth: `${width}px`,\n\t\t\theight: `${height}px`,\n\t\t});\n\t}\n\n\t_attachMouseDragHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_detachMouseDragHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_onResizeMouseDown(e: MouseEvent) {\n\t\tif (!this._movable || !this.resizable) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tminWidth,\n\t\t} = window.getComputedStyle(this);\n\n\t\tthis._initialX = e.clientX;\n\t\tthis._initialY = e.clientY;\n\t\tthis._initialWidth = Number.parseFloat(width);\n\t\tthis._initialHeight = Number.parseFloat(height);\n\t\tthis._initialTop = top;\n\t\tthis._initialLeft = left;\n\t\tthis._minWidth = Number.parseFloat(minWidth);\n\t\tthis._cachedMinHeight = this._minHeight;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t});\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseResizeHandlers();\n\t}\n\n\t_onResizeMouseMove(e: MouseEvent) {\n\t\tconst { clientX, clientY } = e;\n\n\t\tlet newWidth,\n\t\t\tnewLeft;\n\n\t\tif (this._isRTL) {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! - (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\tthis._initialLeft! + this._initialWidth!,\n\t\t\t);\n\n\t\t\tnewLeft = clamp(\n\t\t\t\tthis._initialLeft! + (clientX - this._initialX!),\n\t\t\t\t0,\n\t\t\t\tthis._initialX! + this._initialWidth! - this._minWidth!,\n\t\t\t);\n\t\t} else {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! + (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\twindow.innerWidth - this._initialLeft!,\n\t\t\t);\n\t\t}\n\n\t\tconst newHeight = clamp(\n\t\t\tthis._initialHeight! + (clientY - this._initialY!),\n\t\t\tthis._cachedMinHeight!,\n\t\t\twindow.innerHeight - this._initialTop!,\n\t\t);\n\n\t\tObject.assign(this.style, {\n\t\t\theight: `${newHeight}px`,\n\t\t\twidth: `${newWidth}px`,\n\t\t\tleft: newLeft ? `${newLeft}px` : undefined,\n\t\t});\n\t}\n\n\t_onResizeMouseUp() {\n\t\tdelete this._initialX;\n\t\tdelete this._initialY;\n\t\tdelete this._initialWidth;\n\t\tdelete this._initialHeight;\n\t\tdelete this._initialTop;\n\t\tdelete this._initialLeft;\n\t\tdelete this._minWidth;\n\t\tdelete this._cachedMinHeight;\n\n\t\tthis._detachMouseResizeHandlers();\n\t}\n\n\t_handleDragStart(e: DragEvent) {\n\t\tif (this.draggable) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_attachMouseResizeHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\t}\n\n\t_detachMouseResizeHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n}\n\nDialog.define();\n\nexport default Dialog;\nexport type {\n\tDialogBeforeCloseEventDetail,\n};\n"]}
|
package/dist/FileUploader.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ type FileUploaderChangeEventDetail = {
|
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
41
|
declare class FileUploader extends UI5Element implements IFormInputElement {
|
|
42
|
+
eventDetails: {
|
|
43
|
+
"change": FileUploaderChangeEventDetail;
|
|
44
|
+
"file-size-exceed": FileUploaderFileSizeExceedEventDetail;
|
|
45
|
+
};
|
|
42
46
|
/**
|
|
43
47
|
* Comma-separated list of file types that the component should accept.
|
|
44
48
|
*
|
package/dist/FileUploader.js
CHANGED
|
@@ -8,7 +8,7 @@ var FileUploader_1;
|
|
|
8
8
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
9
9
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
10
10
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
11
|
-
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
11
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
12
12
|
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
13
13
|
import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
|
|
14
14
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
@@ -395,12 +395,6 @@ FileUploader = FileUploader_1 = __decorate([
|
|
|
395
395
|
*/
|
|
396
396
|
,
|
|
397
397
|
event("change", {
|
|
398
|
-
detail: {
|
|
399
|
-
/**
|
|
400
|
-
* @public
|
|
401
|
-
*/
|
|
402
|
-
files: { type: FileList },
|
|
403
|
-
},
|
|
404
398
|
bubbles: true,
|
|
405
399
|
})
|
|
406
400
|
/**
|
|
@@ -411,12 +405,6 @@ FileUploader = FileUploader_1 = __decorate([
|
|
|
411
405
|
*/
|
|
412
406
|
,
|
|
413
407
|
event("file-size-exceed", {
|
|
414
|
-
detail: {
|
|
415
|
-
/**
|
|
416
|
-
* @public
|
|
417
|
-
*/
|
|
418
|
-
filesData: { type: (Array) },
|
|
419
|
-
},
|
|
420
408
|
bubbles: true,
|
|
421
409
|
})
|
|
422
410
|
], FileUploader);
|
package/dist/FileUploader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploader.js","sourceRoot":"","sources":["../src/FileUploader.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,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,GACnB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,WAAW;AACX,OAAO,oBAAoB,MAAM,mDAAmD,CAAC;AAErF,SAAS;AACT,OAAO,eAAe,MAAM,wCAAwC,CAAC;AACrE,OAAO,0BAA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,CAAC;6CAChB;AAa7B;IADC,IAAI,EAAE;uDACgC;AAKhC;IADN,IAAI,CAAC,oBAAoB,CAAC;sCACG;AAlHzB,YAAY;IAhDjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE;YACP,eAAe;YACf,0BAA0B;YAC1B,oBAAoB;SACpB;QACD,QAAQ,EAAE,oBAAoB;QAC9B,YAAY,EAAE;YACb,KAAK;YACL,OAAO;YACP,IAAI;SACJ;KACD,CAAC;IACF;;;;;;OAMG;;IACF,KAAK,CAAgC,QAAQ,EAAE;QAC/C,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACzB;QACD,OAAO,EAAE,IAAI;KACb,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAwC,kBAAkB,EAAE;QACjE,MAAM,EAAE;YACP;;eAEG;YACH,SAAS,EAAE,EAAE,IAAI,EAAE,CAAA,KAAe,CAAA,EAAE;SACpC;QACD,OAAO,EAAE,IAAI;KACb,CAAC;GACI,YAAY,CAqZjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,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 ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tFILEUPLOAD_BROWSE,\n\tFILEUPLOADER_TITLE,\n\tVALUE_STATE_SUCCESS,\n\tVALUE_STATE_INFORMATION,\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport Input from \"./Input.js\";\nimport Popover from \"./Popover.js\";\nimport Icon from \"./Icon.js\";\n\n// Template\nimport FileUploaderTemplate from \"./generated/templates/FileUploaderTemplate.lit.js\";\n\n// Styles\nimport FileUploaderCss from \"./generated/themes/FileUploader.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport ValueStateMessageCss from \"./generated/themes/ValueStateMessage.css.js\";\n\nconst convertBytesToMegabytes = (bytes: number) => (bytes / 1024) / 1024;\n\ntype FileData = {\n\tfileName: string,\n\tfileSize: number,\n}\n\ntype FileUploaderFileSizeExceedEventDetail = {\n\tfilesData: Array<FileData>,\n}\n\ntype FileUploaderChangeEventDetail = {\n\tfiles: FileList | null,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-file-uploader` opens a file explorer dialog and enables users to upload files.\n * The component consists of input field, but you can provide an HTML element by your choice\n * to trigger the file upload, by using the default slot.\n * Furthermore, you can set the property \"hideInput\" to \"true\" to hide the input field.\n *\n * To get all selected files, you can simply use the read-only \"files\" property.\n * To restrict the types of files the user can select, you can use the \"accept\" property.\n *\n * And, similar to all input based components, the FileUploader supports \"valueState\", \"placeholder\", \"name\", and \"disabled\" properties.\n *\n * For the `ui5-file-uploader`\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/FileUploader.js\";`\n * @constructor\n * @since 1.0.0-rc.6\n * @extends UI5Element\n * @public\n */\n@customElement({\n\ttag: \"ui5-file-uploader\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\trenderer: litRender,\n\tstyles: [\n\t\tFileUploaderCss,\n\t\tResponsivePopoverCommonCss,\n\t\tValueStateMessageCss,\n\t],\n\ttemplate: FileUploaderTemplate,\n\tdependencies: [\n\t\tInput,\n\t\tPopover,\n\t\tIcon,\n\t],\n})\n/**\n * Event is fired when the value of the file path has been changed.\n *\n * **Note:** Keep in mind that because of the HTML input element of type file, the event is also fired in Chrome browser when the Cancel button of the uploads window is pressed.\n * @param {FileList | null} files The current files.\n * @public\n */\n@event<FileUploaderChangeEventDetail>(\"change\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tfiles: { type: FileList },\n\t},\n\tbubbles: true,\n})\n/**\n * Event is fired when the size of a file is above the `maxFileSize` property value.\n * @param {Array<FileData>} filesData An array of `FileData` objects containing the`fileName` and `fileSize` in MB of each file that exceeds the upload limit.\n * @since 2.2.0\n * @public\n */\n@event<FileUploaderFileSizeExceedEventDetail>(\"file-size-exceed\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tfilesData: { type: Array<FileData> },\n\t},\n\tbubbles: true,\n})\nclass FileUploader extends UI5Element implements IFormInputElement {\n\t/**\n\t * Comma-separated list of file types that the component should accept.\n\t *\n\t * **Note:** Please make sure you are adding the `.` in front on the file type, e.g. `.png` in case you want to accept png's only.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccept?: string;\n\n\t/**\n\t * If set to \"true\", the input field of component will not be rendered. Only the default slot that is passed will be rendered.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideInput = false;\n\n\t/**\n\t * Defines whether the component is in disabled state.\n\t *\n\t * **Note:** A disabled component is completely noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Allows multiple files to be chosen.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tmultiple = false;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines a short hint intended to aid the user with data entry when the component has no value.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tplaceholder?: string;\n\n\t/**\n\t * Defines the name/names of the file/files to upload.\n\t * @default \"\"\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\";\n\n\t/**\n\t * Defines the maximum file size in megabytes which prevents the upload if at least one file exceeds it.\n\t * @default undefined\n\t * @since 2.2.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmaxFileSize?: number;\n\n\t/**\n\t * Defines the value state of the component.\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t/**\n\t * By default the component contains a single input field. With this slot you can pass any content that you wish to add. See the samples for more information.\n\t *\n\t * **Note:** If no content is provided in this slot, the component will only consist of an input field and will not be interactable using the keyboard.\n\t * Also it is not recommended to use any non-interactable components, as it may lead to poor accessibility experience.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the component is in `Information`, `Critical` or `Negative` value state.\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@slot()\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\tstatic emptyInput: HTMLInputElement;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this.content[0];\n\t}\n\n\tget formFormattedValue() {\n\t\tif (this.files && this.name) {\n\t\t\tconst formData = new FormData();\n\n\t\t\tfor (let i = 0; i < this.files.length; i++) {\n\t\t\t\tformData.append(this.name, this.files[i]);\n\t\t\t}\n\n\t\t\treturn formData;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t_onmouseover() {\n\t\tthis.content.forEach(item => {\n\t\t\titem.classList.add(\"ui5_hovered\");\n\t\t});\n\t}\n\n\t_onmouseout() {\n\t\tthis.content.forEach(item => {\n\t\t\titem.classList.remove(\"ui5_hovered\");\n\t\t});\n\t}\n\n\t_onclick() {\n\t\tif (this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\tthis._input.click();\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._input.click();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._input.click();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_ondrag(e: DragEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\n\t_ondrop(e: DragEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tconst files = e.dataTransfer?.files;\n\n\t\tif (!files) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst validatedFiles = this._validateFiles(files);\n\n\t\tif (!this.value && !validatedFiles.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._input.files = validatedFiles;\n\t\tthis._updateValue(validatedFiles);\n\t\tthis.fireDecoratorEvent<FileUploaderChangeEventDetail>(\"change\", {\n\t\t\tfiles: validatedFiles,\n\t\t});\n\t}\n\n\t_onfocusin() {\n\t\tthis.focused = true;\n\t}\n\n\t_onfocusout() {\n\t\tthis.focused = false;\n\t}\n\n\t/**\n\t * FileList of all selected files.\n\t * @public\n\t * @default null\n\t */\n\tget files(): FileList | null {\n\t\tif (this._input) {\n\t\t\treturn this._input.files;\n\t\t}\n\n\t\treturn FileUploader._emptyFilesList;\n\t}\n\n\tonAfterRendering() {\n\t\tif (!this.value) {\n\t\t\tthis._input.value = \"\";\n\t\t}\n\n\t\tthis.toggleValueStatePopover(this.shouldOpenValueStateMessagePopover);\n\t}\n\n\t_onChange(e: Event) {\n\t\tlet changedFiles = (e.target as HTMLInputElement).files;\n\n\t\tif (changedFiles) {\n\t\t\tchangedFiles = this._validateFiles(changedFiles);\n\t\t}\n\n\t\tif (!this.value && !changedFiles?.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._updateValue(changedFiles);\n\t\tthis.fireDecoratorEvent<FileUploaderChangeEventDetail>(\"change\", {\n\t\t\tfiles: changedFiles,\n\t\t});\n\t}\n\n\t_updateValue(files: FileList | null) {\n\t\tthis.value = Array.from(files || []).reduce((acc, currFile) => {\n\t\t\treturn `${acc}\"${currFile.name}\" `;\n\t\t}, \"\");\n\t}\n\n\t/**\n\t * Checks whether all files are below `maxFileSize` (if set),\n\t * and fires a `file-size-exceed` event if any file exceeds it.\n\t * @private\n\t */\n\t_validateFiles(changedFiles: FileList): FileList {\n\t\tconst exceededFilesData = this.maxFileSize ? this._getExceededFiles(changedFiles) : [];\n\n\t\tif (exceededFilesData.length) {\n\t\t\tthis.fireDecoratorEvent<FileUploaderFileSizeExceedEventDetail>(\"file-size-exceed\", {\n\t\t\t\tfilesData: exceededFilesData,\n\t\t\t});\n\t\t\tchangedFiles = new DataTransfer().files;\n\t\t}\n\n\t\treturn changedFiles;\n\t}\n\n\t_getExceededFiles(files: FileList): Array<FileData> {\n\t\tconst filesArray = Array.from(files);\n\t\tconst exceededFiles: Array<FileData> = [];\n\n\t\tfor (let i = 0; i < filesArray.length; i++) {\n\t\t\tconst fileSize = convertBytesToMegabytes(filesArray[i].size);\n\t\t\tif (fileSize > this.maxFileSize!) {\n\t\t\t\texceededFiles.push({\n\t\t\t\t\tfileName: filesArray[i].name,\n\t\t\t\t\tfileSize,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn exceededFiles;\n\t}\n\n\ttoggleValueStatePopover(open: boolean) {\n\t\tif (open) {\n\t\t\tthis.openValueStatePopover();\n\t\t} else {\n\t\t\tthis.closeValueStatePopover();\n\t\t}\n\t}\n\n\topenValueStatePopover() {\n\t\tconst popover = this._getPopover();\n\n\t\tif (popover) {\n\t\t\tpopover.opener = this;\n\t\t\tpopover.open = true;\n\t\t}\n\t}\n\n\tcloseValueStatePopover() {\n\t\tconst popover = this._getPopover();\n\n\t\tif (popover) {\n\t\t\tpopover.open = false;\n\t\t}\n\t}\n\n\t_getPopover(): Popover {\n\t\treturn this.shadowRoot!.querySelector<Popover>(\".ui5-valuestatemessage-popover\")!;\n\t}\n\n\t/**\n\t * in case when the component is not placed in the DOM, return empty FileList, like native input would do\n\t * @private\n\t */\n\tstatic get _emptyFilesList() {\n\t\tif (!this.emptyInput) {\n\t\t\tthis.emptyInput = document.createElement(\"input\");\n\t\t\tthis.emptyInput.type = \"file\";\n\t\t}\n\t\treturn this.emptyInput.files;\n\t}\n\n\tget browseText(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOAD_BROWSE);\n\t}\n\n\tget titleText(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOADER_TITLE);\n\t}\n\n\tget _input(): HTMLInputElement {\n\t\treturn (this.shadowRoot!.querySelector<HTMLInputElement>(\"input[type=file]\") || this.querySelector<HTMLInputElement>(\"input[type=file][data-ui5-form-support]\"))!;\n\t}\n\n\tget valueStateTextMappings(): Record<string, string> {\n\t\treturn {\n\t\t\t\"Positive\": FileUploader.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t\t\"Information\": FileUploader.i18nBundle.getText(VALUE_STATE_INFORMATION),\n\t\t\t\"Negative\": FileUploader.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Critical\": FileUploader.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t};\n\t}\n\n\tget valueStateText(): string {\n\t\treturn this.valueStateTextMappings[this.valueState];\n\t}\n\n\tget hasValueState(): boolean {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget hasValueStateText(): boolean {\n\t\treturn this.hasValueState && this.valueState !== ValueState.Positive;\n\t}\n\n\tget shouldDisplayDefaultValueStateMessage(): boolean {\n\t\treturn !this.valueStateMessage.length && this.hasValueStateText;\n\t}\n\n\tget shouldOpenValueStateMessagePopover(): boolean {\n\t\treturn this.focused && this.hasValueStateText && !this.hideInput;\n\t}\n\n\t/**\n\t * This method is relevant for sap_horizon theme only\n\t */\n\tget _valueStateMessageInputIcon(): string {\n\t\tconst iconPerValueState = {\n\t\t\tNegative: \"error\",\n\t\t\tCritical: \"alert\",\n\t\t\tPositive: \"sys-enter-2\",\n\t\t\tInformation: \"information\",\n\t\t};\n\n\t\treturn this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : \"\";\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tpopoverValueState: {\n\t\t\t\t\"ui5-valuestatemessage-root\": true,\n\t\t\t\t\"ui5-valuestatemessage--success\": this.valueState === ValueState.Positive,\n\t\t\t\t\"ui5-valuestatemessage--error\": this.valueState === ValueState.Negative,\n\t\t\t\t\"ui5-valuestatemessage--warning\": this.valueState === ValueState.Critical,\n\t\t\t\t\"ui5-valuestatemessage--information\": this.valueState === ValueState.Information,\n\t\t\t},\n\t\t};\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tpopoverHeader: {\n\t\t\t\t\"width\": `${this.ui5Input ? this.ui5Input.offsetWidth : 0}px`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget ui5Input() {\n\t\treturn this.shadowRoot!.querySelector<Input>(\".ui5-file-uploader-input\");\n\t}\n}\n\nFileUploader.define();\n\nexport default FileUploader;\nexport type {\n\tFileData,\n\tFileUploaderChangeEventDetail,\n\tFileUploaderFileSizeExceedEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"FileUploader.js","sourceRoot":"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AC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,kBAAkB,EAAE;QAC1B,OAAO,EAAE,IAAI;KACb,CAAC;GACI,YAAY,CAyZjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,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-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tFILEUPLOAD_BROWSE,\n\tFILEUPLOADER_TITLE,\n\tVALUE_STATE_SUCCESS,\n\tVALUE_STATE_INFORMATION,\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport Input from \"./Input.js\";\nimport Popover from \"./Popover.js\";\nimport Icon from \"./Icon.js\";\n\n// Template\nimport FileUploaderTemplate from \"./generated/templates/FileUploaderTemplate.lit.js\";\n\n// Styles\nimport FileUploaderCss from \"./generated/themes/FileUploader.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport ValueStateMessageCss from \"./generated/themes/ValueStateMessage.css.js\";\n\nconst convertBytesToMegabytes = (bytes: number) => (bytes / 1024) / 1024;\n\ntype FileData = {\n\tfileName: string,\n\tfileSize: number,\n}\n\ntype FileUploaderFileSizeExceedEventDetail = {\n\tfilesData: Array<FileData>,\n}\n\ntype FileUploaderChangeEventDetail = {\n\tfiles: FileList | null,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-file-uploader` opens a file explorer dialog and enables users to upload files.\n * The component consists of input field, but you can provide an HTML element by your choice\n * to trigger the file upload, by using the default slot.\n * Furthermore, you can set the property \"hideInput\" to \"true\" to hide the input field.\n *\n * To get all selected files, you can simply use the read-only \"files\" property.\n * To restrict the types of files the user can select, you can use the \"accept\" property.\n *\n * And, similar to all input based components, the FileUploader supports \"valueState\", \"placeholder\", \"name\", and \"disabled\" properties.\n *\n * For the `ui5-file-uploader`\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/FileUploader.js\";`\n * @constructor\n * @since 1.0.0-rc.6\n * @extends UI5Element\n * @public\n */\n@customElement({\n\ttag: \"ui5-file-uploader\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\trenderer: litRender,\n\tstyles: [\n\t\tFileUploaderCss,\n\t\tResponsivePopoverCommonCss,\n\t\tValueStateMessageCss,\n\t],\n\ttemplate: FileUploaderTemplate,\n\tdependencies: [\n\t\tInput,\n\t\tPopover,\n\t\tIcon,\n\t],\n})\n/**\n * Event is fired when the value of the file path has been changed.\n *\n * **Note:** Keep in mind that because of the HTML input element of type file, the event is also fired in Chrome browser when the Cancel button of the uploads window is pressed.\n * @param {FileList | null} files The current files.\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n/**\n * Event is fired when the size of a file is above the `maxFileSize` property value.\n * @param {Array<FileData>} filesData An array of `FileData` objects containing the`fileName` and `fileSize` in MB of each file that exceeds the upload limit.\n * @since 2.2.0\n * @public\n */\n@event(\"file-size-exceed\", {\n\tbubbles: true,\n})\nclass FileUploader extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\t\"change\": FileUploaderChangeEventDetail,\n\t\t\"file-size-exceed\": FileUploaderFileSizeExceedEventDetail,\n\t}\n\t/**\n\t * Comma-separated list of file types that the component should accept.\n\t *\n\t * **Note:** Please make sure you are adding the `.` in front on the file type, e.g. `.png` in case you want to accept png's only.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccept?: string;\n\n\t/**\n\t * If set to \"true\", the input field of component will not be rendered. Only the default slot that is passed will be rendered.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideInput = false;\n\n\t/**\n\t * Defines whether the component is in disabled state.\n\t *\n\t * **Note:** A disabled component is completely noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Allows multiple files to be chosen.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tmultiple = false;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines a short hint intended to aid the user with data entry when the component has no value.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tplaceholder?: string;\n\n\t/**\n\t * Defines the name/names of the file/files to upload.\n\t * @default \"\"\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\";\n\n\t/**\n\t * Defines the maximum file size in megabytes which prevents the upload if at least one file exceeds it.\n\t * @default undefined\n\t * @since 2.2.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmaxFileSize?: number;\n\n\t/**\n\t * Defines the value state of the component.\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t/**\n\t * By default the component contains a single input field. With this slot you can pass any content that you wish to add. See the samples for more information.\n\t *\n\t * **Note:** If no content is provided in this slot, the component will only consist of an input field and will not be interactable using the keyboard.\n\t * Also it is not recommended to use any non-interactable components, as it may lead to poor accessibility experience.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the component is in `Information`, `Critical` or `Negative` value state.\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@slot()\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\tstatic emptyInput: HTMLInputElement;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this.content[0];\n\t}\n\n\tget formFormattedValue() {\n\t\tif (this.files && this.name) {\n\t\t\tconst formData = new FormData();\n\n\t\t\tfor (let i = 0; i < this.files.length; i++) {\n\t\t\t\tformData.append(this.name, this.files[i]);\n\t\t\t}\n\n\t\t\treturn formData;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t_onmouseover() {\n\t\tthis.content.forEach(item => {\n\t\t\titem.classList.add(\"ui5_hovered\");\n\t\t});\n\t}\n\n\t_onmouseout() {\n\t\tthis.content.forEach(item => {\n\t\t\titem.classList.remove(\"ui5_hovered\");\n\t\t});\n\t}\n\n\t_onclick() {\n\t\tif (this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\tthis._input.click();\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._input.click();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._input.click();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_ondrag(e: DragEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\n\t_ondrop(e: DragEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tconst files = e.dataTransfer?.files;\n\n\t\tif (!files) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst validatedFiles = this._validateFiles(files);\n\n\t\tif (!this.value && !validatedFiles.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._input.files = validatedFiles;\n\t\tthis._updateValue(validatedFiles);\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\tfiles: validatedFiles,\n\t\t});\n\t}\n\n\t_onfocusin() {\n\t\tthis.focused = true;\n\t}\n\n\t_onfocusout() {\n\t\tthis.focused = false;\n\t}\n\n\t/**\n\t * FileList of all selected files.\n\t * @public\n\t * @default null\n\t */\n\tget files(): FileList | null {\n\t\tif (this._input) {\n\t\t\treturn this._input.files;\n\t\t}\n\n\t\treturn FileUploader._emptyFilesList;\n\t}\n\n\tonAfterRendering() {\n\t\tif (!this.value) {\n\t\t\tthis._input.value = \"\";\n\t\t}\n\n\t\tthis.toggleValueStatePopover(this.shouldOpenValueStateMessagePopover);\n\t}\n\n\t_onChange(e: Event) {\n\t\tlet changedFiles = (e.target as HTMLInputElement).files;\n\n\t\tif (changedFiles) {\n\t\t\tchangedFiles = this._validateFiles(changedFiles);\n\t\t}\n\n\t\tif (!this.value && !changedFiles?.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._updateValue(changedFiles);\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\tfiles: changedFiles,\n\t\t});\n\t}\n\n\t_updateValue(files: FileList | null) {\n\t\tthis.value = Array.from(files || []).reduce((acc, currFile) => {\n\t\t\treturn `${acc}\"${currFile.name}\" `;\n\t\t}, \"\");\n\t}\n\n\t/**\n\t * Checks whether all files are below `maxFileSize` (if set),\n\t * and fires a `file-size-exceed` event if any file exceeds it.\n\t * @private\n\t */\n\t_validateFiles(changedFiles: FileList): FileList {\n\t\tconst exceededFilesData = this.maxFileSize ? this._getExceededFiles(changedFiles) : [];\n\n\t\tif (exceededFilesData.length) {\n\t\t\tthis.fireDecoratorEvent(\"file-size-exceed\", {\n\t\t\t\tfilesData: exceededFilesData,\n\t\t\t});\n\t\t\tchangedFiles = new DataTransfer().files;\n\t\t}\n\n\t\treturn changedFiles;\n\t}\n\n\t_getExceededFiles(files: FileList): Array<FileData> {\n\t\tconst filesArray = Array.from(files);\n\t\tconst exceededFiles: Array<FileData> = [];\n\n\t\tfor (let i = 0; i < filesArray.length; i++) {\n\t\t\tconst fileSize = convertBytesToMegabytes(filesArray[i].size);\n\t\t\tif (fileSize > this.maxFileSize!) {\n\t\t\t\texceededFiles.push({\n\t\t\t\t\tfileName: filesArray[i].name,\n\t\t\t\t\tfileSize,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn exceededFiles;\n\t}\n\n\ttoggleValueStatePopover(open: boolean) {\n\t\tif (open) {\n\t\t\tthis.openValueStatePopover();\n\t\t} else {\n\t\t\tthis.closeValueStatePopover();\n\t\t}\n\t}\n\n\topenValueStatePopover() {\n\t\tconst popover = this._getPopover();\n\n\t\tif (popover) {\n\t\t\tpopover.opener = this;\n\t\t\tpopover.open = true;\n\t\t}\n\t}\n\n\tcloseValueStatePopover() {\n\t\tconst popover = this._getPopover();\n\n\t\tif (popover) {\n\t\t\tpopover.open = false;\n\t\t}\n\t}\n\n\t_getPopover(): Popover {\n\t\treturn this.shadowRoot!.querySelector<Popover>(\".ui5-valuestatemessage-popover\")!;\n\t}\n\n\t/**\n\t * in case when the component is not placed in the DOM, return empty FileList, like native input would do\n\t * @private\n\t */\n\tstatic get _emptyFilesList() {\n\t\tif (!this.emptyInput) {\n\t\t\tthis.emptyInput = document.createElement(\"input\");\n\t\t\tthis.emptyInput.type = \"file\";\n\t\t}\n\t\treturn this.emptyInput.files;\n\t}\n\n\tget browseText(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOAD_BROWSE);\n\t}\n\n\tget titleText(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOADER_TITLE);\n\t}\n\n\tget _input(): HTMLInputElement {\n\t\treturn (this.shadowRoot!.querySelector<HTMLInputElement>(\"input[type=file]\") || this.querySelector<HTMLInputElement>(\"input[type=file][data-ui5-form-support]\"))!;\n\t}\n\n\tget valueStateTextMappings(): Record<string, string> {\n\t\treturn {\n\t\t\t\"Positive\": FileUploader.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t\t\"Information\": FileUploader.i18nBundle.getText(VALUE_STATE_INFORMATION),\n\t\t\t\"Negative\": FileUploader.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Critical\": FileUploader.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t};\n\t}\n\n\tget valueStateText(): string {\n\t\treturn this.valueStateTextMappings[this.valueState];\n\t}\n\n\tget hasValueState(): boolean {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget hasValueStateText(): boolean {\n\t\treturn this.hasValueState && this.valueState !== ValueState.Positive;\n\t}\n\n\tget shouldDisplayDefaultValueStateMessage(): boolean {\n\t\treturn !this.valueStateMessage.length && this.hasValueStateText;\n\t}\n\n\tget shouldOpenValueStateMessagePopover(): boolean {\n\t\treturn this.focused && this.hasValueStateText && !this.hideInput;\n\t}\n\n\t/**\n\t * This method is relevant for sap_horizon theme only\n\t */\n\tget _valueStateMessageInputIcon(): string {\n\t\tconst iconPerValueState = {\n\t\t\tNegative: \"error\",\n\t\t\tCritical: \"alert\",\n\t\t\tPositive: \"sys-enter-2\",\n\t\t\tInformation: \"information\",\n\t\t};\n\n\t\treturn this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : \"\";\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tpopoverValueState: {\n\t\t\t\t\"ui5-valuestatemessage-root\": true,\n\t\t\t\t\"ui5-valuestatemessage--success\": this.valueState === ValueState.Positive,\n\t\t\t\t\"ui5-valuestatemessage--error\": this.valueState === ValueState.Negative,\n\t\t\t\t\"ui5-valuestatemessage--warning\": this.valueState === ValueState.Critical,\n\t\t\t\t\"ui5-valuestatemessage--information\": this.valueState === ValueState.Information,\n\t\t\t},\n\t\t};\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tpopoverHeader: {\n\t\t\t\t\"width\": `${this.ui5Input ? this.ui5Input.offsetWidth : 0}px`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget ui5Input() {\n\t\treturn this.shadowRoot!.querySelector<Input>(\".ui5-file-uploader-input\");\n\t}\n}\n\nFileUploader.define();\n\nexport default FileUploader;\nexport type {\n\tFileData,\n\tFileUploaderChangeEventDetail,\n\tFileUploaderFileSizeExceedEventDetail,\n};\n"]}
|
package/dist/Icon.d.ts
CHANGED
package/dist/Icon.js
CHANGED
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
8
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
9
9
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
10
|
-
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
10
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
11
11
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
12
12
|
import { getIconData, getIconDataSync } from "@ui5/webcomponents-base/dist/asset-registries/Icons.js";
|
|
13
13
|
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
package/dist/Icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../src/Icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,M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AC;AAEd,eAAe,IAAI,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport 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 type { IconData } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getIconData, getIconDataSync } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport executeTemplate from \"@ui5/webcomponents-base/dist/renderer/executeTemplate.js\";\nimport IconTemplate from \"./generated/templates/IconTemplate.lit.js\";\nimport type IconDesign from \"./types/IconDesign.js\";\nimport IconMode from \"./types/IconMode.js\";\n\n// Styles\nimport iconCss from \"./generated/themes/Icon.css.js\";\n\n/**\n * Interface for components that represent an icon, usable in numerous higher-order components\n * @public\n */\ninterface IIcon extends HTMLElement { }\n\nconst ICON_NOT_FOUND = \"ICON_NOT_FOUND\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-icon` component represents an SVG icon.\n * There are two main scenarios how the `ui5-icon` component is used:\n * as a purely decorative element,\n * or as an interactive element that can be focused and clicked.\n *\n * ### Usage\n *\n * 1. **Get familiar with the icons collections.**\n *\n * Before displaying an icon, you need to explore the icons collections to find and import the desired icon.\n *\n * Currently there are 3 icons collection, available as 3 npm packages:\n *\n * - [@ui5/webcomponents-icons](https://www.npmjs.com/package/@ui5/webcomponents-icons) represents the \"SAP-icons\" collection and includes the following\n * [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).\n * - [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the \"tnt\" collection and includes the following\n * [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).\n * - [@ui5/webcomponents-icons-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the \"business-suite\" collection and includes the following\n * [icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).\n *\n * 2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**\n *\n * `npm i @ui5/webcomponents-icons`\n * `npm i @ui5/webcomponents-icons-tnt`\n * `npm i @ui5/webcomponents-icons-business-suite`\n *\n * 3. **Then, import the desired icon**.\n *\n * `import \"@ui5/\\{package_name\\}/dist/\\{icon_name\\}.js\";`\n *\n * **For Example**:\n *\n * For the standard \"SAP-icons\" icon collection, import an icon from the `@ui5/webcomponents-icons` package:\n *\n * `import \"@ui5/webcomponents-icons/dist/employee.js\";`\n *\n * For the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the `@ui5/webcomponents-icons-tnt` package:\n *\n * `import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";`\n *\n * For the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the `@ui5/webcomponents-icons-business-suite` package:\n *\n * `import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";`\n *\n * 4. **Display the icon using the `ui5-icon` web component.**\n * Set the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)\n * and the icon name to the `name` property.\n *\n * `<ui5-icon name=\"employee\"></ui5-icon>`\n * `<ui5-icon name=\"tnt/antenna\"></ui5-icon>`\n * `<ui5-icon name=\"business-suite/ab-testing\"></ui5-icon>`\n *\n * ### Keyboard Handling\n *\n * - [Space] / [Enter] or [Return] - Fires the `click` event if the `mode` property is set to `Interactive`.\n * - [Shift] - If [Space] / [Enter] or [Return] is pressed, pressing [Shift] releases the ui5-icon without triggering the click event.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Icon.js\";`\n * @csspart root - Used to style the outermost wrapper of the `ui5-icon`.\n * @constructor\n * @extends UI5Element\n * @implements {IIcon}\n * @public\n */\n@customElement({\n\ttag: \"ui5-icon\",\n\tlanguageAware: true,\n\tthemeAware: true,\n\trenderer: litRender,\n\ttemplate: IconTemplate,\n\tstyles: iconCss,\n})\n/**\n * Fired on mouseup, `SPACE` and `ENTER`.\n * - on mouse click, the icon fires native `click` event\n * - on `SPACE` and `ENTER`, the icon fires custom `click` event\n * @private\n * @since 1.0.0-rc.8\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass Icon extends UI5Element implements IIcon {\n\t/**\n\t * Defines the component semantic design.\n\t * @default \"Default\"\n\t * @public\n\t * @since 1.9.2\n\t */\n\t@property()\n\tdesign: `${IconDesign}` = \"Default\";\n\n\t/**\n\t * Defines the unique identifier (icon name) of the component.\n\t *\n\t * To browse all available icons, see the\n\t * [SAP Icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html),\n\t * [SAP Fiori Tools](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT) and\n\t * [SAP Business Suite](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html)\n\t *\n\t * Example:\n\t * `name='add'`, `name='delete'`, `name='employee'`.\n\t *\n\t * **Note:** To use the SAP Fiori Tools icons,\n\t * you need to set the `tnt` prefix in front of the icon's name.\n\t *\n\t * Example:\n\t * `name='tnt/antenna'`, `name='tnt/actor'`, `name='tnt/api'`.\n\t *\n\t * **Note:** To use the SAP Business Suite icons,\n\t * you need to set the `business-suite` prefix in front of the icon's name.\n\t *\n\t * Example:\n\t * `name='business-suite/3d'`, `name='business-suite/1x2-grid-layout'`, `name='business-suite/4x4-grid-layout'`.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t *\n\t * **Note:** Every icon should have a text alternative in order to\n\t * calculate its accessible name.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines whether the component should have a tooltip.\n\t *\n\t * **Note:** The tooltip text should be provided via the `accessible-name` property.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip = false;\n\n\t/**\n\t * Defines the mode of the component.\n\t * @default \"Image\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tmode: `${IconMode}` = \"Image\";\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Array })\n\tpathData: Array<string> = [];\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object, noAttribute: true })\n\taccData?: I18nText;\n\n\t/**\n\t* @private\n\t*/\n\t@property({ type: Boolean })\n\tinvalid = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\teffectiveAccessibleName?: string;\n\n\tltr?: boolean;\n\tpackageName?: string;\n\tviewBox?: string;\n\tcustomSvg?: object;\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this.mode !== IconMode.Interactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this.mode === IconMode.Interactive && isSpace(e)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t}\n\n\t/**\n\t* Enforce \"ltr\" direction, based on the icons collection metadata.\n\t*/\n\tget _dir() {\n\t\treturn this.ltr ? \"ltr\" : undefined;\n\t}\n\n\tget effectiveAriaHidden() {\n\t\treturn this.mode === IconMode.Decorative ? \"true\" : undefined;\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.mode === IconMode.Interactive ? \"0\" : undefined;\n\t}\n\n\tget effectiveAccessibleRole() {\n\t\tswitch (this.mode) {\n\t\tcase IconMode.Interactive:\n\t\t\treturn \"button\";\n\t\tcase IconMode.Decorative:\n\t\t\treturn \"presentation\";\n\t\tdefault:\n\t\t\treturn \"img\";\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tasync onBeforeRendering() {\n\t\tconst name = this.name;\n\t\tif (!name) {\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(\"Icon name property is required\", this);\n\t\t}\n\n\t\tlet iconData: typeof ICON_NOT_FOUND | IconData | undefined = getIconDataSync(name);\n\t\tif (!iconData) {\n\t\t\ticonData = await getIconData(name);\n\t\t}\n\n\t\tif (!iconData) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. Invalid icon name: ${this.name}`);\n\t\t}\n\n\t\tif (iconData === ICON_NOT_FOUND) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. You can either import the icon as a module in order to use it e.g. \"@ui5/webcomponents-icons/dist/${name.replace(\"sap-icon://\", \"\")}.js\", or setup a JSON build step and import \"@ui5/webcomponents-icons/dist/AllIcons.js\".`);\n\t\t}\n\n\t\tthis.viewBox = iconData.viewBox || \"0 0 512 512\";\n\n\t\tif (iconData.customTemplate) {\n\t\t\ticonData.pathData = [];\n\t\t\tthis.customSvg = executeTemplate(iconData.customTemplate, this);\n\t\t}\n\n\t\t// in case a new valid name is set, show the icon\n\t\tthis.invalid = false;\n\t\tthis.pathData = Array.isArray(iconData.pathData) ? iconData.pathData : [iconData.pathData];\n\t\tthis.accData = iconData.accData;\n\t\tthis.ltr = iconData.ltr;\n\t\tthis.packageName = iconData.packageName;\n\n\t\tif (this.accessibleName) {\n\t\t\tthis.effectiveAccessibleName = this.accessibleName;\n\t\t} else if (this.accData) {\n\t\t\tconst i18nBundle = await getI18nBundle(this.packageName);\n\t\t\tthis.effectiveAccessibleName = i18nBundle.getText(this.accData) || undefined;\n\t\t} else {\n\t\t\tthis.effectiveAccessibleName = undefined;\n\t\t}\n\t}\n\n\tget hasIconTooltip() {\n\t\treturn this.showTooltip && this.effectiveAccessibleName;\n\t}\n}\n\nIcon.define();\n\nexport default Icon;\nexport type {\n\tIIcon,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../src/Icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,eAAe,MAAM,0DAA0D,CAAC;AACvF,OAAO,YAAY,MAAM,2CAA2C,CAAC;AAErE,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,SAAS;AACT,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAQrD,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAmBH,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,UAAU;IA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,EAAE;kCACmB;AAM9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;sCACG;AAM7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;qCAC3B;AAMnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACZ;AAMhB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;qDACC;AA9F5B,IAAI;IAlBT,aAAa,CAAC;QACd,GAAG,EAAE,UAAU;QACf,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,YAAY;QACtB,MAAM,EAAE,OAAO;KACf,CAAC;IACF;;;;;;OAMG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,IAAI,CA4MT;AAED,IAAI,CAAC,MAAM,EAAE,CAAC;AAEd,eAAe,IAAI,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type { IconData } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getIconData, getIconDataSync } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport executeTemplate from \"@ui5/webcomponents-base/dist/renderer/executeTemplate.js\";\nimport IconTemplate from \"./generated/templates/IconTemplate.lit.js\";\nimport type IconDesign from \"./types/IconDesign.js\";\nimport IconMode from \"./types/IconMode.js\";\n\n// Styles\nimport iconCss from \"./generated/themes/Icon.css.js\";\n\n/**\n * Interface for components that represent an icon, usable in numerous higher-order components\n * @public\n */\ninterface IIcon extends HTMLElement { }\n\nconst ICON_NOT_FOUND = \"ICON_NOT_FOUND\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-icon` component represents an SVG icon.\n * There are two main scenarios how the `ui5-icon` component is used:\n * as a purely decorative element,\n * or as an interactive element that can be focused and clicked.\n *\n * ### Usage\n *\n * 1. **Get familiar with the icons collections.**\n *\n * Before displaying an icon, you need to explore the icons collections to find and import the desired icon.\n *\n * Currently there are 3 icons collection, available as 3 npm packages:\n *\n * - [@ui5/webcomponents-icons](https://www.npmjs.com/package/@ui5/webcomponents-icons) represents the \"SAP-icons\" collection and includes the following\n * [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).\n * - [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the \"tnt\" collection and includes the following\n * [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).\n * - [@ui5/webcomponents-icons-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the \"business-suite\" collection and includes the following\n * [icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).\n *\n * 2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**\n *\n * `npm i @ui5/webcomponents-icons`\n * `npm i @ui5/webcomponents-icons-tnt`\n * `npm i @ui5/webcomponents-icons-business-suite`\n *\n * 3. **Then, import the desired icon**.\n *\n * `import \"@ui5/\\{package_name\\}/dist/\\{icon_name\\}.js\";`\n *\n * **For Example**:\n *\n * For the standard \"SAP-icons\" icon collection, import an icon from the `@ui5/webcomponents-icons` package:\n *\n * `import \"@ui5/webcomponents-icons/dist/employee.js\";`\n *\n * For the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the `@ui5/webcomponents-icons-tnt` package:\n *\n * `import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";`\n *\n * For the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the `@ui5/webcomponents-icons-business-suite` package:\n *\n * `import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";`\n *\n * 4. **Display the icon using the `ui5-icon` web component.**\n * Set the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)\n * and the icon name to the `name` property.\n *\n * `<ui5-icon name=\"employee\"></ui5-icon>`\n * `<ui5-icon name=\"tnt/antenna\"></ui5-icon>`\n * `<ui5-icon name=\"business-suite/ab-testing\"></ui5-icon>`\n *\n * ### Keyboard Handling\n *\n * - [Space] / [Enter] or [Return] - Fires the `click` event if the `mode` property is set to `Interactive`.\n * - [Shift] - If [Space] / [Enter] or [Return] is pressed, pressing [Shift] releases the ui5-icon without triggering the click event.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Icon.js\";`\n * @csspart root - Used to style the outermost wrapper of the `ui5-icon`.\n * @constructor\n * @extends UI5Element\n * @implements {IIcon}\n * @public\n */\n@customElement({\n\ttag: \"ui5-icon\",\n\tlanguageAware: true,\n\tthemeAware: true,\n\trenderer: litRender,\n\ttemplate: IconTemplate,\n\tstyles: iconCss,\n})\n/**\n * Fired on mouseup, `SPACE` and `ENTER`.\n * - on mouse click, the icon fires native `click` event\n * - on `SPACE` and `ENTER`, the icon fires custom `click` event\n * @private\n * @since 1.0.0-rc.8\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass Icon extends UI5Element implements IIcon {\n\teventDetails!: {\n\t\tclick: void\n\t}\n\t/**\n\t * Defines the component semantic design.\n\t * @default \"Default\"\n\t * @public\n\t * @since 1.9.2\n\t */\n\t@property()\n\tdesign: `${IconDesign}` = \"Default\";\n\n\t/**\n\t * Defines the unique identifier (icon name) of the component.\n\t *\n\t * To browse all available icons, see the\n\t * [SAP Icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html),\n\t * [SAP Fiori Tools](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT) and\n\t * [SAP Business Suite](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html)\n\t *\n\t * Example:\n\t * `name='add'`, `name='delete'`, `name='employee'`.\n\t *\n\t * **Note:** To use the SAP Fiori Tools icons,\n\t * you need to set the `tnt` prefix in front of the icon's name.\n\t *\n\t * Example:\n\t * `name='tnt/antenna'`, `name='tnt/actor'`, `name='tnt/api'`.\n\t *\n\t * **Note:** To use the SAP Business Suite icons,\n\t * you need to set the `business-suite` prefix in front of the icon's name.\n\t *\n\t * Example:\n\t * `name='business-suite/3d'`, `name='business-suite/1x2-grid-layout'`, `name='business-suite/4x4-grid-layout'`.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t *\n\t * **Note:** Every icon should have a text alternative in order to\n\t * calculate its accessible name.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines whether the component should have a tooltip.\n\t *\n\t * **Note:** The tooltip text should be provided via the `accessible-name` property.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip = false;\n\n\t/**\n\t * Defines the mode of the component.\n\t * @default \"Image\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tmode: `${IconMode}` = \"Image\";\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Array })\n\tpathData: Array<string> = [];\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object, noAttribute: true })\n\taccData?: I18nText;\n\n\t/**\n\t* @private\n\t*/\n\t@property({ type: Boolean })\n\tinvalid = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\teffectiveAccessibleName?: string;\n\n\tltr?: boolean;\n\tpackageName?: string;\n\tviewBox?: string;\n\tcustomSvg?: object;\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this.mode !== IconMode.Interactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this.mode === IconMode.Interactive && isSpace(e)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t}\n\n\t/**\n\t* Enforce \"ltr\" direction, based on the icons collection metadata.\n\t*/\n\tget _dir() {\n\t\treturn this.ltr ? \"ltr\" : undefined;\n\t}\n\n\tget effectiveAriaHidden() {\n\t\treturn this.mode === IconMode.Decorative ? \"true\" : undefined;\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.mode === IconMode.Interactive ? \"0\" : undefined;\n\t}\n\n\tget effectiveAccessibleRole() {\n\t\tswitch (this.mode) {\n\t\tcase IconMode.Interactive:\n\t\t\treturn \"button\";\n\t\tcase IconMode.Decorative:\n\t\t\treturn \"presentation\";\n\t\tdefault:\n\t\t\treturn \"img\";\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tasync onBeforeRendering() {\n\t\tconst name = this.name;\n\t\tif (!name) {\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(\"Icon name property is required\", this);\n\t\t}\n\n\t\tlet iconData: typeof ICON_NOT_FOUND | IconData | undefined = getIconDataSync(name);\n\t\tif (!iconData) {\n\t\t\ticonData = await getIconData(name);\n\t\t}\n\n\t\tif (!iconData) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. Invalid icon name: ${this.name}`);\n\t\t}\n\n\t\tif (iconData === ICON_NOT_FOUND) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. You can either import the icon as a module in order to use it e.g. \"@ui5/webcomponents-icons/dist/${name.replace(\"sap-icon://\", \"\")}.js\", or setup a JSON build step and import \"@ui5/webcomponents-icons/dist/AllIcons.js\".`);\n\t\t}\n\n\t\tthis.viewBox = iconData.viewBox || \"0 0 512 512\";\n\n\t\tif (iconData.customTemplate) {\n\t\t\ticonData.pathData = [];\n\t\t\tthis.customSvg = executeTemplate(iconData.customTemplate, this);\n\t\t}\n\n\t\t// in case a new valid name is set, show the icon\n\t\tthis.invalid = false;\n\t\tthis.pathData = Array.isArray(iconData.pathData) ? iconData.pathData : [iconData.pathData];\n\t\tthis.accData = iconData.accData;\n\t\tthis.ltr = iconData.ltr;\n\t\tthis.packageName = iconData.packageName;\n\n\t\tif (this.accessibleName) {\n\t\t\tthis.effectiveAccessibleName = this.accessibleName;\n\t\t} else if (this.accData) {\n\t\t\tconst i18nBundle = await getI18nBundle(this.packageName);\n\t\t\tthis.effectiveAccessibleName = i18nBundle.getText(this.accData) || undefined;\n\t\t} else {\n\t\t\tthis.effectiveAccessibleName = undefined;\n\t\t}\n\t}\n\n\tget hasIconTooltip() {\n\t\treturn this.showTooltip && this.effectiveAccessibleName;\n\t}\n}\n\nIcon.define();\n\nexport default Icon;\nexport type {\n\tIIcon,\n};\n"]}
|
package/dist/Input.d.ts
CHANGED
|
@@ -108,6 +108,16 @@ type InputSuggestionScrollEventDetail = {
|
|
|
108
108
|
* @csspart clear-icon - Used to style the clear icon, which can be pressed to clear user input text
|
|
109
109
|
*/
|
|
110
110
|
declare class Input extends UI5Element implements SuggestionComponent, IFormInputElement {
|
|
111
|
+
eventDetails: {
|
|
112
|
+
"change": InputEventDetail;
|
|
113
|
+
"input": InputEventDetail;
|
|
114
|
+
"select": void;
|
|
115
|
+
"selection-change": InputSelectionChangeEventDetail;
|
|
116
|
+
"type-ahead": void;
|
|
117
|
+
"suggestion-scroll": InputSuggestionScrollEventDetail;
|
|
118
|
+
"open": void;
|
|
119
|
+
"close": void;
|
|
120
|
+
};
|
|
111
121
|
/**
|
|
112
122
|
* Defines whether the component is in disabled state.
|
|
113
123
|
*
|
package/dist/Input.js
CHANGED
|
@@ -9,7 +9,7 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
9
9
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
10
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
11
11
|
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
12
|
-
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
12
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
13
13
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
14
14
|
import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
|
|
15
15
|
import { getScopedVarName } from "@ui5/webcomponents-base/dist/CustomElementsScope.js";
|
|
@@ -588,7 +588,7 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
_handleSelect() {
|
|
591
|
-
this.fireDecoratorEvent("select"
|
|
591
|
+
this.fireDecoratorEvent("select");
|
|
592
592
|
}
|
|
593
593
|
_handleInput(e) {
|
|
594
594
|
const inputDomRef = this.getInputDOMRefSync();
|
|
@@ -796,8 +796,6 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
796
796
|
}
|
|
797
797
|
inputRef && (inputRef.value = this.value);
|
|
798
798
|
}
|
|
799
|
-
// Angular two way data binding
|
|
800
|
-
this.fireDecoratorEvent("value-changed");
|
|
801
799
|
this.fireResetSelectionChange();
|
|
802
800
|
}
|
|
803
801
|
}
|
|
@@ -1249,14 +1247,6 @@ Input = Input_1 = __decorate([
|
|
|
1249
1247
|
event("change", {
|
|
1250
1248
|
bubbles: true,
|
|
1251
1249
|
})
|
|
1252
|
-
/**
|
|
1253
|
-
* Fired to make Angular two way data binding work properly.
|
|
1254
|
-
* @private
|
|
1255
|
-
*/
|
|
1256
|
-
,
|
|
1257
|
-
event("value-changed", {
|
|
1258
|
-
bubbles: true,
|
|
1259
|
-
})
|
|
1260
1250
|
/**
|
|
1261
1251
|
* Fired when the value of the component changes at each keystroke,
|
|
1262
1252
|
* and when a suggestion item has been selected.
|
|
@@ -1286,12 +1276,6 @@ Input = Input_1 = __decorate([
|
|
|
1286
1276
|
*/
|
|
1287
1277
|
,
|
|
1288
1278
|
event("selection-change", {
|
|
1289
|
-
detail: {
|
|
1290
|
-
/**
|
|
1291
|
-
* @public
|
|
1292
|
-
*/
|
|
1293
|
-
item: { type: HTMLElement },
|
|
1294
|
-
},
|
|
1295
1279
|
bubbles: true,
|
|
1296
1280
|
})
|
|
1297
1281
|
/**
|
|
@@ -1312,16 +1296,6 @@ Input = Input_1 = __decorate([
|
|
|
1312
1296
|
*/
|
|
1313
1297
|
,
|
|
1314
1298
|
event("suggestion-scroll", {
|
|
1315
|
-
detail: {
|
|
1316
|
-
/**
|
|
1317
|
-
* @public
|
|
1318
|
-
*/
|
|
1319
|
-
scrollTop: { type: Number },
|
|
1320
|
-
/**
|
|
1321
|
-
* @public
|
|
1322
|
-
*/
|
|
1323
|
-
scrollContainer: { type: HTMLElement },
|
|
1324
|
-
},
|
|
1325
1299
|
bubbles: true,
|
|
1326
1300
|
})
|
|
1327
1301
|
/**
|