@ui5/webcomponents-react-cli
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -13,2 +13,3 @@ import type * as CEM from '@ui5/webcomponents-tools/lib/cem/types-internal.d.ts'; | ||
private since; | ||
private isExperimental; | ||
setAttributes(attrs: CEM.ClassField[]): this; | ||
@@ -21,4 +22,5 @@ setSlots(slots: CEM.Slot[]): this; | ||
setSince(value: string | undefined): this; | ||
setIsExperimental(value?: boolean | string): this; | ||
prepare(context: WebComponentWrapper): void; | ||
render(context: WebComponentWrapper): string; | ||
} |
@@ -13,2 +13,3 @@ import dedent from 'dedent'; | ||
since; | ||
isExperimental = false; | ||
setAttributes(attrs) { | ||
@@ -42,2 +43,6 @@ this.attributes.push(...attrs); | ||
} | ||
setIsExperimental(value) { | ||
this.isExperimental = value; | ||
return this; | ||
} | ||
prepare(context) { | ||
@@ -58,2 +63,5 @@ context.exportSet.add(context.componentName); | ||
} | ||
if (this.isExperimental) { | ||
comment += ` * @experimental${typeof this.isExperimental === 'string' ? ` ${this.isExperimental}` : ''}\n`; | ||
} | ||
comment += '*/'; | ||
@@ -60,0 +68,0 @@ const component = dedent ` |
@@ -48,3 +48,4 @@ import { mkdir, writeFile } from 'node:fs/promises'; | ||
.setIsAbstract(declaration._ui5abstract ?? false) | ||
.setSince(declaration._ui5since)); | ||
.setSince(declaration._ui5since) | ||
.setIsExperimental(declaration._ui5experimental)); | ||
wrapper.addRenderer(new ExportsRenderer()); | ||
@@ -51,0 +52,0 @@ const componentTargetFolder = resolve(outDir, declaration.name); |
@@ -84,2 +84,9 @@ import dedent from 'dedent'; | ||
} | ||
if (Object.prototype.hasOwnProperty.call(event, '_ui5Bubbles') || | ||
Object.prototype.hasOwnProperty.call(event, '_ui5Cancelable')) { | ||
descriptionParts.push(` *`); | ||
descriptionParts.push(`* | cancelable | bubbles |`); | ||
descriptionParts.push(`* | :--------: | :-----: |`); | ||
descriptionParts.push(`* | ${event._ui5Cancelable ? '✅' : '❌'}|${event._ui5Bubbles ? '✅' : '❌'}|`); | ||
} | ||
const domRef = `${context.componentName}DomRef`; | ||
@@ -86,0 +93,0 @@ let eventType = '(event: unknown) => void;'; |
@@ -6,3 +6,3 @@ { | ||
"license": "Apache-2.0", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"type": "module", | ||
@@ -38,3 +38,3 @@ "types": "./dist/index.d.ts", | ||
}, | ||
"gitHead": "105d57f20b9bddb46d1743eea4f4efd1ca2a99d9" | ||
"gitHead": "7bbf47886592c3adad9b72e7ff2dbf07a4df3887" | ||
} |
114306
2443