Skip to content

Conversation

@MariaIDineva
Copy link
Contributor

@MariaIDineva MariaIDineva commented Nov 17, 2025

Related Issue(s)

part of #13176

Description

  1. Adds some wrapper generator logic that exports a custom UI5WrapperCustomEvent type from the ui5-webcomponents-base package. That type can be used to provide proper typing for all components outputs, thus avoiding imports of types and classes from the webcomponents dist folder.

Before:

// Import UI5 custom event types
import { UI5CustomEvent } from '@ui5/webcomponents-base';
import { default as _TextArea } from '@ui5/webcomponents/dist/TextArea.js';

onTextAreaChange(fieldName: string, event: UI5CustomEvent<_TextArea, 'input'>): void { }

Now:

import type { UI5WrapperCustomEvent } from '@fundamental-ngx/ui5-webcomponents-base';

onTextAreaChange(fieldName: string, event: UI5WrapperCustomEvent<TextArea, 'ui5Input'>): void {
  1. Cleans up the generator logic a bit from unused parameters.

  2. Adjusts some of the examples to use the new type for the outputs.

@MariaIDineva MariaIDineva self-assigned this Nov 17, 2025
@netlify
Copy link

netlify bot commented Nov 17, 2025

Deploy Preview for fundamental-ngx ready!

Name Link
🔨 Latest commit 2112f54
🔍 Latest deploy log https://app.netlify.com/projects/fundamental-ngx/deploys/69201cce7ca5a900085a8801
😎 Deploy Preview https://deploy-preview-13578--fundamental-ngx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@MariaIDineva MariaIDineva changed the title feat: add types for events feat: add types for wrapper event emitters Nov 19, 2025
@MariaIDineva MariaIDineva changed the title feat: add types for wrapper event emitters [WIP] feat: add types for wrapper event emitters Nov 20, 2025
@droshev droshev added this to the Sprint 152 - November 2025 milestone Nov 20, 2025
@MariaIDineva MariaIDineva changed the title [WIP] feat: add types for wrapper event emitters feat: add types for wrapper event emitters Nov 21, 2025
@MariaIDineva MariaIDineva requested a review from a team November 21, 2025 14:36
@MariaIDineva MariaIDineva added documentation There is an issue with documentation ui5 webc ui5 webc labels Nov 21, 2025
}

getImageStyle(image: any): string {
getImageStyle(image: { url: string; title: string; description: string; gradient: string }): string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe create a type for { url: string; title: string; description: string; gradient: string }? Later if new props are added will be easier to modify just in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation There is an issue with documentation ui5 webc ui5 webc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants