Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui5-li-notification, ui5-li-notification-group): migrate to TypeScript #6568

Merged
merged 7 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions packages/fiori/src/NotificationAction.js

This file was deleted.

87 changes: 87 additions & 0 deletions packages/fiori/src/NotificationAction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
import ButtonDesign from "@ui5/webcomponents/dist/types/ButtonDesign.js";
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
import event from "@ui5/webcomponents-base/dist/decorators/event.js";

/**
* @class
* The <code>ui5-notification-action</code> represents an abstract action,
* used in the <code>ui5-li-notification</code> and the <code>ui5-li-notification-group</code> items.
*
* @constructor
* @author SAP SE
* @alias sap.ui.webc.fiori.NotificationAction
* @extends sap.ui.webc.base.UI5Element
* @abstract
* @tagname ui5-notification-action
* @implements sap.ui.webc.fiori.INotificationAction
* @public
*/
@event("click")
@customElement("ui5-notification-action")
hinzzx marked this conversation as resolved.
Show resolved Hide resolved
class NotificationAction extends UI5Element {
/**
hinzzx marked this conversation as resolved.
Show resolved Hide resolved
* Defines the text of the <code>ui5-notification-action</code>.
*
* @type {string}
* @defaultvalue ""
* @public
* @name sap.ui.webc.fiori.NotificationAction.prototype.text
*/
@property()
text!: string;

/**
* Defines if the action is disabled.
* <br><br>
* <b>Note:</b> a disabled action can't be pressed or focused, and it is not in the tab chain.
*
* @type {boolean}
* @defaultvalue false
* @public
* @name sap.ui.webc.fiori.NotificationAction.prototype.disabled
*/
@property({ type: Boolean })
disabled!: boolean;

/**
* Defines the action design.
*
* <br><br>
* <b>Note:</b>
* <ul>
* <li><code>Default</code></li>
* <li><code>Emphasized</code></li>
* <li><code>Positive</code></li>
* <li><code>Negative</code></li>
* <li><code>Transparent</code></li>
* </ul>
*
* @type {sap.ui.webc.main.types.ButtonDesign}
* @defaultvalue "Transparent"
* @public
* @name sap.ui.webc.fiori.NotificationAction.prototype.design
*/
@property({ type: ButtonDesign, defaultValue: ButtonDesign.Transparent })
design!: ButtonDesign;

/**
* Defines the <code>icon</code> source URI.
* <br><br>
* <b>Note:</b>
* SAP-icons font provides numerous built-in icons. To find all the available icons, see the
* <ui5-link target="_blank" href="https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html" class="api-table-content-cell-link">Icon Explorer</ui5-link>.
*
* @type {string}
* @defaultvalue ""
* @public
* @name sap.ui.webc.fiori.NotificationAction.prototype.icon
*/
@property()
icon!: string;
}

NotificationAction.define();

export default NotificationAction;
hinzzx marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion packages/fiori/src/NotificationListGroupItem.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@keydown="{{_onkeydown}}"
role="listitem"
tabindex="{{_tabIndex}}"
aria-expanded="{{ariaExpanded}}"
aria-expanded="{{_ariaExpanded}}"
aria-labelledby="{{ariaLabelledBy}}"
>
<div class="ui5-nli-group-header">
Expand Down
Loading