@ui5/webcomponents 2.3.1-rc.0 → 2.4.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/cypress/specs/Button.cy.ts +13 -26
- package/cypress/specs/Form.cy.ts +100 -96
- package/cypress/specs/Menu.cy.ts +5 -10
- package/cypress/specs/RTL.cy.ts +2 -4
- package/cypress/specs/base/AriaLabelHelper.cy.ts +2 -4
- package/cypress/specs/base/Events.cy.ts +207 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.js +4 -2
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.js +2 -2
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/Breadcrumbs.js +6 -5
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Button.js +8 -3
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.js +17 -12
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarLegend.js +6 -3
- package/dist/CalendarLegend.js.map +1 -1
- package/dist/CardHeader.js +6 -4
- package/dist/CardHeader.js.map +1 -1
- package/dist/Carousel.js +4 -3
- package/dist/Carousel.js.map +1 -1
- package/dist/CheckBox.js +16 -5
- package/dist/CheckBox.js.map +1 -1
- package/dist/ColorPalette.js +1 -1
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPaletteItem.js +5 -0
- package/dist/ColorPaletteItem.js.map +1 -1
- package/dist/ColorPalettePopover.js +12 -3
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ColorPicker.js +5 -2
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ComboBox.js +16 -11
- package/dist/ComboBox.js.map +1 -1
- package/dist/DatePicker.js +8 -5
- package/dist/DatePicker.js.map +1 -1
- package/dist/DayPicker.js +15 -7
- package/dist/DayPicker.js.map +1 -1
- package/dist/FileUploader.js +5 -3
- package/dist/FileUploader.js.map +1 -1
- package/dist/Form.d.ts +3 -3
- package/dist/Form.js +5 -5
- package/dist/Form.js.map +1 -1
- package/dist/FormGroup.js +3 -0
- package/dist/FormGroup.js.map +1 -1
- package/dist/Icon.js +5 -3
- package/dist/Icon.js.map +1 -1
- package/dist/Input.js +41 -19
- package/dist/Input.js.map +1 -1
- package/dist/Link.d.ts +1 -6
- package/dist/Link.js +10 -15
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +1 -0
- package/dist/List.js +31 -19
- package/dist/List.js.map +1 -1
- package/dist/ListItem.d.ts +1 -0
- package/dist/ListItem.js +20 -7
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.js +21 -10
- package/dist/ListItemBase.js.map +1 -1
- package/dist/ListItemGroup.js +6 -5
- package/dist/ListItemGroup.js.map +1 -1
- package/dist/MessageStrip.js +4 -2
- package/dist/MessageStrip.js.map +1 -1
- package/dist/MonthPicker.js +9 -5
- package/dist/MonthPicker.js.map +1 -1
- package/dist/MultiComboBox.js +24 -15
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiInput.js +6 -3
- package/dist/MultiInput.js.map +1 -1
- package/dist/Panel.js +5 -3
- package/dist/Panel.js.map +1 -1
- package/dist/Popover.js +1 -1
- package/dist/Popover.js.map +1 -1
- package/dist/Popup.js +16 -13
- package/dist/Popup.js.map +1 -1
- package/dist/RadioButton.js +4 -2
- package/dist/RadioButton.js.map +1 -1
- package/dist/RadioButtonGroup.js +1 -1
- package/dist/RadioButtonGroup.js.map +1 -1
- package/dist/RangeSlider.d.ts +16 -6
- package/dist/RangeSlider.js +172 -21
- package/dist/RangeSlider.js.map +1 -1
- package/dist/RatingIndicator.js +5 -3
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/ResponsivePopover.js +1 -1
- package/dist/ResponsivePopover.js.map +1 -1
- package/dist/SegmentedButton.js +2 -1
- package/dist/SegmentedButton.js.map +1 -1
- package/dist/Select.d.ts +3 -3
- package/dist/Select.js +20 -8
- package/dist/Select.js.map +1 -1
- package/dist/Slider.d.ts +10 -2
- package/dist/Slider.js +55 -7
- package/dist/Slider.js.map +1 -1
- package/dist/SliderBase.d.ts +28 -4
- package/dist/SliderBase.js +82 -12
- package/dist/SliderBase.js.map +1 -1
- package/dist/SplitButton.js +8 -4
- package/dist/SplitButton.js.map +1 -1
- package/dist/StepInput.js +8 -5
- package/dist/StepInput.js.map +1 -1
- package/dist/Switch.js +16 -4
- package/dist/Switch.js.map +1 -1
- package/dist/TabContainer.js +16 -14
- package/dist/TabContainer.js.map +1 -1
- package/dist/Table.js +2 -1
- package/dist/Table.js.map +1 -1
- package/dist/TableGrowing.js +4 -2
- package/dist/TableGrowing.js.map +1 -1
- package/dist/TableSelection.js +6 -4
- package/dist/TableSelection.js.map +1 -1
- package/dist/Tag.js +4 -2
- package/dist/Tag.js.map +1 -1
- package/dist/TextArea.js +26 -10
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePicker.js +11 -5
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerClock.js +3 -2
- package/dist/TimePickerClock.js.map +1 -1
- package/dist/TimePickerInternals.js +2 -1
- package/dist/TimePickerInternals.js.map +1 -1
- package/dist/TimeSelectionClocks.d.ts +1 -2
- package/dist/TimeSelectionClocks.js +5 -10
- package/dist/TimeSelectionClocks.js.map +1 -1
- package/dist/TimeSelectionInputs.js +5 -1
- package/dist/TimeSelectionInputs.js.map +1 -1
- package/dist/Toast.js +4 -2
- package/dist/Toast.js.map +1 -1
- package/dist/Token.js +7 -4
- package/dist/Token.js.map +1 -1
- package/dist/Tokenizer.js +23 -17
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.js +14 -1
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarSelect.js +5 -2
- package/dist/ToolbarSelect.js.map +1 -1
- package/dist/Tree.js +34 -12
- package/dist/Tree.js.map +1 -1
- package/dist/TreeItemBase.js +8 -5
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/YearPicker.js +9 -5
- package/dist/YearPicker.js.map +1 -1
- package/dist/bundle.scoped.config.d.ts +1 -0
- package/dist/bundle.scoped.config.js +5 -0
- package/dist/bundle.scoped.config.js.map +1 -0
- package/dist/bundle.scoped.esm.d.ts +1 -0
- package/dist/bundle.scoped.esm.js +1 -4
- package/dist/bundle.scoped.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/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/FormLabelSpan.css +1 -1
- package/dist/css/themes/FormLayout.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/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 +499 -59
- package/dist/custom-elements.json +94 -21
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/templates/DialogTemplate.lit.js +1 -1
- package/dist/generated/templates/DialogTemplate.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/ListTemplate.lit.js +5 -4
- package/dist/generated/templates/ListTemplate.lit.js.map +1 -1
- package/dist/generated/templates/PopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/PopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/PopupTemplate.lit.js +1 -1
- package/dist/generated/templates/PopupTemplate.lit.js.map +1 -1
- package/dist/generated/templates/RangeSliderTemplate.lit.js +9 -3
- package/dist/generated/templates/RangeSliderTemplate.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/SliderBaseTemplate.lit.js +3 -1
- package/dist/generated/templates/SliderBaseTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SliderTemplate.lit.js +6 -2
- package/dist/generated/templates/SliderTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TimeSelectionClocksTemplate.lit.js +2 -2
- package/dist/generated/templates/TimeSelectionClocksTemplate.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/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/FormLabelSpan.css.js +1 -1
- package/dist/generated/themes/FormLabelSpan.css.js.map +1 -1
- package/dist/generated/themes/FormLayout.css.js +1 -1
- package/dist/generated/themes/FormLayout.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/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 +21 -6
- package/dist/web-types.json +52 -32
- package/package.json +9 -9
- package/src/Link.hbs +0 -1
- package/src/List.hbs +7 -1
- package/src/Popup.hbs +2 -2
- package/src/RangeSlider.hbs +70 -38
- package/src/Slider.hbs +37 -18
- package/src/SliderBase.hbs +13 -4
- package/src/TimeSelectionClocks.hbs +0 -2
- package/src/i18n/messagebundle.properties +6 -0
- package/src/themes/ColorPaletteItem.css +23 -1
- package/src/themes/ColorPicker.css +9 -1
- package/src/themes/Form.css +3 -2
- package/src/themes/FormLayout.css +3 -3
- package/src/themes/GrowingButton.css +5 -2
- package/src/themes/Input.css +0 -1
- package/src/themes/Link.css +10 -6
- package/src/themes/ListItemBase.css +3 -3
- package/src/themes/ListItemGroupHeader.css +4 -0
- package/src/themes/SliderBase.css +27 -7
- package/src/themes/Switch.css +2 -1
- package/src/themes/base/ColorPalette-parameters.css +3 -0
- package/src/themes/base/sizes-parameters.css +1 -1
- package/src/themes/sap_fiori_3/SliderBase-parameters.css +7 -0
- package/src/themes/sap_fiori_3/sizes-parameters.css +4 -0
- package/src/themes/sap_fiori_3_dark/SliderBase-parameters.css +7 -0
- package/src/themes/sap_fiori_3_dark/sizes-parameters.css +4 -0
- package/src/themes/sap_fiori_3_hcb/sizes-parameters.css +6 -0
- package/src/themes/sap_fiori_3_hcw/sizes-parameters.css +6 -0
- package/src/themes/sap_horizon/ColorPalette-parameters.css +3 -0
- package/src/themes/sap_horizon_dark/ColorPalette-parameters.css +3 -0
- package/src/themes/sap_horizon_dark_exp/ColorPalette-parameters.css +3 -0
- package/src/themes/sap_horizon_exp/ColorPalette-parameters.css +3 -0
- package/src/themes/sap_horizon_hcb/SliderBase-parameters.css +1 -1
- package/src/themes/sap_horizon_hcw/SliderBase-parameters.css +1 -1
- package/tsconfig.json +2 -0
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,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,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,0BAA0B,MAAM,mDAAmD,CAAC;AAC3F,OAAO,oBAAoB,MAAM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AAC,oBAAoB,CAAC;sCACG;AAlHzB,YAAY;IA9CjB,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;KACD,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAwC,kBAAkB,EAAE;QACjE,MAAM,EAAE;YACP;;eAEG;YACH,SAAS,EAAE,EAAE,IAAI,EAAE,CAAA,KAAe,CAAA,EAAE;SACpC;KACD,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 { getEventMark } from \"@ui5/webcomponents-base/dist/MarkedEvents.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})\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})\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(e: MouseEvent) {\n\t\tif (getEventMark(e) === \"button\") {\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.fireEvent<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.fireEvent<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.fireEvent<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":"","sources":["../src/FileUploader.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,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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 { getEventMark } from \"@ui5/webcomponents-base/dist/MarkedEvents.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(e: MouseEvent) {\n\t\tif (getEventMark(e) === \"button\") {\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"]}
|
package/dist/Form.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ type ItemsInfo = {
|
|
|
57
57
|
* - **S** (< 600px) – 1 column is recommended (default: 1)
|
|
58
58
|
* - **M** (600px - 1022px) – up to 2 columns are recommended (default: 1)
|
|
59
59
|
* - **L** (1023px - 1439px) - up to 3 columns are recommended (default: 2)
|
|
60
|
-
* - **XL** (> 1439px) – up to 6 columns are recommended (default:
|
|
60
|
+
* - **XL** (> 1439px) – up to 6 columns are recommended (default: 3)
|
|
61
61
|
*
|
|
62
62
|
* To change the layout, use the `layout` property - f.e. layout="S1 M2 L3 XL6".
|
|
63
63
|
*
|
|
@@ -123,9 +123,9 @@ declare class Form extends UI5Element {
|
|
|
123
123
|
* - `S` - 1 column by default (1 column is recommended)
|
|
124
124
|
* - `M` - 1 column by default (up to 2 columns are recommended)
|
|
125
125
|
* - `L` - 2 columns by default (up to 3 columns are recommended)
|
|
126
|
-
* - `XL` -
|
|
126
|
+
* - `XL` - 3 columns by default (up to 6 columns are recommended)
|
|
127
127
|
*
|
|
128
|
-
* @default "S1 M1 L2
|
|
128
|
+
* @default "S1 M1 L2 XL3"
|
|
129
129
|
* @public
|
|
130
130
|
*/
|
|
131
131
|
layout: string;
|
package/dist/Form.js
CHANGED
|
@@ -53,7 +53,7 @@ const StepColumn = {
|
|
|
53
53
|
* - **S** (< 600px) – 1 column is recommended (default: 1)
|
|
54
54
|
* - **M** (600px - 1022px) – up to 2 columns are recommended (default: 1)
|
|
55
55
|
* - **L** (1023px - 1439px) - up to 3 columns are recommended (default: 2)
|
|
56
|
-
* - **XL** (> 1439px) – up to 6 columns are recommended (default:
|
|
56
|
+
* - **XL** (> 1439px) – up to 6 columns are recommended (default: 3)
|
|
57
57
|
*
|
|
58
58
|
* To change the layout, use the `layout` property - f.e. layout="S1 M2 L3 XL6".
|
|
59
59
|
*
|
|
@@ -121,12 +121,12 @@ let Form = class Form extends UI5Element {
|
|
|
121
121
|
* - `S` - 1 column by default (1 column is recommended)
|
|
122
122
|
* - `M` - 1 column by default (up to 2 columns are recommended)
|
|
123
123
|
* - `L` - 2 columns by default (up to 3 columns are recommended)
|
|
124
|
-
* - `XL` -
|
|
124
|
+
* - `XL` - 3 columns by default (up to 6 columns are recommended)
|
|
125
125
|
*
|
|
126
|
-
* @default "S1 M1 L2
|
|
126
|
+
* @default "S1 M1 L2 XL3"
|
|
127
127
|
* @public
|
|
128
128
|
*/
|
|
129
|
-
this.layout = "S1 M1 L2
|
|
129
|
+
this.layout = "S1 M1 L2 XL3";
|
|
130
130
|
/**
|
|
131
131
|
* Defines the width proportion of the labels and fields of a FormItem by breakpoint.
|
|
132
132
|
*
|
|
@@ -160,7 +160,7 @@ let Form = class Form extends UI5Element {
|
|
|
160
160
|
this.labelSpanM = 4;
|
|
161
161
|
this.columnsL = 2;
|
|
162
162
|
this.labelSpanL = 4;
|
|
163
|
-
this.columnsXl =
|
|
163
|
+
this.columnsXl = 3;
|
|
164
164
|
this.labelSpanXl = 4;
|
|
165
165
|
}
|
|
166
166
|
onBeforeRendering() {
|
package/dist/Form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../src/Form.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAE7E,WAAW;AACX,OAAO,YAAY,MAAM,2CAA2C,CAAC;AAErE,SAAS;AACT,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAErD,OAAO,KAAK,MAAM,YAAY,CAAC;AAI/B,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEtD,MAAM,UAAU,GAAG;IAClB,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;CACP,CAAC;AA8BF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AAQH,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,UAAU;IAA7B;;QACC;;;;;;;;;;;WAWG;QAEH,WAAM,GAAG,cAAc,CAAA;QAEvB;;;;;;;;;;;WAWG;QAEH,cAAS,GAAG,eAAe,CAAC;QAa5B;;;;;;;;;WASG;QAEH,gBAAW,GAAyB,QAAQ,CAAC;QA0B7C;;WAEG;QAEH,aAAQ,GAAG,CAAC,CAAC;QAEb,eAAU,GAAG,EAAE,CAAA;QAGf,aAAQ,GAAG,CAAC,CAAC;QAEb,eAAU,GAAG,CAAC,CAAC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CAAC;GACI,IAAI,CAwTT;AAED,IAAI,CAAC,MAAM,EAAE,CAAC;AAEd,eAAe,IAAI,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 slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\n\n// Template\nimport FormTemplate from \"./generated/templates/FormTemplate.lit.js\";\n\n// Styles\nimport FormCss from \"./generated/themes/Form.css.js\";\n\nimport Title from \"./Title.js\";\nimport type FormItemSpacing from \"./types/FormItemSpacing.js\";\nimport type FormGroup from \"./FormGroup.js\";\n\nconst additionalStylesMap = new Map<string, string>();\n\nconst StepColumn = {\n\t\"S\": 1,\n\t\"M\": 2,\n\t\"L\": 3,\n\t\"XL\": 6,\n};\n\n/**\n * Interface for components that can be slotted inside `ui5-form` as items.\n * @public\n * @experimental\n * @since 2.0.0\n */\ninterface IFormItem extends HTMLElement {\n\tlabelSpan: string\n\titemSpacing: `${FormItemSpacing}`;\n\treadonly isGroup: boolean;\n\tcolsXl?: number;\n\tcolsL?: number;\n\tcolsM?: number;\n\tcolsS?: number;\n\tcolumnSpan?: number;\n}\n\ntype GroupItemsInfo = {\n\tgroupItem: IFormItem,\n\tclasses: string,\n\titems: Array<ItemsInfo>,\n}\n\ntype ItemsInfo = {\n\titem: IFormItem,\n\tclasses: string,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The Form is a layout component that arranges labels and form fields (like input fields) pairs\n * into a specific number of columns.\n *\n * **Note:** The Form web component is a layout component, it isn't a replacement for the native `form` HTML element.\n * The Form web component does not provide any APIs for form submission.\n *\n * ### Structure\n *\n * - **Form** (`ui5-form`) is the top-level container component, responsible for the content layout and responsiveness.\n * - **FormGroup** (`ui5-form-group`) enables the grouping of the Form content.\n * - **FormItem** (`ui5-form-item`) is a pair of label and form fields and can be used directly in a Form, or as part of a FormGroup.\n *\n * The simplest Form (`ui5-form`) consists of a header area on top,\n * displaying a header text (see the `headingText` property) and content below - an arbitrary number of FormItems (ui5-form-item),\n * representing the pairs of label and form fields.\n *\n * And, there is also \"grouping\" available to assist the implementation of richer UIs.\n * This is enabled by the FormGroup (`ui5-form-group`) component.\n * In this case, the Form is structured into FormGroups and each FormGroup consists of FormItems.\n *\n * ### Responsiveness\n *\n * The Form component reacts and changes its layout on predefined breakpoints.\n * Depending on its size, the Form content (FormGroups and FormItems) gets divided into one or more columns as follows:\n * - **S** (< 600px) – 1 column is recommended (default: 1)\n * - **M** (600px - 1022px) – up to 2 columns are recommended (default: 1)\n * - **L** (1023px - 1439px) - up to 3 columns are recommended (default: 2)\n * - **XL** (> 1439px) – up to 6 columns are recommended (default: 2)\n *\n * To change the layout, use the `layout` property - f.e. layout=\"S1 M2 L3 XL6\".\n *\n * ### Groups\n *\n * To make better use of screen space, there is built-in logic to determine how many columns should a FormGroup occupy.\n *\n * - **Example #1** (perfect match):\n * 4 columns and 4 groups: each group will use 1 column.\n *\n * - **Example #2** (balanced distribution):\n * 4 columns and 2 groups: each group will use 2 columns.\n * 6 columns and 2 groups: each group will use 3 columns.\n *\n * - **Example #3** (unbalanced distribution):\n * 3 columns and 2 groups: the larger one will use 2 columns, the smaller 1 column.\n * 5 columns and 3 groups: two of the groups will use 2 columns each, the smallest 1 column.\n *\n * **Note:** The size of a group element is determined by the number of FormItems assigned to it.\n * In the case of equality, the first in the DOM will use more columns, and the last - fewer columns.\n *\n * - **Example #4** (more groups than columns):\n * 3 columns and 4 groups: each FormGroup uses only 1 column, the last FormGroup will wrap on the second row.\n *\n * ### Groups Column Span\n *\n * To influence the built-in group distribution, described in the previous section,\n * you can use the FormGroup's `columnSpan` property, that defines how many columns the group should expand to.\n *\n * ### Items Column Span\n *\n * FormItem's columnSpan property defines how many columns the form item should expand to inside a form group or the form.\n *\n * ### Items Label Span\n *\n * The placement of the labels depends on the size of the used column.\n * If there is enough space, the labels are next to their associated fields, otherwise - above the fields.\n * By default, the labels take 4/12 of the FormItem, leaving 8/12 parts to associated fields.\n * You can control what space the labels should take via the `labelSpan` property.\n *\n * **For example:** To always place the labels on top set: `labelSpan=\"S12 M12 L12 XL12\"` property.\n *\n * ### ES6 Module Import\n *\n * - import @ui5/webcomponents/dist/Form.js\";\n * - import @ui5/webcomponents/dist/FormGroup.js\";\n * - import @ui5/webcomponents/dist/FormItem.js\";\n *\n * @csspart header - Used to style the wrapper of the header.\n * @csspart layout - Used to style the element defining the form column layout.\n * @csspart column - Used to style a single column of the form column layout.\n *\n * @public\n * @since 2.0.0\n * @experimental This component is availabe since 2.0 under an experimental flag and its API and behaviour are subject to change.\n * @extends UI5Element\n */\n@customElement({\n\ttag: \"ui5-form\",\n\trenderer: litRender,\n\tstyles: FormCss,\n\ttemplate: FormTemplate,\n\tdependencies: [Title],\n})\nclass Form extends UI5Element {\n\t/**\n\t * Defines the number of columns to distribute the form content by breakpoint.\n\t *\n\t * Supported values:\n\t * - `S` - 1 column by default (1 column is recommended)\n\t * - `M` - 1 column by default (up to 2 columns are recommended)\n\t * - `L` - 2 columns by default (up to 3 columns are recommended)\n\t * - `XL` - 2 columns by default (up to 6 columns are recommended)\n\t *\n\t * @default \"S1 M1 L2 XL2\"\n\t * @public\n\t */\n\t@property()\n\tlayout = \"S1 M1 L2 XL2\"\n\n\t/**\n\t * Defines the width proportion of the labels and fields of a FormItem by breakpoint.\n\t *\n\t * By default, the labels take 4/12 (or 1/3) of the form item in M,L and XL sizes,\n\t * and 12/12 in S size, e.g in S the label is on top of its associated field.\n\t *\n\t * The supported values are between 1 and 12. Greater the number, more space the label will use.\n\t *\n\t * **Note:** If \"12\" is set, the label will be displayed on top of its assosiated field.\n\t * @default \"S12 M4 L4 XL4\"\n\t * @public\n\t */\n\t@property()\n\tlabelSpan = \"S12 M4 L4 XL4\";\n\n\t/**\n\t * Defines the header text of the component.\n\t *\n\t * **Note:** The property gets overridden by the `header` slot.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Defines the vertical spacing between form items.\n\t *\n\t * **Note:** If the Form is meant to be switched between \"non-edit\" and \"edit\" modes,\n\t * we recommend using \"Large\" item spacing in \"non-edit\" mode, and \"Normal\" - for \"edit\" mode,\n\t * to avoid \"jumping\" effect, caused by the hight difference between texts in \"non-edit\" mode and the input fields in \"edit\" mode.\n\t *\n\t * @default \"Normal\"\n\t * @public\n\t */\n\t@property()\n\titemSpacing: `${FormItemSpacing}` = \"Normal\";\n\n\t/**\n\t * Defines the component header area.\n\t *\n\t * **Note:** When a `header` is provided, the `headerText` property is ignored.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the component content - FormGroups or FormItems.\n\t *\n\t * **Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\n\t * Either use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: true,\n\t})\n\titems!: Array<IFormItem>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tcolumnsS = 1;\n\t@property({ type: Number })\n\tlabelSpanS = 12\n\n\t@property({ type: Number })\n\tcolumnsM = 1;\n\t@property({ type: Number })\n\tlabelSpanM = 4;\n\n\t@property({ type: Number })\n\tcolumnsL = 2;\n\t@property({ type: Number })\n\tlabelSpanL = 4;\n\n\t@property({ type: Number })\n\tcolumnsXl = 2;\n\t@property({ type: Number })\n\tlabelSpanXl = 4;\n\n\tonBeforeRendering() {\n\t\t// Parse the layout and set it to the FormGroups/FormItems.\n\t\tthis.setColumnLayout();\n\n\t\t// Parse the labelSpan and set it to the FormGroups/FormItems.\n\t\tthis.setLabelSpan();\n\n\t\t// Define how many columns a group should take.\n\t\tthis.setGroupsColSpan();\n\t}\n\n\tonAfterRendering() {\n\t\t// Create additional CSS for number of columns that are not supported by default.\n\t\tthis.createAdditionalCSSStyleSheet();\n\t}\n\n\tsetColumnLayout() {\n\t\tconst layoutArr = this.layout.split(\" \");\n\t\tlayoutArr.forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.columnsS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.columnsM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.columnsL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.columnsXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\t}\n\n\tsetLabelSpan() {\n\t\tthis.labelSpan.split(\" \").forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.labelSpanS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.labelSpanM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.labelSpanL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.labelSpanXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\n\t\tthis.items.forEach((item: IFormItem) => {\n\t\t\titem.labelSpan = this.labelSpan;\n\t\t\titem.itemSpacing = this.itemSpacing;\n\t\t});\n\t}\n\n\tsetGroupsColSpan() {\n\t\tif (!this.hasGroupItems) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst itemsCount = this.items.length;\n\t\tconst sortedItems = [...this.items].sort((itemA: IFormItem, itemB: IFormItem) => {\n\t\t\treturn (itemB as FormGroup)?.items.length - (itemA as FormGroup)?.items.length;\n\t\t});\n\n\t\tsortedItems.forEach((item: IFormItem, idx: number) => {\n\t\t\titem.colsXl = this.getGroupsColSpan(this.columnsXl, itemsCount, idx, item);\n\t\t\titem.colsL = this.getGroupsColSpan(this.columnsL, itemsCount, idx, item);\n\t\t\titem.colsM = this.getGroupsColSpan(this.columnsM, itemsCount, idx, item);\n\t\t\titem.colsS = this.getGroupsColSpan(this.columnsS, itemsCount, idx, item);\n\t\t});\n\t}\n\n\tgetGroupsColSpan(cols: number, groups: number, index: number, group: IFormItem): number {\n\t\t// Case 0: column span is set from outside.\n\t\tif (group.columnSpan) {\n\t\t\treturn group.columnSpan;\n\t\t}\n\n\t\t// CASE 1: The number of available columns match the number of groups, or only 1 column is available - each group takes 1 column.\n\t\t// For example: 1 column - 1 group, 2 columns - 2 groups, 3 columns - 3 groups, 4columns - 4 groups\n\t\tif (cols === 1 || cols <= groups) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t// CASE 2: The number of available columns IS multiple of the number of groups.\n\t\t// For example: 2 column - 1 group, 3 columns - 1 groups, 4 columns - 1 group, 4 columns - 2 groups\n\t\tif (cols % groups === 0) {\n\t\t\treturn cols / groups;\n\t\t}\n\n\t\t// CASE 3: The number of available columns IS NOT multiple of the number of groups.\n\t\tconst MIN_COL_SPAN = 1;\n\t\tconst delta = cols - groups;\n\n\t\t// 7 cols & 4 groups => 2, 2, 2, 1\n\t\tif (delta <= groups) {\n\t\t\treturn index < delta ? MIN_COL_SPAN + 1 : MIN_COL_SPAN;\n\t\t}\n\n\t\t// 7 cols & 3 groups => 3, 2, 2\n\t\treturn index === 0 ? MIN_COL_SPAN + (delta - groups) + 1 : MIN_COL_SPAN + 1;\n\t}\n\n\tget hasGroupItems(): boolean {\n\t\treturn this.items.some((item: IFormItem) => item.isGroup);\n\t}\n\n\tget hasHeader(): boolean {\n\t\treturn this.hasCustomHeader || !!this.headerText;\n\t}\n\n\tget hasCustomHeader(): boolean {\n\t\treturn !!this.header.length;\n\t}\n\n\tget ariaLabelledByID(): string | undefined {\n\t\treturn this.hasCustomHeader ? undefined : `${this._id}-header-text`;\n\t}\n\n\tget groupItemsInfo(): Array<GroupItemsInfo> {\n\t\treturn this.items.map((groupItem: IFormItem) => {\n\t\t\treturn {\n\t\t\t\tgroupItem,\n\t\t\t\tclasses: `ui5-form-column-spanL-${groupItem.colsL} ui5-form-column-spanXL-${groupItem.colsXl} ui5-form-column-spanM-${groupItem.colsM} ui5-form-column-spanS-${groupItem.colsS}`,\n\t\t\t\titems: this.getItemsInfo((Array.from(groupItem.children) as Array<IFormItem>)),\n\t\t\t};\n\t\t});\n\t}\n\n\tget itemsInfo(): Array<ItemsInfo> {\n\t\treturn this.getItemsInfo();\n\t}\n\n\tgetItemsInfo(items?: Array<IFormItem>): Array<ItemsInfo> {\n\t\treturn (items || this.items).map((item: IFormItem) => {\n\t\t\treturn {\n\t\t\t\titem,\n\t\t\t\tclasses: item.columnSpan ? `ui5-form-item-span-${item.columnSpan}` : \"\",\n\t\t\t};\n\t\t});\n\t}\n\n\tcreateAdditionalCSSStyleSheet() {\n\t\t[\n\t\t\t{ breakpoint: \"S\", columns: this.columnsS },\n\t\t\t{ breakpoint: \"M\", columns: this.columnsM },\n\t\t\t{ breakpoint: \"L\", columns: this.columnsL },\n\t\t\t{ breakpoint: \"XL\", columns: this.columnsXl },\n\t\t].forEach(step => {\n\t\t\tconst additionalStyle: string | undefined = this.getAdditionalCSS(step.breakpoint, step.columns);\n\n\t\t\tif (additionalStyle) {\n\t\t\t\tthis.shadowRoot!.adoptedStyleSheets = [...this.shadowRoot!.adoptedStyleSheets, this.getCSSStyleSheet(additionalStyle)];\n\t\t\t}\n\t\t});\n\t}\n\n\tgetAdditionalCSS(step: string, colsNumber: number): string | undefined {\n\t\tif (StepColumn[step as keyof typeof StepColumn] >= colsNumber) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst key = `${step}-${colsNumber}`;\n\n\t\tif (!additionalStylesMap.has(key)) {\n\t\t\tlet containerQuery;\n\t\t\tlet supporedColumnsNumber = StepColumn.S;\n\t\t\tlet stepSpanCSS = \"\";\n\t\t\tlet cols = colsNumber;\n\n\t\t\tif (step === \"S\") {\n\t\t\t\tsupporedColumnsNumber = StepColumn.S;\n\t\t\t\tcontainerQuery = `@container (max-width: 599px) {`;\n\t\t\t} else if (step === \"M\") {\n\t\t\t\tsupporedColumnsNumber = StepColumn.M;\n\t\t\t\tcontainerQuery = `@container (width > 599px) and (width < 1024px) {`;\n\t\t\t} else if (step === \"L\") {\n\t\t\t\tsupporedColumnsNumber = StepColumn.L;\n\t\t\t\tcontainerQuery = `@container (width > 1023px) and (width < 1439px) {`;\n\t\t\t} else if (step === \"XL\") {\n\t\t\t\tcontainerQuery = `@container (min-width: 1440px) {`;\n\t\t\t\tsupporedColumnsNumber = StepColumn.XL;\n\t\t\t}\n\n\t\t\twhile (cols > supporedColumnsNumber) {\n\t\t\t\tstepSpanCSS += `\n\t\t\t\t:host([columns-${step.toLocaleLowerCase()}=\"${cols}\"]) .ui5-form-layout {\n\t\t\t\t\tgrid-template-columns: repeat(${cols}, 1fr);\n\t\t\t\t}\n\n\t\t\t\t.ui5-form-column-span${step}-${cols},\n\t\t\t\t.ui5-form-item-span-${cols} {\n\t\t\t\t\tgrid-column: span ${cols};\n\t\t\t\t}\n\n\t\t\t\t.ui5-form-column-span${step}-${cols} .ui5-form-group-layout {\n\t\t\t\t\tgrid-template-columns: repeat(${cols}, 1fr);\n\t\t\t\t}\n\t\t\t\t`;\n\t\t\t\tcols--;\n\t\t\t}\n\n\t\t\tconst css = `${containerQuery}${stepSpanCSS}}`;\n\t\t\tadditionalStylesMap.set(key, css);\n\t\t}\n\n\t\treturn additionalStylesMap.get(key)!;\n\t}\n\n\tgetCSSStyleSheet(cssText: string): CSSStyleSheet {\n\t\tconst style = new CSSStyleSheet();\n\t\tstyle.replaceSync(cssText);\n\t\treturn style;\n\t}\n}\n\nForm.define();\n\nexport default Form;\nexport type {\n\tIFormItem,\n};\n"]}
|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KAAK,CAAC;IACd,CAAC;CACD,CAAA;AA1SA;IADC,QAAQ,EAAE;oCACY;AAevB;IADC,QAAQ,EAAE;uCACiB;AAW5B;IADC,QAAQ,EAAE;wCACS;AAapB;IADC,QAAQ,EAAE;yCACkC;AAS7C;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;oCACA;AAe5B;IANC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;QACf,eAAe,EAAE,IAAI;QACrB,uBAAuB,EAAE,IAAI;KAC7B,CAAC;mCACuB;AAMzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCACd;AAEb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACZ;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCACd;AAEb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACZ;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCACd;AAEb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACZ;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACb;AAEd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACX;AApGX,IAAI;IAPT,aAAa,CAAC;QACd,GAAG,EAAE,UAAU;QACf,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,CAAC,KAAK,CAAC;KACrB,CAAC;GACI,IAAI,CAwTT;AAED,IAAI,CAAC,MAAM,EAAE,CAAC;AAEd,eAAe,IAAI,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 slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\n\n// Template\nimport FormTemplate from \"./generated/templates/FormTemplate.lit.js\";\n\n// Styles\nimport FormCss from \"./generated/themes/Form.css.js\";\n\nimport Title from \"./Title.js\";\nimport type FormItemSpacing from \"./types/FormItemSpacing.js\";\nimport type FormGroup from \"./FormGroup.js\";\n\nconst additionalStylesMap = new Map<string, string>();\n\nconst StepColumn = {\n\t\"S\": 1,\n\t\"M\": 2,\n\t\"L\": 3,\n\t\"XL\": 6,\n};\n\n/**\n * Interface for components that can be slotted inside `ui5-form` as items.\n * @public\n * @experimental\n * @since 2.0.0\n */\ninterface IFormItem extends HTMLElement {\n\tlabelSpan: string\n\titemSpacing: `${FormItemSpacing}`;\n\treadonly isGroup: boolean;\n\tcolsXl?: number;\n\tcolsL?: number;\n\tcolsM?: number;\n\tcolsS?: number;\n\tcolumnSpan?: number;\n}\n\ntype GroupItemsInfo = {\n\tgroupItem: IFormItem,\n\tclasses: string,\n\titems: Array<ItemsInfo>,\n}\n\ntype ItemsInfo = {\n\titem: IFormItem,\n\tclasses: string,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The Form is a layout component that arranges labels and form fields (like input fields) pairs\n * into a specific number of columns.\n *\n * **Note:** The Form web component is a layout component, it isn't a replacement for the native `form` HTML element.\n * The Form web component does not provide any APIs for form submission.\n *\n * ### Structure\n *\n * - **Form** (`ui5-form`) is the top-level container component, responsible for the content layout and responsiveness.\n * - **FormGroup** (`ui5-form-group`) enables the grouping of the Form content.\n * - **FormItem** (`ui5-form-item`) is a pair of label and form fields and can be used directly in a Form, or as part of a FormGroup.\n *\n * The simplest Form (`ui5-form`) consists of a header area on top,\n * displaying a header text (see the `headingText` property) and content below - an arbitrary number of FormItems (ui5-form-item),\n * representing the pairs of label and form fields.\n *\n * And, there is also \"grouping\" available to assist the implementation of richer UIs.\n * This is enabled by the FormGroup (`ui5-form-group`) component.\n * In this case, the Form is structured into FormGroups and each FormGroup consists of FormItems.\n *\n * ### Responsiveness\n *\n * The Form component reacts and changes its layout on predefined breakpoints.\n * Depending on its size, the Form content (FormGroups and FormItems) gets divided into one or more columns as follows:\n * - **S** (< 600px) – 1 column is recommended (default: 1)\n * - **M** (600px - 1022px) – up to 2 columns are recommended (default: 1)\n * - **L** (1023px - 1439px) - up to 3 columns are recommended (default: 2)\n * - **XL** (> 1439px) – up to 6 columns are recommended (default: 3)\n *\n * To change the layout, use the `layout` property - f.e. layout=\"S1 M2 L3 XL6\".\n *\n * ### Groups\n *\n * To make better use of screen space, there is built-in logic to determine how many columns should a FormGroup occupy.\n *\n * - **Example #1** (perfect match):\n * 4 columns and 4 groups: each group will use 1 column.\n *\n * - **Example #2** (balanced distribution):\n * 4 columns and 2 groups: each group will use 2 columns.\n * 6 columns and 2 groups: each group will use 3 columns.\n *\n * - **Example #3** (unbalanced distribution):\n * 3 columns and 2 groups: the larger one will use 2 columns, the smaller 1 column.\n * 5 columns and 3 groups: two of the groups will use 2 columns each, the smallest 1 column.\n *\n * **Note:** The size of a group element is determined by the number of FormItems assigned to it.\n * In the case of equality, the first in the DOM will use more columns, and the last - fewer columns.\n *\n * - **Example #4** (more groups than columns):\n * 3 columns and 4 groups: each FormGroup uses only 1 column, the last FormGroup will wrap on the second row.\n *\n * ### Groups Column Span\n *\n * To influence the built-in group distribution, described in the previous section,\n * you can use the FormGroup's `columnSpan` property, that defines how many columns the group should expand to.\n *\n * ### Items Column Span\n *\n * FormItem's columnSpan property defines how many columns the form item should expand to inside a form group or the form.\n *\n * ### Items Label Span\n *\n * The placement of the labels depends on the size of the used column.\n * If there is enough space, the labels are next to their associated fields, otherwise - above the fields.\n * By default, the labels take 4/12 of the FormItem, leaving 8/12 parts to associated fields.\n * You can control what space the labels should take via the `labelSpan` property.\n *\n * **For example:** To always place the labels on top set: `labelSpan=\"S12 M12 L12 XL12\"` property.\n *\n * ### ES6 Module Import\n *\n * - import @ui5/webcomponents/dist/Form.js\";\n * - import @ui5/webcomponents/dist/FormGroup.js\";\n * - import @ui5/webcomponents/dist/FormItem.js\";\n *\n * @csspart header - Used to style the wrapper of the header.\n * @csspart layout - Used to style the element defining the form column layout.\n * @csspart column - Used to style a single column of the form column layout.\n *\n * @public\n * @since 2.0.0\n * @experimental This component is availabe since 2.0 under an experimental flag and its API and behaviour are subject to change.\n * @extends UI5Element\n */\n@customElement({\n\ttag: \"ui5-form\",\n\trenderer: litRender,\n\tstyles: FormCss,\n\ttemplate: FormTemplate,\n\tdependencies: [Title],\n})\nclass Form extends UI5Element {\n\t/**\n\t * Defines the number of columns to distribute the form content by breakpoint.\n\t *\n\t * Supported values:\n\t * - `S` - 1 column by default (1 column is recommended)\n\t * - `M` - 1 column by default (up to 2 columns are recommended)\n\t * - `L` - 2 columns by default (up to 3 columns are recommended)\n\t * - `XL` - 3 columns by default (up to 6 columns are recommended)\n\t *\n\t * @default \"S1 M1 L2 XL3\"\n\t * @public\n\t */\n\t@property()\n\tlayout = \"S1 M1 L2 XL3\"\n\n\t/**\n\t * Defines the width proportion of the labels and fields of a FormItem by breakpoint.\n\t *\n\t * By default, the labels take 4/12 (or 1/3) of the form item in M,L and XL sizes,\n\t * and 12/12 in S size, e.g in S the label is on top of its associated field.\n\t *\n\t * The supported values are between 1 and 12. Greater the number, more space the label will use.\n\t *\n\t * **Note:** If \"12\" is set, the label will be displayed on top of its assosiated field.\n\t * @default \"S12 M4 L4 XL4\"\n\t * @public\n\t */\n\t@property()\n\tlabelSpan = \"S12 M4 L4 XL4\";\n\n\t/**\n\t * Defines the header text of the component.\n\t *\n\t * **Note:** The property gets overridden by the `header` slot.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Defines the vertical spacing between form items.\n\t *\n\t * **Note:** If the Form is meant to be switched between \"non-edit\" and \"edit\" modes,\n\t * we recommend using \"Large\" item spacing in \"non-edit\" mode, and \"Normal\" - for \"edit\" mode,\n\t * to avoid \"jumping\" effect, caused by the hight difference between texts in \"non-edit\" mode and the input fields in \"edit\" mode.\n\t *\n\t * @default \"Normal\"\n\t * @public\n\t */\n\t@property()\n\titemSpacing: `${FormItemSpacing}` = \"Normal\";\n\n\t/**\n\t * Defines the component header area.\n\t *\n\t * **Note:** When a `header` is provided, the `headerText` property is ignored.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the component content - FormGroups or FormItems.\n\t *\n\t * **Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\n\t * Either use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: true,\n\t})\n\titems!: Array<IFormItem>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tcolumnsS = 1;\n\t@property({ type: Number })\n\tlabelSpanS = 12\n\n\t@property({ type: Number })\n\tcolumnsM = 1;\n\t@property({ type: Number })\n\tlabelSpanM = 4;\n\n\t@property({ type: Number })\n\tcolumnsL = 2;\n\t@property({ type: Number })\n\tlabelSpanL = 4;\n\n\t@property({ type: Number })\n\tcolumnsXl = 3;\n\t@property({ type: Number })\n\tlabelSpanXl = 4;\n\n\tonBeforeRendering() {\n\t\t// Parse the layout and set it to the FormGroups/FormItems.\n\t\tthis.setColumnLayout();\n\n\t\t// Parse the labelSpan and set it to the FormGroups/FormItems.\n\t\tthis.setLabelSpan();\n\n\t\t// Define how many columns a group should take.\n\t\tthis.setGroupsColSpan();\n\t}\n\n\tonAfterRendering() {\n\t\t// Create additional CSS for number of columns that are not supported by default.\n\t\tthis.createAdditionalCSSStyleSheet();\n\t}\n\n\tsetColumnLayout() {\n\t\tconst layoutArr = this.layout.split(\" \");\n\t\tlayoutArr.forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.columnsS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.columnsM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.columnsL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.columnsXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\t}\n\n\tsetLabelSpan() {\n\t\tthis.labelSpan.split(\" \").forEach((breakpoint: string) => {\n\t\t\tif (breakpoint.startsWith(\"S\")) {\n\t\t\t\tthis.labelSpanS = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"M\")) {\n\t\t\t\tthis.labelSpanM = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"L\")) {\n\t\t\t\tthis.labelSpanL = parseInt(breakpoint.slice(1));\n\t\t\t} else if (breakpoint.startsWith(\"XL\")) {\n\t\t\t\tthis.labelSpanXl = parseInt(breakpoint.slice(2));\n\t\t\t}\n\t\t});\n\n\t\tthis.items.forEach((item: IFormItem) => {\n\t\t\titem.labelSpan = this.labelSpan;\n\t\t\titem.itemSpacing = this.itemSpacing;\n\t\t});\n\t}\n\n\tsetGroupsColSpan() {\n\t\tif (!this.hasGroupItems) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst itemsCount = this.items.length;\n\t\tconst sortedItems = [...this.items].sort((itemA: IFormItem, itemB: IFormItem) => {\n\t\t\treturn (itemB as FormGroup)?.items.length - (itemA as FormGroup)?.items.length;\n\t\t});\n\n\t\tsortedItems.forEach((item: IFormItem, idx: number) => {\n\t\t\titem.colsXl = this.getGroupsColSpan(this.columnsXl, itemsCount, idx, item);\n\t\t\titem.colsL = this.getGroupsColSpan(this.columnsL, itemsCount, idx, item);\n\t\t\titem.colsM = this.getGroupsColSpan(this.columnsM, itemsCount, idx, item);\n\t\t\titem.colsS = this.getGroupsColSpan(this.columnsS, itemsCount, idx, item);\n\t\t});\n\t}\n\n\tgetGroupsColSpan(cols: number, groups: number, index: number, group: IFormItem): number {\n\t\t// Case 0: column span is set from outside.\n\t\tif (group.columnSpan) {\n\t\t\treturn group.columnSpan;\n\t\t}\n\n\t\t// CASE 1: The number of available columns match the number of groups, or only 1 column is available - each group takes 1 column.\n\t\t// For example: 1 column - 1 group, 2 columns - 2 groups, 3 columns - 3 groups, 4columns - 4 groups\n\t\tif (cols === 1 || cols <= groups) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t// CASE 2: The number of available columns IS multiple of the number of groups.\n\t\t// For example: 2 column - 1 group, 3 columns - 1 groups, 4 columns - 1 group, 4 columns - 2 groups\n\t\tif (cols % groups === 0) {\n\t\t\treturn cols / groups;\n\t\t}\n\n\t\t// CASE 3: The number of available columns IS NOT multiple of the number of groups.\n\t\tconst MIN_COL_SPAN = 1;\n\t\tconst delta = cols - groups;\n\n\t\t// 7 cols & 4 groups => 2, 2, 2, 1\n\t\tif (delta <= groups) {\n\t\t\treturn index < delta ? MIN_COL_SPAN + 1 : MIN_COL_SPAN;\n\t\t}\n\n\t\t// 7 cols & 3 groups => 3, 2, 2\n\t\treturn index === 0 ? MIN_COL_SPAN + (delta - groups) + 1 : MIN_COL_SPAN + 1;\n\t}\n\n\tget hasGroupItems(): boolean {\n\t\treturn this.items.some((item: IFormItem) => item.isGroup);\n\t}\n\n\tget hasHeader(): boolean {\n\t\treturn this.hasCustomHeader || !!this.headerText;\n\t}\n\n\tget hasCustomHeader(): boolean {\n\t\treturn !!this.header.length;\n\t}\n\n\tget ariaLabelledByID(): string | undefined {\n\t\treturn this.hasCustomHeader ? undefined : `${this._id}-header-text`;\n\t}\n\n\tget groupItemsInfo(): Array<GroupItemsInfo> {\n\t\treturn this.items.map((groupItem: IFormItem) => {\n\t\t\treturn {\n\t\t\t\tgroupItem,\n\t\t\t\tclasses: `ui5-form-column-spanL-${groupItem.colsL} ui5-form-column-spanXL-${groupItem.colsXl} ui5-form-column-spanM-${groupItem.colsM} ui5-form-column-spanS-${groupItem.colsS}`,\n\t\t\t\titems: this.getItemsInfo((Array.from(groupItem.children) as Array<IFormItem>)),\n\t\t\t};\n\t\t});\n\t}\n\n\tget itemsInfo(): Array<ItemsInfo> {\n\t\treturn this.getItemsInfo();\n\t}\n\n\tgetItemsInfo(items?: Array<IFormItem>): Array<ItemsInfo> {\n\t\treturn (items || this.items).map((item: IFormItem) => {\n\t\t\treturn {\n\t\t\t\titem,\n\t\t\t\tclasses: item.columnSpan ? `ui5-form-item-span-${item.columnSpan}` : \"\",\n\t\t\t};\n\t\t});\n\t}\n\n\tcreateAdditionalCSSStyleSheet() {\n\t\t[\n\t\t\t{ breakpoint: \"S\", columns: this.columnsS },\n\t\t\t{ breakpoint: \"M\", columns: this.columnsM },\n\t\t\t{ breakpoint: \"L\", columns: this.columnsL },\n\t\t\t{ breakpoint: \"XL\", columns: this.columnsXl },\n\t\t].forEach(step => {\n\t\t\tconst additionalStyle: string | undefined = this.getAdditionalCSS(step.breakpoint, step.columns);\n\n\t\t\tif (additionalStyle) {\n\t\t\t\tthis.shadowRoot!.adoptedStyleSheets = [...this.shadowRoot!.adoptedStyleSheets, this.getCSSStyleSheet(additionalStyle)];\n\t\t\t}\n\t\t});\n\t}\n\n\tgetAdditionalCSS(step: string, colsNumber: number): string | undefined {\n\t\tif (StepColumn[step as keyof typeof StepColumn] >= colsNumber) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst key = `${step}-${colsNumber}`;\n\n\t\tif (!additionalStylesMap.has(key)) {\n\t\t\tlet containerQuery;\n\t\t\tlet supporedColumnsNumber = StepColumn.S;\n\t\t\tlet stepSpanCSS = \"\";\n\t\t\tlet cols = colsNumber;\n\n\t\t\tif (step === \"S\") {\n\t\t\t\tsupporedColumnsNumber = StepColumn.S;\n\t\t\t\tcontainerQuery = `@container (max-width: 599px) {`;\n\t\t\t} else if (step === \"M\") {\n\t\t\t\tsupporedColumnsNumber = StepColumn.M;\n\t\t\t\tcontainerQuery = `@container (width > 599px) and (width < 1024px) {`;\n\t\t\t} else if (step === \"L\") {\n\t\t\t\tsupporedColumnsNumber = StepColumn.L;\n\t\t\t\tcontainerQuery = `@container (width > 1023px) and (width < 1439px) {`;\n\t\t\t} else if (step === \"XL\") {\n\t\t\t\tcontainerQuery = `@container (min-width: 1440px) {`;\n\t\t\t\tsupporedColumnsNumber = StepColumn.XL;\n\t\t\t}\n\n\t\t\twhile (cols > supporedColumnsNumber) {\n\t\t\t\tstepSpanCSS += `\n\t\t\t\t:host([columns-${step.toLocaleLowerCase()}=\"${cols}\"]) .ui5-form-layout {\n\t\t\t\t\tgrid-template-columns: repeat(${cols}, 1fr);\n\t\t\t\t}\n\n\t\t\t\t.ui5-form-column-span${step}-${cols},\n\t\t\t\t.ui5-form-item-span-${cols} {\n\t\t\t\t\tgrid-column: span ${cols};\n\t\t\t\t}\n\n\t\t\t\t.ui5-form-column-span${step}-${cols} .ui5-form-group-layout {\n\t\t\t\t\tgrid-template-columns: repeat(${cols}, 1fr);\n\t\t\t\t}\n\t\t\t\t`;\n\t\t\t\tcols--;\n\t\t\t}\n\n\t\t\tconst css = `${containerQuery}${stepSpanCSS}}`;\n\t\t\tadditionalStylesMap.set(key, css);\n\t\t}\n\n\t\treturn additionalStylesMap.get(key)!;\n\t}\n\n\tgetCSSStyleSheet(cssText: string): CSSStyleSheet {\n\t\tconst style = new CSSStyleSheet();\n\t\tstyle.replaceSync(cssText);\n\t\treturn style;\n\t}\n}\n\nForm.define();\n\nexport default Form;\nexport type {\n\tIFormItem,\n};\n"]}
|
package/dist/FormGroup.js
CHANGED
package/dist/FormGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormGroup.js","sourceRoot":"","sources":["../src/FormGroup.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,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AAC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,OAAO;QACV,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AAzDA;IADC,QAAQ,EAAE;6CACS;AAUpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACP;AAUpB;IAJC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;KACf,CAAC;wCACsB;AAMxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAChB;AAGX;IADC,QAAQ,EAAE;8CACkC;AAG7C;IADC,QAAQ,EAAE;4CACiB;AAjDvB,SAAS;IADd,aAAa,CAAC,gBAAgB,CAAC;GAC1B,SAAS,CAiEd;AAED,SAAS,CAAC,MAAM,EAAE,CAAC;AAEnB,eAAe,SAAS,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 slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\n\nimport type FormItem from \"./FormItem.js\";\nimport type { IFormItem } from \"./Form.js\";\nimport type FormItemSpacing from \"./types/FormItemSpacing.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The FormGroup (ui5-form-group) represents a group inside the Form (ui5-form) component\n * and it consists of FormItem (ui5-form-item) components.\n *\n * The layout of the FormGroup is mostly defined and controlled by the overarching Form (ui5-form) component.\n * Still, one can influence the layout via the FormGroup's `columnSpan` property,\n * that defines how many columns the group should expand to.\n *\n * ### Usage\n *\n * Тhe FormGroup (ui5-form-group) allows to split a Form into groups,\n * e.g to group FormItems that logically belong together.\n *\n * ### ES6 Module Import\n *\n * - import @ui5/webcomponents/dist/FormGroup.js\";\n *\n * @public\n * @implements {IFormItem}\n * @since 2.0.0\n * @experimental This component is availabe since 2.0 under an experimental flag and its API and behaviour are subject to change.\n * @extends UI5Element\n */\n@customElement(\"ui5-form-group\")\nclass FormGroup extends UI5Element implements IFormItem {\n\t/**\n\t * Defines header text of the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Defines column span of the component,\n\t * e.g how many columns the group should span to.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ type: Number })\n\tcolumnSpan?: number;\n\n\t/**\n\t * Defines the items of the component.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t})\n\titems!: Array<FormItem>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tcolsS = 1;\n\n\t@property({ type: Number })\n\tcolsM = 1;\n\n\t@property({ type: Number })\n\tcolsL = 1;\n\n\t@property({ type: Number })\n\tcolsXl = 1;\n\n\t@property()\n\titemSpacing: `${FormItemSpacing}` = \"Normal\";\n\n\t@property()\n\tlabelSpan = \"S12 M4 L4 XL4\";\n\n\tonBeforeRendering() {\n\t\tthis.processFormItems();\n\t}\n\n\tprocessFormItems() {\n\t\tthis.items.forEach((item: FormItem) => {\n\t\t\titem.labelSpan = this.labelSpan;\n\t\t\titem.itemSpacing = this.itemSpacing;\n\t\t});\n\t}\n\n\tget isGroup() {\n\t\treturn true;\n\t}\n}\n\nFormGroup.define();\n\nexport default FormGroup;\n"]}
|
package/dist/Icon.js
CHANGED
|
@@ -128,7 +128,7 @@ let Icon = class Icon extends UI5Element {
|
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
if (isEnter(e)) {
|
|
131
|
-
this.
|
|
131
|
+
this.fireDecoratorEvent("click");
|
|
132
132
|
}
|
|
133
133
|
if (isSpace(e)) {
|
|
134
134
|
e.preventDefault(); // prevent scrolling
|
|
@@ -136,7 +136,7 @@ let Icon = class Icon extends UI5Element {
|
|
|
136
136
|
}
|
|
137
137
|
_onkeyup(e) {
|
|
138
138
|
if (this.mode === IconMode.Interactive && isSpace(e)) {
|
|
139
|
-
this.
|
|
139
|
+
this.fireDecoratorEvent("click");
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
@@ -256,7 +256,9 @@ Icon = __decorate([
|
|
|
256
256
|
* @since 1.0.0-rc.8
|
|
257
257
|
*/
|
|
258
258
|
,
|
|
259
|
-
event("click"
|
|
259
|
+
event("click", {
|
|
260
|
+
bubbles: true,
|
|
261
|
+
})
|
|
260
262
|
], Icon);
|
|
261
263
|
Icon.define();
|
|
262
264
|
export default Icon;
|
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,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,gCA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C;CACD,CAAA;AAjMA;IADC,QAAQ,EAAE;oCACyB;AA4BpC;IADC,QAAQ,EAAE;kCACG;AAYd;IADC,QAAQ,EAAE;4CACa;AAUxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACR;AASpB;IADC,QAAQ,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;AA3F5B,IAAI;IAhBT,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,CAAC;GACT,IAAI,CAyMT;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.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\")\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.fireEvent(\"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.fireEvent(\"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,MA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M,EAAE,OAAO;KACf,CAAC;IACF;;;;;;OAMG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,IAAI,CAyMT;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.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"]}
|
package/dist/Input.js
CHANGED
|
@@ -347,7 +347,7 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
347
347
|
if (this.typedInValue.length && this.value.length) {
|
|
348
348
|
innerInput.setSelectionRange(this.typedInValue.length, this.value.length);
|
|
349
349
|
}
|
|
350
|
-
this.
|
|
350
|
+
this.fireDecoratorEvent("type-ahead");
|
|
351
351
|
}
|
|
352
352
|
this._performTextSelection = false;
|
|
353
353
|
}
|
|
@@ -550,7 +550,7 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
550
550
|
return;
|
|
551
551
|
}
|
|
552
552
|
const fireChange = () => {
|
|
553
|
-
this.
|
|
553
|
+
this.fireDecoratorEvent(INPUT_EVENTS.CHANGE);
|
|
554
554
|
this.previousValue = this.value;
|
|
555
555
|
this.typedInValue = this.value;
|
|
556
556
|
};
|
|
@@ -567,7 +567,7 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
567
567
|
_clear() {
|
|
568
568
|
const valueBeforeClear = this.value;
|
|
569
569
|
this.value = "";
|
|
570
|
-
const prevented = !this.
|
|
570
|
+
const prevented = !this.fireDecoratorEvent(INPUT_EVENTS.INPUT, { inputType: "" });
|
|
571
571
|
if (prevented) {
|
|
572
572
|
this.value = valueBeforeClear;
|
|
573
573
|
return;
|
|
@@ -582,13 +582,13 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
582
582
|
this._clearIconClicked = true;
|
|
583
583
|
}
|
|
584
584
|
_scroll(e) {
|
|
585
|
-
this.
|
|
585
|
+
this.fireDecoratorEvent("suggestion-scroll", {
|
|
586
586
|
scrollTop: e.detail.scrollTop,
|
|
587
587
|
scrollContainer: e.detail.targetRef,
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
_handleSelect() {
|
|
591
|
-
this.
|
|
591
|
+
this.fireDecoratorEvent("select", {});
|
|
592
592
|
}
|
|
593
593
|
_handleInput(e) {
|
|
594
594
|
const inputDomRef = this.getInputDOMRefSync();
|
|
@@ -702,7 +702,7 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
702
702
|
this.focused = false;
|
|
703
703
|
}
|
|
704
704
|
if (this._changeToBeFired) {
|
|
705
|
-
this.
|
|
705
|
+
this.fireDecoratorEvent(INPUT_EVENTS.CHANGE);
|
|
706
706
|
this._changeToBeFired = false;
|
|
707
707
|
}
|
|
708
708
|
this.open = false;
|
|
@@ -714,11 +714,11 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
714
714
|
}
|
|
715
715
|
_handlePickerAfterOpen() {
|
|
716
716
|
this.Suggestions?._onOpen();
|
|
717
|
-
this.
|
|
717
|
+
this.fireDecoratorEvent("open");
|
|
718
718
|
}
|
|
719
719
|
_handlePickerAfterClose() {
|
|
720
720
|
this.Suggestions?._onClose();
|
|
721
|
-
this.
|
|
721
|
+
this.fireDecoratorEvent("close");
|
|
722
722
|
}
|
|
723
723
|
openValueStatePopover() {
|
|
724
724
|
this.valueStateOpen = true;
|
|
@@ -756,7 +756,7 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
756
756
|
this.valueBeforeItemSelection = itemText;
|
|
757
757
|
this.lastConfirmedValue = itemText;
|
|
758
758
|
this._performTextSelection = true;
|
|
759
|
-
this.
|
|
759
|
+
this.fireDecoratorEvent(INPUT_EVENTS.CHANGE);
|
|
760
760
|
// value might change in the change event handler
|
|
761
761
|
this.typedInValue = this.value;
|
|
762
762
|
this.previousValue = this.value;
|
|
@@ -787,13 +787,13 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
787
787
|
this.valueBeforeSelectionStart = inputValue;
|
|
788
788
|
if (isUserInput) { // input
|
|
789
789
|
const inputType = e.inputType || "";
|
|
790
|
-
const prevented = !this.
|
|
790
|
+
const prevented = !this.fireDecoratorEvent(INPUT_EVENTS.INPUT, { inputType });
|
|
791
791
|
if (prevented) {
|
|
792
792
|
this.value = valueBeforeInput;
|
|
793
793
|
inputRef && (inputRef.value = valueBeforeInput);
|
|
794
794
|
}
|
|
795
795
|
// Angular two way data binding
|
|
796
|
-
this.
|
|
796
|
+
this.fireDecoratorEvent("value-changed");
|
|
797
797
|
this.fireResetSelectionChange();
|
|
798
798
|
}
|
|
799
799
|
}
|
|
@@ -889,7 +889,7 @@ let Input = Input_1 = class Input extends UI5Element {
|
|
|
889
889
|
}
|
|
890
890
|
fireSelectionChange(item, isValueFromSuggestions) {
|
|
891
891
|
if (this.Suggestions) {
|
|
892
|
-
this.
|
|
892
|
+
this.fireDecoratorEvent(INPUT_EVENTS.SELECTION_CHANGE, { item });
|
|
893
893
|
this._isLatestValueFromSuggestions = isValueFromSuggestions;
|
|
894
894
|
}
|
|
895
895
|
}
|
|
@@ -1242,15 +1242,27 @@ Input = Input_1 = __decorate([
|
|
|
1242
1242
|
* @public
|
|
1243
1243
|
*/
|
|
1244
1244
|
,
|
|
1245
|
-
event("change"
|
|
1245
|
+
event("change", {
|
|
1246
|
+
bubbles: true,
|
|
1247
|
+
})
|
|
1248
|
+
/**
|
|
1249
|
+
* Fired to make Angular two way data binding work properly.
|
|
1250
|
+
* @private
|
|
1251
|
+
*/
|
|
1252
|
+
,
|
|
1253
|
+
event("value-changed", {
|
|
1254
|
+
bubbles: true,
|
|
1255
|
+
})
|
|
1246
1256
|
/**
|
|
1247
1257
|
* Fired when the value of the component changes at each keystroke,
|
|
1248
1258
|
* and when a suggestion item has been selected.
|
|
1249
|
-
* @allowPreventDefault
|
|
1250
1259
|
* @public
|
|
1251
1260
|
*/
|
|
1252
1261
|
,
|
|
1253
|
-
event("input"
|
|
1262
|
+
event("input", {
|
|
1263
|
+
bubbles: true,
|
|
1264
|
+
cancelable: true,
|
|
1265
|
+
})
|
|
1254
1266
|
/**
|
|
1255
1267
|
* Fired when some text has been selected.
|
|
1256
1268
|
*
|
|
@@ -1258,7 +1270,9 @@ Input = Input_1 = __decorate([
|
|
|
1258
1270
|
* @public
|
|
1259
1271
|
*/
|
|
1260
1272
|
,
|
|
1261
|
-
event("select"
|
|
1273
|
+
event("select", {
|
|
1274
|
+
bubbles: true,
|
|
1275
|
+
})
|
|
1262
1276
|
/**
|
|
1263
1277
|
* Fired when the user navigates to a suggestion item via the ARROW keys,
|
|
1264
1278
|
* as a preview, before the final selection.
|
|
@@ -1274,6 +1288,7 @@ Input = Input_1 = __decorate([
|
|
|
1274
1288
|
*/
|
|
1275
1289
|
item: { type: HTMLElement },
|
|
1276
1290
|
},
|
|
1291
|
+
bubbles: true,
|
|
1277
1292
|
})
|
|
1278
1293
|
/**
|
|
1279
1294
|
* Fires when a suggestion item is autocompleted in the input.
|
|
@@ -1281,7 +1296,9 @@ Input = Input_1 = __decorate([
|
|
|
1281
1296
|
* @private
|
|
1282
1297
|
*/
|
|
1283
1298
|
,
|
|
1284
|
-
event("type-ahead"
|
|
1299
|
+
event("type-ahead", {
|
|
1300
|
+
bubbles: true,
|
|
1301
|
+
})
|
|
1285
1302
|
/**
|
|
1286
1303
|
* Fired when the user scrolls the suggestion popover.
|
|
1287
1304
|
* @param {Integer} scrollTop The current scroll position.
|
|
@@ -1301,6 +1318,7 @@ Input = Input_1 = __decorate([
|
|
|
1301
1318
|
*/
|
|
1302
1319
|
scrollContainer: { type: HTMLElement },
|
|
1303
1320
|
},
|
|
1321
|
+
bubbles: true,
|
|
1304
1322
|
})
|
|
1305
1323
|
/**
|
|
1306
1324
|
* Fired when the suggestions picker is open.
|
|
@@ -1308,14 +1326,18 @@ Input = Input_1 = __decorate([
|
|
|
1308
1326
|
* @since 2.0.0
|
|
1309
1327
|
*/
|
|
1310
1328
|
,
|
|
1311
|
-
event("open"
|
|
1329
|
+
event("open", {
|
|
1330
|
+
bubbles: true,
|
|
1331
|
+
})
|
|
1312
1332
|
/**
|
|
1313
1333
|
* Fired when the suggestions picker is closed.
|
|
1314
1334
|
* @public
|
|
1315
1335
|
* @since 2.0.0
|
|
1316
1336
|
*/
|
|
1317
1337
|
,
|
|
1318
|
-
event("close"
|
|
1338
|
+
event("close", {
|
|
1339
|
+
bubbles: true,
|
|
1340
|
+
})
|
|
1319
1341
|
], Input);
|
|
1320
1342
|
Input.define();
|
|
1321
1343
|
export default Input;
|