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

docs: Adapt JSDocs for new CЕM and Remove Redundancies #7922

Merged
merged 16 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
33 changes: 6 additions & 27 deletions packages/fiori/src/Bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
import BarDesign from "./types/BarDesign.js";
import type { IBar } from "./Interfaces";

// Template
import BarTemplate from "./generated/templates/BarTemplate.lit.js";
Expand All @@ -30,15 +31,6 @@ import BarCss from "./generated/themes/Bar.css.js";
* The default slot will be centered in the available space between the startContent and the endContent areas,
* therefore it might not always be centered in the entire bar.
*
* <h3>CSS Shadow Parts</h3>
*
* <ui5-link target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/::part">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.
* <br>
* The <code>ui5-bar</code> exposes the following CSS Shadow Parts:
* <ul>
* <li>bar - Used to style the wrapper of the content of the component</li>
* </ul>
*
* <h3>Keyboard Handling</h3>
*
* <h4>Fast Navigation</h4>
Expand All @@ -51,12 +43,10 @@ import BarCss from "./generated/themes/Bar.css.js";
*
* <code>import "@ui5/webcomponents-fiori/dist/Bar.js";</code>
*
* @csspart bar - Used to style the wrapper of the content of the component
* @constructor
* @author SAP SE
* @alias sap.ui.webc.fiori.Bar
* @implements sap.ui.webc.fiori.IBar
* @extends sap.ui.webc.base.UI5Element
* @tagname ui5-bar
* @implements { IBar }
* @extends UI5Element
* @public
* @since 1.0.0-rc.11
*/
Expand All @@ -67,43 +57,32 @@ import BarCss from "./generated/themes/Bar.css.js";
styles: BarCss,
template: BarTemplate,
})
class Bar extends UI5Element {
class Bar extends UI5Element implements IBar {
/**
* Defines the component's design.
*
* @type {sap.ui.webc.fiori.types.BarDesign}
* @name sap.ui.webc.fiori.Bar.prototype.design
* @defaultvalue "Header"
* @default "Header"
* @public
*/
@property({ type: BarDesign, defaultValue: BarDesign.Header })
design!: `${BarDesign}`

/**
* Defines the content at the start of the bar.
* @type {HTMLElement[]}
* @name sap.ui.webc.fiori.Bar.prototype.startContent
* @slot
* @public
*/
@slot({ type: HTMLElement })
startContent!: Array<HTMLElement>;

/**
* Defines the content in the middle of the bar.
* @type {HTMLElement[]}
* @name sap.ui.webc.fiori.Bar.prototype.default
* @slot middleContent
* @public
*/
@slot({ type: HTMLElement, "default": true })
middleContent!: Array<HTMLElement>

/**
* Defines the content at the end of the bar.
* @type {HTMLElement[]}
* @name sap.ui.webc.fiori.Bar.prototype.endContent
* @slot
* @public
*/
@slot({ type: HTMLElement })
Expand Down
60 changes: 22 additions & 38 deletions packages/fiori/src/DynamicSideContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ type DynamicSideContentLayoutChangeEventDetail = {
* <code>import "@ui5/webcomponents-fiori/dist/DynamicSideContent";</code>
*
* @constructor
* @author SAP SE
* @alias sap.ui.webc.fiori.DynamicSideContent
* @extends sap.ui.webc.base.UI5Element
* @tagname ui5-dynamic-side-content
* @extends UI5Element
* @public
* @since 1.1.0
* @slot {HTMLElement[]} default - Defines the main content.
*/
@customElement({
tag: "ui5-dynamic-side-content",
Expand All @@ -119,7 +117,6 @@ type DynamicSideContentLayoutChangeEventDetail = {
})
/**
* Fires when the current breakpoint has been changed.
* @event sap.ui.webc.fiori.DynamicSideContent#layout-change
* @param {string} currentBreakpoint the current breakpoint.
* @param {string} previousBreakpoint the breakpoint that was active before change to current breakpoint.
* @param {boolean} mainContentVisible visibility of the main content.
Expand All @@ -128,15 +125,27 @@ type DynamicSideContentLayoutChangeEventDetail = {
*/
@event("layout-change", {
detail: {
/**
* @public
*/
currentBreakpoint: {
type: String,
},
/**
* @public
*/
previousBreakpoint: {
type: String,
},
/**
* @public
*/
mainContentVisible: {
type: Boolean,
},
/**
* @public
*/
sideContentVisible: {
type: Boolean,
},
Expand All @@ -146,9 +155,7 @@ class DynamicSideContent extends UI5Element {
/**
* Defines the visibility of the main content.
*
* @type {boolean}
* @name sap.ui.webc.fiori.DynamicSideContent.prototype.hideMainContent
* @defaultvalue false
* @default false
* @public
*
*/
Expand All @@ -158,9 +165,7 @@ class DynamicSideContent extends UI5Element {
/**
* Defines the visibility of the side content.
*
* @type {boolean}
* @name sap.ui.webc.fiori.DynamicSideContent.prototype.hideSideContent
* @defaultvalue false
* @default false
* @public
*
*/
Expand All @@ -179,9 +184,7 @@ class DynamicSideContent extends UI5Element {
* <li><code>End</code></li>
* </ul>
*
* @type {sap.ui.webc.fiori.types.SideContentPosition}
* @name sap.ui.webc.fiori.DynamicSideContent.prototype.sideContentPosition
* @defaultvalue "End"
* @default "End"
* @public
*
*/
Expand All @@ -202,9 +205,7 @@ class DynamicSideContent extends UI5Element {
* <li><code>NeverShow</code></li>
* </ul>
*
* @type {sap.ui.webc.fiori.types.SideContentVisibility}
* @name sap.ui.webc.fiori.DynamicSideContent.prototype.sideContentVisibility
* @defaultvalue "ShowAboveS"
* @default "ShowAboveS"
* @public
*
*/
Expand All @@ -224,9 +225,7 @@ class DynamicSideContent extends UI5Element {
* <li><code>OnMinimumWidth</code></li>
* </ul>
*
* @type {sap.ui.webc.fiori.types.SideContentFallDown}
* @name sap.ui.webc.fiori.DynamicSideContent.prototype.sideContentFallDown
* @defaultvalue "OnMinimumWidth"
* @default "OnMinimumWidth"
* @public
*
*/
Expand All @@ -239,9 +238,7 @@ class DynamicSideContent extends UI5Element {
* except for phone, where the main and side contents are switching visibility
* using the toggle method.
*
* @type {boolean}]
* @name sap.ui.webc.fiori.DynamicSideContent.prototype.equalSplit
* @defaultvalue false
* @default false
* @public
*
*/
Expand Down Expand Up @@ -272,21 +269,9 @@ class DynamicSideContent extends UI5Element {
@property({ noAttribute: true })
_currentBreakpoint!: string;

/**
* Defines the main content.
*
* @type {HTMLElement[]}
* @name sap.ui.webc.fiori.DynamicSideContent.prototype.default
* @slot
* @public
*/

/**
* Defines the side content.
*
* @type {HTMLElement[]}
* @name sap.ui.webc.fiori.DynamicSideContent.prototype.sideContent
* @slot
* @public
*/
@slot()
Expand Down Expand Up @@ -319,11 +304,10 @@ class DynamicSideContent extends UI5Element {

/**
* Toggles visibility of main and side contents on S screen size (mobile device).
*
* @public
* @method
* @name sap.ui.webc.fiori.DynamicSideContent#toggleContents
*/
toggleContents() {
toggleContents(): void {
if (this.breakpoint === this.sizeS && this.sideContentVisibility !== SideContentVisibility.AlwaysShow) {
this._toggled = !this._toggled;
}
Expand Down
17 changes: 3 additions & 14 deletions packages/fiori/src/FilterItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,17 @@ import type FilterItemOption from "./FilterItemOption.js";
* <code>import @ui5/webcomponents-fiori/dist/FilterItem.js";</code>
*
* @constructor
* @author SAP SE
* @alias sap.ui.webc.fiori.FilterItem
* @extends sap.ui.webc.base.UI5Element
* @extends UI5Element
* @abstract
* @since 1.0.0-rc.16
* @tagname ui5-filter-item
* @implements sap.ui.webc.fiori.IFilterItem
* @public
*/
@customElement("ui5-filter-item")
class FilterItem extends UI5Element {
/**
* Defines the text of the component.
*
* @name sap.ui.webc.fiori.FilterItem.prototype.text
* @type {string}
* @defaultvalue ""
* @default ""
* @public
*/
@property()
Expand All @@ -43,19 +37,14 @@ class FilterItem extends UI5Element {
/**
* Defines the additional text of the component.
*
* @name sap.ui.webc.fiori.FilterItem.prototype.additionalText
* @type {string}
* @defaultvalue ""
* @default ""
* @public
*/
@property()
additionalText!: string;

/**
* Defines the <code>values</code> list.
* @name sap.ui.webc.fiori.FilterItem.prototype.values
* @type {sap.ui.webc.fiori.IFilterItemOption[]}
* @slot values
* @public
*/
@slot()
Expand Down
14 changes: 3 additions & 11 deletions packages/fiori/src/FilterItemOption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,17 @@ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement
* <code>import @ui5/webcomponents-fiori/dist/FilterItemOption.js";</code>
*
* @constructor
* @author SAP SE
* @alias sap.ui.webc.fiori.FilterItemOption
* @extends sap.ui.webc.base.UI5Element
* @extends UI5Element
* @abstract
* @since 1.0.0-rc.16
* @tagname ui5-filter-item-option
* @implements sap.ui.webc.fiori.IFilterItemOption
* @public
*/
@customElement("ui5-filter-item-option")
class FilterItemOption extends UI5Element {
/**
* Defines the text of the component.
*
* @name sap.ui.webc.fiori.FilterItemOption.prototype.text
* @type {string}
* @defaultvalue ""
* @default ""
* @public
*/
@property()
Expand All @@ -41,9 +35,7 @@ class FilterItemOption extends UI5Element {
/**
* Defines if the component is selected.
*
* @name sap.ui.webc.fiori.FilterItemOption.prototype.selected
* @type {boolean}
* @defaultvalue false
* @default false
* @public
*/
@property({ type: Boolean })
Expand Down
Loading
Loading