Giter VIP home page Giter VIP logo

sap / ui5-webcomponents Goto Github PK

View Code? Open in Web Editor NEW
1.5K 57.0 258.0 92.8 MB

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.

Home Page: https://sap.github.io/ui5-webcomponents/

License: Apache License 2.0

Shell 0.01% JavaScript 26.05% HTML 27.04% CSS 17.55% Handlebars 2.29% TypeScript 25.90% MDX 1.17%
open-source ui5 ui5-webcomponents web-component webcomponent

ui5-webcomponents's Introduction

UI5 iconUI5 Web Components

CI npm Package Version REUSE status

  • A rich set of enterprise-grade reusable UI elements driven by a lightweight framework (~20K gzipped for the framework part).
  • Suitable for building anything from static web sites to complex web applications.
  • Usable with any current or future web development framework (React, Angular, Vue, etc.).
  • Implement the SAP Fiori design and follow the SAP Fiori Design Guidelines for a consistent UX.
  • Created and maintained by SAP as part of the UI5 product family.

Why use web components?

  • Future-proof: being web standards, they are compatible with any version of any web development framework.
  • Encapsulated: the HTML/CSS in the shadow DOM are protected from interference by the web page and vice versa, making them stable in any environment and suitable not only for apps, but also for libraries and micro-frontends.
  • Elegant: being custom HTML elements, they hide implementation complexity behind a single HTML tag, making them easily usable with the standard DOM APIs.

Where can I see them in action?

More Resources

Related Projects

OpenUI5

1. What is UI5/OpenUI5?

OpenUI5 is an open source JS framework that lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice. It's based on JavaScript, using jQuery as its foundation and follows web standards. It eases your development with a client-side HTML5 rendering library including a rich set of controls and supports data binding to different data models (JSON, XML and OData).

2. How do UI5 Web Components relate to OpenUI5?

UI5 Web Components…

  • …are not built on top of UI5, but rather lightweight and independent UI elements.
  • …are not a successor of UI5, but rather a complementary offering.
  • …bring the relevant UI5 qualities and SAP Fiori UX to the HTML level, usable with any web framework.

UI5 Web Components are good for…

  • …web applications which already use a different web framework.
  • static web sites built without web frameworks, to just add a few interactive UI elements.

UI5 remains what it is: the best choice for…

  • …building complete enterprise-ready and responsive web applications.

UI5 Web Components for React

UI5 Web Components for React is a wrapper implementation around UI5 Web Components which makes using them in React even more comfortable. The current version of React (react 18) has some shortcomings when it comes to handling Custom Elements, namely the binding of boolean attributes as well as adding event listeners to custom event names like selection-change. With the help of UI5 Web Components for React, you can use the UI5 Web Components in React as if they were native React components. In addition to that, this library is also offering TypeScript definitions for all components, some complex layout components built on top of UI5 Web Components as well as Charting Components.

UI5 Web Components for Angular

UI5 Web Components for Angular is a wrapper implementation around UI5 Web Components which to make it work with Angular without needing to use the CUSTOM_ELEMENTS_SCHEMA or NO_ERRORS_SCHEMA schemas. Moreover, all Angular-specific features, such as two-way data binding and Angular Form support, work out of the box.

How to Use

  1. Install the NPM module(s) that ship the desired UI5 Web Component(s), for example if you need ui5-button:

    npm install @ui5/webcomponents
  2. Import the desired UI5 Web Component(s) to your app:

    import "@ui5/webcomponents/dist/Button.js"; // loads and defines ui5-button
  3. Use the UI5 Web Component(s) as you would use any HTML element:

    <ui5-button>Hello world!</ui5-button>

    For more information, see Importing UI5 Web Components and Understanding UI5 Web Components APIs.

Typescript Support

TypeScript Support is enabled for both component development and component consumption. Since version 1.11.0, we have been providing TypeScript definitions under an experimental flag, and starting from version 1.19.0, all TypeScript definitions are considered stable.

Is there a CDN I can use?

No, you are expected to import only the components (or other public APIs) that you are going to use and bundle them along with the rest of your application.

Browser Support

UI5 Web Components are supported by all major modern browsers.

Browser Supported versions
Chrome Latest two stable releases
Firefox Latest two stable releases
Safari Latest two stable releases
Edge Latest two stable releases

Project Structure, Development and Build

This section might be of interest to you mainly if you need to run or build the project locally

Requirements

  • Node.js (version 21 or higher)
  • Yarn (version 1.22 or higher)

Note: The UI5 Web Components project is set up with the Yarn node package manager. This is because it offers functionality that the otherwise preferred npm package manager is currently lacking. Namely, the workspace setting which is currently used in the UI5 Web Components (mono-)repository. Note that npm might add this feature in the future.

Structure

The UI5 Web Components project contains several packages:

Project NPM Package Description
main UI5 Web Components - Main Bread-and-butter components (buttons, inputs, popups, pickers, tables, etc.) that are generally found in web apps.
fiori UI5 Web Components - Fiori More semantic components, specific to the Fiori UX (shell bar, side navigation, etc.) that are commonly found in SAP apps.
icons UI5 Web Components - Icons A rich icons collection (SAP-icons), suitable for enterprise-grade apps
icons-tnt UI5 Web Components - Icons TNT A rich icons collection (SAP-icons-TNT), suitable for more technical apps
icons-business-suite UI5 Web Components - Icons Business Suite A rich icons collection (BusinessSuiteInAppSymbols), suitable for SAP Fiori apps
base UI5 Web Components - Base The UI5 Web Components framework itself
theming UI5 Web Components - Theming Theming assets (the default theme and additional accessibility themes)
localization UI5 Web Components - Localization i18n functionality and CLDR assets
create-package Create Webcomponents Package An npm init script for creating new UI5 Webcomponents Packages
playground N/A The playground application

How to run the project locally:

yarn # to install all dependencies
yarn start # to serve the project

A dev server will be started and the browser will open its index URL with a listing of all test pages.

How to start Website (Docs & Samples):

You can start the website app with the following commands:

yarn # to install all dependencies

# start the playground from the project root
yarn start:website

# open http://localhost:3000/ui5-webcomponents/nightly/

Note: If you wish to manually install dependencies & run the Playground you can check out our in depth tutorial

Production Build

To build the UI5 Web Components project, run the following commands:

yarn # to install all dependencies
yarn ci:releasebuild # to build the project

Afterwards, you can find the build output in the dist folder of the corresponding package folder. For example, to find the Button component (that belongs to the main package), look inside the packages/main/dist folder.

Limitations

None as of 1.24.0

Known Issues

No major bugs known. To report an issue or view the currently open issues, click here.

Support

We welcome all comments, suggestions, questions, and bug reports. Please follow our Support Guidelines on how to report an issue, or chat with us in the #webcomponents channel of the OpenUI5 Community Slack.

Contribute

Please check our Contribution Guidelines.

ui5-webcomponents's People

Contributors

dependabot[bot] avatar dimovpetar avatar dobrinyonkov avatar elenastoyanovaa avatar fifoosid avatar georgimkv avatar hinzzx avatar ilhan007 avatar ivoplashkov avatar kgogov avatar kskondov avatar lidiyageorgieva avatar lukas742 avatar mapto0 avatar marcusnotheis avatar ndeshev avatar nhristov-sap avatar niyap avatar nnaydenow avatar petyamarkovabogdanova avatar plamenivanov91 avatar pskelin avatar service-tip-git avatar teodortaushanov avatar todor-ads avatar tsanislavgatev avatar ui5-webcomponents-bot avatar unazko avatar vladitasev avatar yanaminkova avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ui5-webcomponents's Issues

Display documentation for released version

Describe the documentation issue

When browsing the documentation, I am actually looking at the latest state in master, however following the steps and installing from npm, I get a specific version that has mismatches from what is in the documentation at the time of looking at it.

It should be possible to look at both the released version documentation as well as the master documentation and be able to switch. The default on the site should be what the released version is.

<ui5-select> - multi select option

Is your feature request related to a problem? Please describe.
It would be great to have a web component that provides the possibility to select multiple items from a predefined list. Currently the ui5-select component only supports the selection of one item.

Describe the solution you'd like
I would like to use the ui5-select component to select single or also multiple items. I would think of a new boolean property, which enables/disables the multi-select. If multi-select is enabled the change event has to be adjusted in such a way that you get a list of the selected items.

Describe alternatives you've considered
Instead of a new boolean property, which enables/disables the multi-select functionality, a "mode" property could maybe be introduced in order to support the requested feature.

Additional context
The ui5-list web component already supports single and multiple selection. I would think of a similar functionality for the select.
Please let me know if you have any additional questions/comments regarding my request. :-)

<ui5-shellbar> - option to hide primary title dropdown

First of all, I would like to express my gratitude for the SAPUI5 web-components. I have the feeling, that this is a great addition to use and I am happy, to use those inside my applications.

Is your feature request related to a problem? Please describe.
I would like to use the ui5-shellbar component as some kind of page header, whereas I would only use the primary-title property (maybe some others) to show the title to the end-user.
Unfortunately, the primary-title has always this dropdown arrow assigned, even if it has no functionality:
image

Describe the solution you'd like
I would like to have the possibility to "enable" this dropdown functionality. I would think of a new boolean property, which will show/hide it and make the title clickable respectively.

Describe alternatives you've considered
There is no other "page header" component. Therefore the only suitable solution would be to use plain css, which I would like to avoid. Especially, when there is a header component.

styling of ui5 webcomponents

I would like to override some of the classes. e.g .sapWCSelect
As Chrome decided to remove support of shadow-dom css selectors and /deep/ and ::shadow are not an option.

What would be the best way of styling an ui5-webcomponent?

Button keeps 'pressed' state when holding the Space key and then pressing TAB

Describe the bug
Pressed state doesn't get handled properly

To reproduce
Steps to reproduce the behavior:

  1. Go to 'https://sap.github.io/ui5-webcomponents/playground/components/Button/'
  2. Move the focus into a not pressed button
  3. Hold Space down, press TAB

Expected behavior
The Button loses it's pressed state after Tab is pressed

Screencast
If applicable, add screenshots to help explain your problem.
Button keeps pressed state when holding the Space key and then pressing TAB.zip

Context

  • UI5 Web Components version: 0.8.0
  • OS/Platform: {Win 10/Desktop}
  • Browser (if relevant): {Chrome latest}
  • Other information: {N/A}

Affected components (ui5-button)

Log output / Any errors in the console

{N/A}

Timeline throws an error

Describe the bug
When a ui5-timeline-item is added to ui5-timeline, we can see the following error in the console:

DateFormat.js:147 Uncaught (in promise) TypeError: sap.ui.getWCCore is not a function
at Function.push../node_modules/@ui5/webcomponents-core/dist/sap/ui/core/format/DateFormat.js.DateFormat.createInstance (DateFormat.js:147)
at Function.push../node_modules/@ui5/webcomponents-core/dist/sap/ui/core/format/DateFormat.js.DateFormat.getDateTimeInstance (DateFormat.js:125)
at calculate (TimelineItemTemplateContext.js:15)

To reproduce
Steps to reproduce the behavior:

  1. Add ui5-timeline to your application
  2. Add ui5-timeline-item
  3. Check your console

Expected behavior
No error is thrown.

Affected components (if known)
ui5-timeline-item(ui5-timeline)

label for should work for all input components

Describe the bug
The "for" attribute of the label focuses correctly the associated element, but it should correctly point to the inner-most DOM element for the screen reader to work for all components besides the ui5-input

To reproduce

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/Input/
  2. Scroll to the section "Input with Label"
  3. The label "for" attribute points to the internal input of ui5-input

Expected behavior
It should work for all kinds of input controls besides ui5-input.

Context

  • UI5 Web Components version: master

Toggle panel when clicking label

Describe the bug
To collapse / expand a ui5-panel, it is currently required to click/touch the chevron icon. Clicking the label (header-text) has no effect.

To reproduce
Steps to reproduce the behavior:

  1. Try clicking on the panel label on https://sap.github.io/ui5-webcomponents/playground/components/Panel/

Expected behavior
When clicking the label, the panel is toggled the same way as clicking the chevron.

I.e. this should be similar to a radio button, where clicking the label also selects the option.

Vuejs integration

Hi,

Experimenting with the vue cli and various setups to try and get UI5 webcomponents working. Few questions.

  • @ui5/webcomponents/dist/ does not seem to have an index file. Do all elements need to be imported individually?
  • import "@ui5/webcomponents/dist/DatePicker" generates a date picker (yay!), but also the following error in the console:

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

Trying to register by trying to import DatePicker from ... and a subsequent Vue.use or Vue.component('ui5-datepicker', DatePicker) resulted in:

vue.runtime.esm.js?2b0e:5049 Uncaught TypeError: Class constructor DatePicker cannot be invoked without 'new'

Less related but worth mentioning, when trying this in a TypeScript environment (otherwise same setup), the console also mentioned:

ToolsAPI.js:6 Uncaught TypeError: sap.ui.define is not a function
at ToolsAPI.js:6

.. which, indeed, was not present when expecting the window object.

Is there a basic setup you guys are using, or are these outstanding still in the current version?

DatePicker is not consistently managing user entry. Specific 'Tomorrow' or similar

Describe the bug
Inserting 'Tomorrow' in the Datepicker field does not work all times.

To reproduce
Steps to reproduce the behavior:

  1. Go to 'https://sap.github.io/ui5-webcomponents/'
  2. Scroll to the section 'Test the UI5 Web Components'
  3. Insert 'Tomorrow' and press the Enter key
  4. Press CTRL+A to select the contents
  5. Insert 'Tomorrow' and press the Enter key

Expected behavior
Tomorrow will be translated into the proper date of tomorrow.

Screencast
My Video does describe the issue

DatePicker is not consistently managing user entry.zip

Context

  • UI5 Web Components version : 0.8.0
  • OS/Platform: {Windows 10/Desktop}
  • Browser (if relevant): {Chrome latest}
  • Other information: {N/A}

Affected components (ui5-datepicker)

Log output / Any errors in the console

N/A

dialog overlay hides page content when there is a message-strip

Describe the bug
Opening a dialog causes the whole page content behind the overlay to disappear

To reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/p9m5w08q80
  2. Click the open button
  3. The open button disappears

Expected behavior
the open button should be visible behind the overlay. If the message strip is removed from the page the button stays as expected, so this behaviour is influenced by the message strip shomehow.

Screenshots
If applicable, add screenshots to help explain your problem.

Context

  • UI5 Web Components version: 0.10.1
  • OS/Platform: MacOS
  • Browser (if relevant): Chrome
  • Other information: {...}

Affected components
ui5-dialog
ui5-messagestrip

List navigation handling is broken

Describe the bug
A clear and concise description of what the bug is.

Pressing Shift + Tab on List Item is throwing an error in the console.

To reproduce
Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/List/
  2. Focus any List Item
  3. Tab Shift + Tab
  4. Check your console.

Expected behavior
A clear and concise description of what you expected to happen.

No error is thrown.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Context

  • UI5 Web Components version: 0.8.0
  • OS/Platform: {MAC}
  • Browser (if relevant): {Chrome}

Affected components (if known)
ListItemBase

Log output / Any errors in the console

In the screenshot

splitter layout?

Are any plans to support a splitter layout in ui5-webcomponents? I'm looking for something in the
lines of sap.ui.layout.ResponsiveSplitter or sap.f.FlexibleColumnLayout from UI5.

Missing rounded corners in <ui5-popover>

Describe the bug
On https://sap.github.io/ui5-webcomponents/playground.html#/components/Popover
When opening the popover, the top corners are rounded and the bottom not:
ui5 web components - playground 2019-02-12 22-12-35

I assume it might be a design decision to round only top corners, but it doesn't look so because in such scenarios the contrast is normally higher (e.g. 3-5 time bigger border-radius, example — https://i.stack.imgur.com/srHXl.png).

Expected behavior
all 4 corners should be rounded or not, or have an explicit contrast.

ShellBar: Inconsistent Event Handler

Describe the bug
A clear and concise description of what the bug is.
According to the documentation, the events notificationsPress, productSwitchPress, profilePress and titlePress should all have the detail iconRef.
This seems not the be the case at the moment.

Current Content of event.detail:

  • titlePress: iconRef ✅
  • productSwitchPress: detail
  • profilePress: iconRef ✅
  • notificationsPress: null

To reproduce
Steps to reproduce the behavior:

  1. Open the playground URL: https://sap.github.io/ui5-webcomponents/playground/components/ShellBar/
  2. Open the development tools and insert the following snippet:
    var shellbar = document.querySelector('#shellbar');
    shellbar.addEventListener('notificationsPress', (e) => console.log(e.type, e.detail))
    shellbar.addEventListener('productSwitchPress', (e) => console.log(e.type, e.detail))
    shellbar.addEventListener('profilePress', (e) => console.log(e.type, e.detail))
    shellbar.addEventListener('titlePress', (e) => console.log(e.type, e.detail))
  3. Click on the respective icons in the first Shell bar and look at the console output:
    productSwitchPress {detail: ui5-icon#__el26-item4..sapWCShellBarIconButton.sapWCShellBarIconProductSwitch}
    profilePress {iconRef: div#__el26-item-3..sapWCShellBarImageButton.sapWCShellBarIconButton}
    notificationsPress null
    titlePress {iconRef: button.sapWCShellBarMenuButton}

Expected behavior
A clear and concise description of what you expected to happen.
I would expect all details to contain iconRef

Context

  • UI5 Web Components version: 0.9.0
  • OS/Platform: macOS 10.14.4
  • Browser (if relevant): Chrome 73.0.3683.86
  • Other information: {...}

Affected components (if known)
ui5-shellbar

Panel does not display if DatePicker is not imported (React)

Describe the bug
In my React application Panel would not display until I imported the DatePicker even though
no DatePicker was displayed

Please find stacktrace below.

To reproduce

  1. clone react example project https://github.com/SAP/ui5-webcomponents-sample-react
  2. in the App.js remove the DatePicker reference so as the DatePicker import
  3. Yarn start => the Panel won't show
  4. Import back the DatePicker => the Panel shows up

Expected behavior
Panel should display even without importing the DatePicker

Screenshots
If applicable, add screenshots to help explain your problem.

Context

  • UI5 Web Components version 9
  • OS/Platform: MAcOs
  • Browser (if relevant): Chrome
  • Other information: {...}

Affected components (if known)

Log output / Any errors in the console
Uncaught TypeError: ui_thirdparty_jquery__WEBPACK_IMPORTED_MODULE_0_.default.extend is not a function
at Object.push../node_modules/@ui5/webcomponents-core/dist/sap/base/util/LoaderExtensions.js.LoaderExtensions.loadResource (LoaderExtensions.js:56)
at Function.push../node_modules/@ui5/webcomponents-core/dist/sap/base/util/Properties.js.Properties.create (Properties.js:154)
at tryToLoadNextProperties (ResourceBundle.js:282)
at loadNextPropertiesSync (ResourceBundle.js:244)
at new ResourceBundle (ResourceBundle.js:126)
at Function.push../node_modules/@ui5/webcomponents-core/dist/sap/base/i18n/ResourceBundle.js.ResourceBundle.create (ResourceBundle.js:310)
at getResourceBundle (ResourceBundle.js:113)
at new Panel (Panel.js:225)
at Function.define (WebComponent.js:589)
at Function._callee$ (Panel.js:306)
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:282)
at Generator.prototype.(:3001/anonymous function) [as next] (http://localhost:3001/static/js/1.chunk.js:52949:21)
at asyncGeneratorStep (asyncToGenerator.js:3)
at _next (asyncToGenerator.js:25)

doc: API build does not merge parent API for additional components

Describe the bug
The selected and type properties are missing in StandardListItem properties section,
although StandardListItem inherits them. This is because the component is part of the List API and at the time the List API is generated, the StandardListItem API calculation is not completed - the base properties are not yet merged.

To reproduce
Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/List/
  2. Scroll to the StandardListItem API Reference
  3. The properties "type" and "selected" are missing

Expected behavior
The api should be generated and displayed correctly for all public properties, including inherited ones.

Affected components (if known)
ui5-li

TabContainer not working in Angular and WebComponents version 0.10

Describe the bug
When using the TabContainer within an Angular application and version 0.10, the TabContainer is not loading.

To reproduce
Steps to reproduce the behavior:

  1. Import TabContainer dependency
  2. Place TabContainer example from playground into application
  3. TabContainer is not loading, error thrown in console

Context

  • UI5 Web Components version: 0.10
  • OS/Platform: OSX
  • Browser (if relevant): Chrome

Affected components
TabContainer in version 0.10 (previous version 0.9 works fine)

Log output / Any errors in the console
Screenshot 2019-05-02 at 09 11 24

Method in DatePicker to get Date instead of string

Is your feature request related to a problem? Please describe.
DatePicker control adopts a similar API as a standard HTMLInputElement, with attribute value as a string with inputed date following format provided by format-pattern.

Problem is that we often need a Date object instead of a string, as each locale has a particular format, so, string will force us to verify current locale and parse it into an object.

Describe the solution you'd like
A method such as getDateValue in the control, which will return a Date object instead of string.

Describe alternatives you've considered
If that solution is problematic, providing getFormat as part of official API should be helpful, at least.

Additional context
Version: 0.7.0

Panel icon outline wrong on small screen width

Describe the bug
When the screen witdh is small, the height of the outline of the panel icon is too small instead of rectangular.

To reproduce
Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/Panel/
  2. Resize the browser window to be very small (400 px works)
  3. Click the panel icon to show the outline

Expected behavior
The icon outline should be rectangular

Screenshots
image

Context

  • UI5 Web Components version: master
  • OS/Platform: MacOS
  • Browser: Chrome
  • Other information: no

Affected components
ui5-icon (seen in ui5-panel)

Log output / Any errors in the console
none

HTML Form support

A little feedback
I am impressed by UI5 Web Components and advertise them heavily as "the future is here" in my work environment. Keep up the good work!

My idea/ suggestion
At work we use two different styles of web apps. For highly interactive applications we build SPAs (currently with OpenUI5 or Angular). For small, more workflow based applications we use classic server side rendering as you could do it e.g. with express in node.js. The latter style is well described by the ROCA pattern: https://roca-style.org/

Using UI5 Web Components for SPAs is straightforward and very well demonstrated by the three example Todo apps (good job!). However, we'd love to use at least a subset of UI5 Web Components also for server-side generated pages.

When working with server-side generated pages you exchange data between client and server using classic HTML forms since most of the modern action-based server frameworks support automatic data binding for form data.

After doing some reading I understand that a Web Component need to explicitly support HTML forms. This is usually done by a more or less ugly hack using a hidden form element.

From an API perspective I could imagine to enable HTML form support explicitly:

<form>
  Name: <ui5-input value="Input" insideForm="true"></ui5-input>
  <ui5-button type="Default" insideForm="true">Submit</ui5-button>
</form>

My attribute name insideForm is of course up for discussion ;-)

What do you think?

Overflow Toolbar

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Are there any plans to add a component like the "classic" SAPUI5 OverflowToolbar? This would help us e.g. building an ObjectPageLayout on top of the ui5-webcomponents.

Describe the solution you'd like
A clear and concise description of what you want to happen.
I would like to have an Overflow Toolbar like in SAPUI5: https://sapui5.hana.ondemand.com/#/entity/sap.m.OverflowToolbar

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
none

Additional context
Add any other context or screenshots about the feature request here.

Theme synchronaziton between Fiori page and ui5-webcomponents

Is your feature request related to a problem? Please describe.
I have a fiori-launchpad, and develop some page based on UI5 technology. Now some partner build his webcomponents using ui5 webcomponents, and plug his webcomponents into my fiori app page.
It works, however, when my fiori app is changed to another theme. The look and feel of partner's webcomponents is not changed.
I guess it is because the fiori app doesn't communication with the ui5 webcomponents to sync the theme.

Describe the solution you'd like
I hope fiori page can raise theme change event using browser standard event emitter, and all ui5 webcomponents listen to the event and change its theme accordingly.

Describe alternatives you've considered
Or ui5 webcomponents to provide a API to change its theme. Partner's webcomponent can listen to the theme change event, and invoke the ui5 webcomponents's API later on.

Additional context
image

No Data Text for Table Component

In the table component, I'm missing the ability to set a specific text when there is no data to be loaded. Like in the UI5 we have the property noDataText for the component sap.m.Table or others like it. The current behavior is letting an empty table, that might not clarify what is going on to the user.

I've tried also to use only one ui5-table-row with a ui5-table-cell inside it and change its colspan and other properties to fill all header spaces I have in my table. But it does not work, It does not render right the table component.

So I want to rise this to you and discuss what would be the best approach to this issue.

Description text of StandardListItem is broken in compact

Describe the bug
A clear and concise description of what the bug is.

Description text of Standard List Item is cut in compact mode.

To reproduce
Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/List/
  2. Change the Content Density to Compact
  3. Check out the first example

Expected behavior
A clear and concise description of what you expected to happen.

Description text is not cut off.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Context

  • UI5 Web Components version
  • OS/Platform: {MAC}
  • Browser (if relevant): {Chrome}

Affected components (if known)
StandardListItem

TabContainer Overflow: Incorrect Scrolling

Describe the bug
A clear and concise description of what the bug is.

The Text Only Tab Container has an incorrect scrolling behaviour in the overflow mode.
If you click on the right icon the container scrolls to the right.
If you click in the left icon, the container scrolls to the right too.

This is only happening for the Text Only mode, in the Basic TabContainer example it is working as expected.

I could reproduce this error in my local project too, so I would guess it is more a issue with the component itself than with the playground.

To reproduce
Steps to reproduce the behavior:

  1. Open the playground
  2. Make the screen width smaller to activate the overflow mode
  3. Click on the overflow icons on both the Basic and the Text Only example
  4. Basic TabContainer is working fine, Text Only Tab Container has the described issue

Expected behavior
A clear and concise description of what you expected to happen.
After clicking the left icon I expect the container to scroll to the left.

Context

  • UI5 Web Components version: 0.7.0
  • OS/Platform: MacOS Mojave 10.14.3
  • Browser (if relevant): Chrome 72.0.3626.119

Affected components (if known)
TabContainer

ui5-datepicker: js error is thrown, when removing its "value" attribute

Describe the bug
js error is thrown, when removing DatePicker`s "value" attribute

To reproduce
Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/DatePicker/
  2. Select random date within the first datepicker in the sample section
  3. Inspect the element and remove the "value" attribute via $0.removeAttrbite("value")
  4. Observe the error in the console

Context
The reference vue app, where the issue is found:
SAP-samples/ui5-webcomponents-sample-vue#14

Affected components (if known)
ui5-datepicker

Log output / Any errors in the console

Uncaught TypeError: Cannot read property 'trim' of null

Problem rendering <ui5-link>, no link rendered.

Describe the bug
Im using ui5-webcomponents on our enterprise application, using LitElement/Polymer as base.

Using <ui5-link> inside a <ui5-li> informing a href, target, no link is rendered. The style of active is added, almost everything is happening as expected, except the link.

<ui5-li id="test" type="Active" icon="sap-icon://navigation-right-arrow" icon-end>
    <ui5-link href="/test" target="_self">test</ui5-link>
</ui5-li>

To reproduce
Use a <ui5-link> inside a <ui5-li>.

Expected behavior
I expected to have browsers URL changed, but this does not happen. If this is correct, pardon me for my bug report.

Screenshots
If applicable, add screenshots to help explain your problem.

Context

  • UI5 Web Components version: 0.8.0
  • OS/Platform: macOS mojave
  • Browser: Chrome

Affected components (if known)

<ui5-link>

Select "cannot read property 'textContent' of null"

Describe the bug
A clear and concise description of what the bug is.

When dynamically changing the StandardListItems of a Select and in addition setting the selected prop this error occurs. Also the text inside the Select does not update with the selected prop.

To reproduce
Steps to reproduce the behavior:

  • have a select which items are coming via ...map( i => StandardListItem)
  • change array to map over by state-update
  • again set selected prop for each StandardListItem

Expected behavior
A clear and concise description of what you expected to happen.

  • Select renders correct StandardListItems and set selected if provided

Screenshots
If applicable, add screenshots to help explain your problem.

Bildschirmfoto 2019-04-17 um 16 13 39

Context

  • UI5 Web Components version
  • OS/Platform: {...}
  • Browser (if relevant): {...}
  • Other information: {...}

Affected components (if known)

Select, StandardListItem
Log output / Any errors in the console

{...}

Card: Event for headerPress

Is your feature request related to a problem? Please describe.

I would like to use the Card Web Component as a navigation trigger to another page. When hovering the header, there is also visual feedback (background gets darker), but there is no event fired.

Describe the solution you'd like

I would like to have an event headerPress (or any other name you prefer) that is fired when the header section of the Card gets pressed.

Describe alternatives you've considered

None.

Additional context
Add any other context or screenshots about the feature request here.
Screenshot 2019-03-25 at 11 53 38

IE11 Browser Support

Describe the bug
I have an angular app which currently uses the DatePicker and TabContainer webcomponents and added the IE11 browsersupport import before.

When I open the app in IE11 I get a blank page and an error in the console.

Syntax Error
vendor.bundle.js

When I jump to the code line of the error I can see an arrow function from the Configuration.jsfile of the ui5 web components base package.
Since arrow functions were introduced in ES6 I think Internet Explorer can’t handle the code. Should base-component be compiled to ES5?

I also tested with the ui5-webcomponents-sample-angular. It has the Edge browser support import but crashes when I change it to the IE11 browser support (then the whole app stops working, even in chrome)

Expected behavior
The page should work as in chrome / firefox.

Context

  • 0.8.0
  • IE11

Affected components (if known)
This is the file where IE11 throws an error
https://github.com/SAP/ui5-webcomponents/blob/master/packages/base/src/sap/ui/webcomponents/base/Configuration.js#L14

Thanks for your support!

Configuration issues in the playground in IE only

Describe the documentation issue
Configuration issues in the playground, that can be seen in IE only.

Description of the issue

  • Setting Compact only - sets RTL as well, but should not.
  • Once you switch to Compact, you can`t switch back to Cozy.

Add Support to Busy Indicator

Are there any plans to support the BusyIndicator? Like the current one sap.m.BusyIndicator so when something is loading we can show this to the user.

Input does not accept SPACE in TabContainer

Describe the bug
A clear and concise description of what the bug is.
When used within a TabContainer, the Input Component does not accept the SPACE and this keystroke is ignored.

To reproduce
Steps to reproduce the behavior:

  1. Render a ui5-input in a ui5-tab:
    <ui5-tabcontainer selected-index="0">
     <ui5-tab text="Tab 1">
         <ui5-input value="Input" />
     </ui5-tab>
    </ui5-tabcontainer>
  2. Select the input field and start typing. The space key is ignored.

Expected behavior
A clear and concise description of what you expected to happen.
I would expect that the Input accepts all keystrokes.

Screenshots
If applicable, add screenshots to help explain your problem.

Context

  • UI5 Web Components version: 0.9.0
  • OS/Platform: macOS 10.14.4
  • Browser (if relevant): Chrome 73.0.3683.103

Affected components (if known)
ui5-input in combination with ui5-tabcontainer/ui5-tab

Styling issues with several component samples in IE

Describe the documentation issue
Component samples in IE such as Button, Checkbox, RadioButton have styling issues.

Description of the issue
Those components samples are expanded to full width, which does not look good.

Failed to fetch dynamically imported module: http://127.0.0.1:8081/node_modules/@ui5/webcomponents/dist/Button.js

Describe the bug
I want to create a custom element extending lit-element.
Within this element I want to use <ui5-button/>.
Unfortunately my initial import for the button fails:

import('@ui5/webcomponents/dist/Button');

Log output / Any errors in the console

Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://127.0.0.1:8081/node_modules/@ui5/webcomponents/dist/Button.js

Failed to load module script: The server responded with a non-JavaScript MIME type of "application/json". Strict MIME type checking is enforced for module scripts per HTML spec.

Root cause seem to be the import calls for json files in Button.js,
e.g. import belize from './themes/sap_belize/Button.json';

To reproduce

import { LitElement, html } from 'lit-element';
import('@ui5/webcomponents/dist/Button');
export class MyElement extends LitElement {
  render() {
    return html`
      <ui5-button>Hello world!</ui5-button>
    `;
  }
}
customElements.define('my-element', MyElement);

Expected behavior
import call should just work as expected

Context

  • UI5 Web Components version: 0.7.0
  • Browser: Chrome 72.0.3626.109
  • Other information: polymer-cli 1.9.6, lit-element 2.0.1

Affected components
all

ui5-li-custom: can`t set height to the custom content

Describe the bug
The CSS height of the custom element in the ui5-custom-li "content" slot is not applied.

To reproduce
Steps to reproduce the behavior:

  1. Define ui5-li-custom
  2. Provide custom DIV element to the "content" slot
  3. Set random height via CSS

Expected behavior
The height is applied properly to the DIV element

Affected components (if known)
ui5-custom-li

Inaccurate calendar behaviour on critical values

Describe the bug
unexpected behaviour of the calendar component on critical values:

  • on big values the components shows nothing:

screenshot 2019-02-12 at 21 07 45

  • on small values the component shows strange year format:

screenshot 2019-02-12 at 21 08 07

Expected behavior
The component should work properly with any specified date OR limit min/max possible dates accordingly (see calendar implementation e.g. in Outlook).

no-conflict events should not dispatch the original event

Describe the bug
When using no-conflict for the press event, a ui5-press event is dispatched as expected, but the press event is also dispatched.

Expected behavior
If I provide a no-conflict for an event, the assumption is that there is other framework or future browser functionality that provides some functionality with the original event name (example: hammer js fires a press). If the app has a press handler for the hammerjs usage, getting an event from the ui5 webcomponent is wrong.

additional difficulties
The original event names are used in the templates, and the event names are decided at build time. This means all components using events of other components they embed should also use the no-conflict event name as the orignal one will stop being fired.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.