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: new cem for Topic-P components #7851

Merged
merged 6 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
21 changes: 4 additions & 17 deletions packages/fiori/src/BarcodeScannerDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ type BarcodeScannerDialogScanErrorEventDetail = {
* For a list of supported barcode formats, see the <ui5-link target="_blank" href="https://github.com/zxing-js/library">zxing-js/library</ui5-link> documentation.
*
* @constructor
* @author SAP SE
* @alias sap.ui.webc.fiori.BarcodeScannerDialog
* @extends sap.ui.webc.base.UI5Element
* @tagname ui5-barcode-scanner-dialog
* @extends UI5Element
* @public
* @since 1.0.0-rc.15
*/
Expand All @@ -90,7 +87,6 @@ type BarcodeScannerDialogScanErrorEventDetail = {
/**
* Fires when the scan is completed successfuuly.
*
* @event sap.ui.webc.fiori.BarcodeScannerDialog#scan-success
* @param {string} text the scan result as string
* @param {Object} rawBytes the scan result as a Uint8Array
* @public
Expand All @@ -105,7 +101,6 @@ type BarcodeScannerDialogScanErrorEventDetail = {
/**
* Fires when the scan fails with error.
*
* @event sap.ui.webc.fiori.BarcodeScannerDialog#scan-error
* @param {string} message the error message
* @public
*/
Expand All @@ -119,9 +114,7 @@ class BarcodeScannerDialog extends UI5Element {
/**
* Indicates whether a loading indicator should be displayed in the dialog.
*
* @type {boolean}
* @name sap.ui.webc.fiori.BarcodeScannerDialog.prototype.loading
* @defaultvalue false
* @default false
* @private
*/
@property({ type: Boolean })
Expand All @@ -142,12 +135,9 @@ class BarcodeScannerDialog extends UI5Element {

/**
* Shows a dialog with the camera videostream. Starts a scan session.
* @method
* @name sap.ui.webc.fiori.BarcodeScannerDialog#show
* @returns {void}
* @public
*/
show() {
show(): void {
if (this.loading) {
console.warn("Barcode scanning is already in progress."); // eslint-disable-line
return;
Expand All @@ -170,12 +160,9 @@ class BarcodeScannerDialog extends UI5Element {

/**
* Closes the dialog and the scan session.
* @method
* @name sap.ui.webc.fiori.BarcodeScannerDialog#close
* @returns {void}
* @public
*/
close() {
close():void {
this._closeDialog();
this.loading = false;
}
Expand Down
66 changes: 13 additions & 53 deletions packages/fiori/src/FlexibleColumnLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ type AccessibilityRoles = {
* <code>import "@ui5/webcomponents-fiori/dist/FlexibleColumnLayout.js";</code>
*
* @constructor
* @author SAP SE
* @alias sap.ui.webc.fiori.FlexibleColumnLayout
* @extends sap.ui.webc.base.UI5Element
* @tagname ui5-flexible-column-layout
* @extends UI5Element
* @public
* @since 1.0.0-rc.8
*/
Expand All @@ -145,14 +142,13 @@ type AccessibilityRoles = {
* Fired when the layout changes via user interaction by clicking the arrows
* or by changing the component size due to resizing.
*
* @param {sap.ui.webc.fiori.types.FCLLayout} layout The current layout
* @param {FCLLayout} layout The current layout
* @param {array} columnLayout The effective column layout, f.e [67%, 33%, 0]
* @param {boolean} startColumnVisible Indicates if the start column is currently visible
* @param {boolean} midColumnVisible Indicates if the middle column is currently visible
* @param {boolean} endColumnVisible Indicates if the end column is currently visible
* @param {boolean} arrowsUsed Indicates if the layout is changed via the arrows
* @param {boolean} resize Indicates if the layout is changed via resizing
* @event sap.ui.webc.fiori.FlexibleColumnLayout#layout-change
* @public
*/
@event("layout-change", {
Expand All @@ -175,9 +171,7 @@ class FlexibleColumnLayout extends UI5Element {
* <br><br>
* <b>For example:</b> layout=<code>TwoColumnsStartExpanded</code> means the layout will display up to two columns
* in 67%/33% proportion.
* @type {sap.ui.webc.fiori.types.FCLLayout}
* @defaultvalue "OneColumn"
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.layout
* @default "OneColumn"
* @public
*/
@property({ type: FCLLayout, defaultValue: FCLLayout.OneColumn })
Expand All @@ -187,9 +181,8 @@ class FlexibleColumnLayout extends UI5Element {
* Defines the visibility of the arrows,
* used for expanding and shrinking the columns.
*
* @type {boolean}
* @defaultvalue false
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.hideArrows
* @default false

* @public
* @since 1.0.0-rc.15
*/
Expand All @@ -210,8 +203,6 @@ class FlexibleColumnLayout extends UI5Element {
* - <code>startArrowContainerAccessibleName</code>: the text that the first arrow container (between the <code>begin</code> and <code>mid</code> columns) will have as <code>aria-label</code>
* - <code>endArrowContainerAccessibleName</code>: the text that the second arrow container (between the <code>mid</code> and <code>end</code> columns) will have as <code>aria-label</code>
*
* @type {object}
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.accessibilityTexts
* @public
* @since 1.0.0-rc.11
*/
Expand All @@ -228,9 +219,7 @@ class FlexibleColumnLayout extends UI5Element {
* - <code>endArrowContainerRole</code>: the accessibility role for the second arrow container (between the <code>mid</code> and <code>end</code> columns)
* - <code>endColumnRole</code>: the accessibility role for the <code>endColumn</code>
*
* @type {object}
* @public
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.accessibilityRoles
* @since 1.1.0
*/
@property({ type: Object })
Expand All @@ -239,8 +228,7 @@ class FlexibleColumnLayout extends UI5Element {
/**
* Defines the component width in px.
*
* @type {sap.ui.webc.base.types.Float}
* @defaultvalue 0
* @default 0
* @private
*/
@property({ validator: Float, defaultValue: 0 })
Expand All @@ -251,8 +239,7 @@ class FlexibleColumnLayout extends UI5Element {
* based on both the <code>layout</code> property and the screen size.
* Example: [67%, 33%, 0], [25%, 50%, 25%], etc.
*
* @type {object}
* @defaultvalue undefined
* @default undefined
* @private
*/
@property({ type: Object, defaultValue: undefined })
Expand All @@ -261,8 +248,7 @@ class FlexibleColumnLayout extends UI5Element {
/**
* Defines the visible columns count - 1, 2 or 3.
*
* @type {sap.ui.webc.base.types.Integer}
* @defaultvalue 1
* @default 1
* @private
*/
@property({ validator: Integer, defaultValue: 0 })
Expand All @@ -271,38 +257,27 @@ class FlexibleColumnLayout extends UI5Element {
/**
* Allows the user to replace the whole layouts configuration
*
* @type {object}
* @private
* @sap-restricted
*/
@property({ type: Object, defaultValue: undefined })
_layoutsConfiguration?: LayoutConfiguration;

/**
* Defines the content in the start column.
* @type {HTMLElement}
* @slot
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.startColumn
* @public
*/
@slot()
startColumn!: Array<HTMLElement>;

/**
* Defines the content in the middle column.
* @type {HTMLElement}
* @slot
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.midColumn
* @public
*/
@slot()
midColumn!: Array<HTMLElement>;

/**
* Defines the content in the end column.
* @type {HTMLElement}
* @slot
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.endColumn
* @public
*/
@slot()
Expand Down Expand Up @@ -507,10 +482,7 @@ class FlexibleColumnLayout extends UI5Element {
* <br><br>
* <b>For example:</b> ["67%", "33%", 0], ["100%", 0, 0], ["25%", "50%", "25%"], etc,
* where the numbers represents the width of the start, middle and end columns.
* @readonly
* @type {array}
* @defaultvalue ["100%", 0, 0]
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.columnLayout
* @default ["100%", 0, 0]
yanaminkova marked this conversation as resolved.
Show resolved Hide resolved
* @public
*/
get columnLayout(): ColumnLayout | undefined {
Expand All @@ -519,10 +491,7 @@ class FlexibleColumnLayout extends UI5Element {

/**
* Returns if the <code>start</code> column is visible.
* @readonly
* @defaultvalue true
* @type {boolean}
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.startColumnVisible
* @default true
* @public
*/
get startColumnVisible(): boolean {
Expand All @@ -535,10 +504,7 @@ class FlexibleColumnLayout extends UI5Element {

/**
* Returns if the <code>middle</code> column is visible.
* @readonly
* @type {boolean}
* @defaultvalue false
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.midColumnVisible
* @default false
* @public
*/
get midColumnVisible(): boolean {
Expand All @@ -551,10 +517,7 @@ class FlexibleColumnLayout extends UI5Element {

/**
* Returns if the <code>end</code> column is visible.
* @readonly
* @type {boolean}
* @defaultvalue false
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.endColumnVisible
* @default false
* @public
*/
get endColumnVisible(): boolean {
Expand All @@ -567,10 +530,7 @@ class FlexibleColumnLayout extends UI5Element {

/**
* Returns the number of currently visible columns.
* @readonly
* @type {sap.ui.webc.base.types.Integer}
* @defaultvalue 1
* @name sap.ui.webc.fiori.FlexibleColumnLayout.prototype.visibleColumns
* @default 1
* @public
*/
get visibleColumns(): number {
Expand Down
19 changes: 13 additions & 6 deletions packages/fiori/src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ const IFilterItemOption = "sap.ui.webc.fiori.IFilterItemOption";
/**
* Interface for components that can be slotted inside <code>ui5-media-gallery</code> as items.
*
* @name sap.ui.webc.fiori.IMediaGalleryItem
* @interface
* @public
*/
const IMediaGalleryItem = "sap.ui.webc.fiori.IMediaGalleryItem";
interface IMediaGalleryItem {
selected: boolean,
disabled: boolean,
focused: boolean,
}

/**
* Interface for components that may be slotted as an action inside <code>ui5-li-notification</code> and <code>ui5-li-notification-group</code>
Expand All @@ -55,11 +57,16 @@ const INotificationListItem = "sap.ui.webc.fiori.INotificationListItem";
/**
* Interface for components that may be slotted inside <code>ui5-product-switch</code> as items
*
* @name sap.ui.webc.fiori.IProductSwitchItem
* @interface
* @public
*/
const IProductSwitchItem = "sap.ui.webc.fiori.IProductSwitchItem";
interface IProductSwitchItem {
titleText: string,
subtitleText: string,
icon: string,
target: string,
targetSrc: string,
selected: boolean,
}

/**
* Interface for components that may be slotted inside <code>ui5-shellbar</code> as items
Expand Down
Loading
Loading