From 499bc30cff3871716db67ee5b4ec76f8a759615f Mon Sep 17 00:00:00 2001 From: Jose Montes Date: Tue, 21 Jul 2026 20:11:19 +0000 Subject: [PATCH 1/8] feat(angular): implement Catalog API symmetry and deprecate extraComponents --- .../src/v0_9/catalog/basic/basic-catalog.ts | 2 + .../angular/src/v0_9/catalog/types.spec.ts | 48 +++++++++++++++++++ renderers/angular/src/v0_9/catalog/types.ts | 12 +++++ 3 files changed, 62 insertions(+) create mode 100644 renderers/angular/src/v0_9/catalog/types.spec.ts diff --git a/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts b/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts index 215d60b3e8..d995d1d843 100644 --- a/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts +++ b/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts @@ -110,6 +110,8 @@ export interface BasicCatalogOptions { /** * Optional additional components to include in the catalog beyond * the standard basic catalog components. + * + * @deprecated Use AngularCatalog constructor directly to combine BASIC_COMPONENTS with custom ones. */ extraComponents?: AngularComponentImplementation[]; diff --git a/renderers/angular/src/v0_9/catalog/types.spec.ts b/renderers/angular/src/v0_9/catalog/types.spec.ts new file mode 100644 index 0000000000..e79bb426bb --- /dev/null +++ b/renderers/angular/src/v0_9/catalog/types.spec.ts @@ -0,0 +1,48 @@ +/** + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {Component, signal} from '@angular/core'; +import {ComponentApi} from '@a2ui/web_core/v0_9'; +import {createAngularComponentImplementation} from './types'; +import {CatalogComponentInstance} from '../core/catalog_component_instance'; +import {z} from 'zod'; + +@Component({ + selector: 'test-comp', + template: '', + standalone: true, +}) +class TestComponent implements CatalogComponentInstance { + readonly props = signal>({}); + readonly surfaceId = signal(''); + readonly componentId = signal(''); + readonly dataContextPath = signal(''); +} + +describe('createAngularComponentImplementation', () => { + it('should map ComponentApi and Angular Component Type correctly', () => { + const api: ComponentApi = { + name: 'TestComp', + schema: z.object({}), + }; + + const impl = createAngularComponentImplementation(api, TestComponent); + + expect(impl.name).toBe('TestComp'); + expect(impl.schema).toEqual(api.schema); + expect(impl.component).toBe(TestComponent); + }); +}); diff --git a/renderers/angular/src/v0_9/catalog/types.ts b/renderers/angular/src/v0_9/catalog/types.ts index 99f43dc3de..a8f5da3b37 100644 --- a/renderers/angular/src/v0_9/catalog/types.ts +++ b/renderers/angular/src/v0_9/catalog/types.ts @@ -49,3 +49,15 @@ export interface AngularComponentImplementation extends ComponentApi { * correct Angular components. */ export class AngularCatalog extends Catalog {} + +export function createAngularComponentImplementation( + api: ComponentApi, + component: Type, +): AngularComponentImplementation { + return { + name: api.name, + schema: api.schema, + component, + }; +} + From eb0106cff3bfc6437128aa9c26882929a88d5adf Mon Sep 17 00:00:00 2001 From: Jose Montes Date: Tue, 21 Jul 2026 20:32:52 +0000 Subject: [PATCH 2/8] chore: format types.ts --- renderers/angular/src/v0_9/catalog/types.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/renderers/angular/src/v0_9/catalog/types.ts b/renderers/angular/src/v0_9/catalog/types.ts index a8f5da3b37..0d63cc9ec6 100644 --- a/renderers/angular/src/v0_9/catalog/types.ts +++ b/renderers/angular/src/v0_9/catalog/types.ts @@ -60,4 +60,3 @@ export function createAngularComponentImplementation( component, }; } - From 7504c8220bf7347def79e6e26873f744d546e07e Mon Sep 17 00:00:00 2001 From: Jose Montes Date: Tue, 21 Jul 2026 20:36:41 +0000 Subject: [PATCH 3/8] docs(angular): update CHANGELOG for PR 2060 --- renderers/angular/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/renderers/angular/CHANGELOG.md b/renderers/angular/CHANGELOG.md index 34e04903be..8051ffdf38 100644 --- a/renderers/angular/CHANGELOG.md +++ b/renderers/angular/CHANGELOG.md @@ -1,5 +1,6 @@ ## Unreleased +- (v0_9) Implement `createAngularComponentImplementation` helper and deprecate `extraComponents` in `BasicCatalogOptions` to align with the core API. [#2060](https://github.com/a2ui-project/a2ui/pull/2060) - Standardize package entry points to `index.ts` while maintaining `public-api.ts` wrappers for backward compatibility. - (v0_8) Export `A2uiMessageSchema` in public API. From 5f576122a09c465eb70b4ae6ddc6e6b00e66d0e4 Mon Sep 17 00:00:00 2001 From: Jose Montes Date: Tue, 21 Jul 2026 21:25:44 +0000 Subject: [PATCH 4/8] feat(angular): deprecate functions in BasicCatalogOptions --- renderers/angular/CHANGELOG.md | 2 +- renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/renderers/angular/CHANGELOG.md b/renderers/angular/CHANGELOG.md index 8051ffdf38..48a2365731 100644 --- a/renderers/angular/CHANGELOG.md +++ b/renderers/angular/CHANGELOG.md @@ -1,6 +1,6 @@ ## Unreleased -- (v0_9) Implement `createAngularComponentImplementation` helper and deprecate `extraComponents` in `BasicCatalogOptions` to align with the core API. [#2060](https://github.com/a2ui-project/a2ui/pull/2060) +- (v0_9) Implement `createAngularComponentImplementation` helper and deprecate `extraComponents` and `functions` in `BasicCatalogOptions` to align with the core API. [#2060](https://github.com/a2ui-project/a2ui/pull/2060) - Standardize package entry points to `index.ts` while maintaining `public-api.ts` wrappers for backward compatibility. - (v0_8) Export `A2uiMessageSchema` in public API. diff --git a/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts b/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts index d995d1d843..87a1b48215 100644 --- a/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts +++ b/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts @@ -117,6 +117,8 @@ export interface BasicCatalogOptions { /** * An optional set of function implementations to use instead of the defaults. + * + * @deprecated Use AngularCatalog constructor directly to combine BASIC_FUNCTIONS with custom ones. */ functions?: FunctionImplementation[]; } From 17674de165e19c4491f019bfd21815e22baef956 Mon Sep 17 00:00:00 2001 From: Jose Montes Date: Mon, 27 Jul 2026 21:22:07 +0000 Subject: [PATCH 5/8] Address PR comments: use CatalogComponent in tests, update samples and changelog for deprecated options --- renderers/angular/CHANGELOG.md | 14 ++++++++++++++ .../angular/a2ui_explorer/src/app/demo-catalog.ts | 15 +++++++-------- renderers/angular/src/v0_9/catalog/types.spec.ts | 11 +++-------- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/renderers/angular/CHANGELOG.md b/renderers/angular/CHANGELOG.md index 48a2365731..bd67437497 100644 --- a/renderers/angular/CHANGELOG.md +++ b/renderers/angular/CHANGELOG.md @@ -1,6 +1,20 @@ ## Unreleased - (v0_9) Implement `createAngularComponentImplementation` helper and deprecate `extraComponents` and `functions` in `BasicCatalogOptions` to align with the core API. [#2060](https://github.com/a2ui-project/a2ui/pull/2060) + * Recommended migration: Instead of extending `BasicCatalogBase` or passing `extraComponents`/`functions` to `BasicCatalogOptions`, extend `AngularCatalog` directly and pass the combined lists of components and functions to `super()`. + ```typescript + import { AngularCatalog, BASIC_COMPONENTS, BASIC_FUNCTIONS } from '@a2ui/angular/v0_9'; + + export class CustomCatalog extends AngularCatalog { + constructor() { + super( + 'https://example.com/custom-catalog.json', + [...BASIC_COMPONENTS, myCustomComponent], + [...BASIC_FUNCTIONS, myCustomFunction], + ); + } + } + ``` - Standardize package entry points to `index.ts` while maintaining `public-api.ts` wrappers for backward compatibility. - (v0_8) Export `A2uiMessageSchema` in public API. diff --git a/renderers/angular/a2ui_explorer/src/app/demo-catalog.ts b/renderers/angular/a2ui_explorer/src/app/demo-catalog.ts index 14b179b0db..39c9f008ba 100644 --- a/renderers/angular/a2ui_explorer/src/app/demo-catalog.ts +++ b/renderers/angular/a2ui_explorer/src/app/demo-catalog.ts @@ -15,7 +15,7 @@ */ import {Injectable} from '@angular/core'; -import {BasicCatalogBase, BASIC_FUNCTIONS} from '@a2ui/angular/v0_9'; +import {AngularCatalog, BASIC_COMPONENTS, BASIC_FUNCTIONS} from '@a2ui/angular/v0_9'; import {customSliderComponentDeclaration} from './custom-slider.component'; /** @@ -24,13 +24,12 @@ import {customSliderComponentDeclaration} from './custom-slider.component'; @Injectable({ providedIn: 'root', }) -export class DemoCatalog extends BasicCatalogBase { +export class DemoCatalog extends AngularCatalog { constructor() { - super({ - id: 'https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json', - components: {}, - extraComponents: [customSliderComponentDeclaration], - functions: BASIC_FUNCTIONS, - }); + super( + 'https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json', + [...BASIC_COMPONENTS, customSliderComponentDeclaration], + BASIC_FUNCTIONS + ); } } diff --git a/renderers/angular/src/v0_9/catalog/types.spec.ts b/renderers/angular/src/v0_9/catalog/types.spec.ts index e79bb426bb..5e18a1c550 100644 --- a/renderers/angular/src/v0_9/catalog/types.spec.ts +++ b/renderers/angular/src/v0_9/catalog/types.spec.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import {Component, signal} from '@angular/core'; +import {Component} from '@angular/core'; import {ComponentApi} from '@a2ui/web_core/v0_9'; import {createAngularComponentImplementation} from './types'; -import {CatalogComponentInstance} from '../core/catalog_component_instance'; +import {CatalogComponent} from '../core/catalog_component'; import {z} from 'zod'; @Component({ @@ -25,12 +25,7 @@ import {z} from 'zod'; template: '', standalone: true, }) -class TestComponent implements CatalogComponentInstance { - readonly props = signal>({}); - readonly surfaceId = signal(''); - readonly componentId = signal(''); - readonly dataContextPath = signal(''); -} +class TestComponent extends CatalogComponent {} describe('createAngularComponentImplementation', () => { it('should map ComponentApi and Angular Component Type correctly', () => { From 904d1172b21748e56e88328dc5751a37080e6a27 Mon Sep 17 00:00:00 2001 From: Jose Montes Date: Mon, 27 Jul 2026 22:03:12 +0000 Subject: [PATCH 6/8] docs(angular): remove migration guide from CHANGELOG --- renderers/angular/CHANGELOG.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/renderers/angular/CHANGELOG.md b/renderers/angular/CHANGELOG.md index bd67437497..48a2365731 100644 --- a/renderers/angular/CHANGELOG.md +++ b/renderers/angular/CHANGELOG.md @@ -1,20 +1,6 @@ ## Unreleased - (v0_9) Implement `createAngularComponentImplementation` helper and deprecate `extraComponents` and `functions` in `BasicCatalogOptions` to align with the core API. [#2060](https://github.com/a2ui-project/a2ui/pull/2060) - * Recommended migration: Instead of extending `BasicCatalogBase` or passing `extraComponents`/`functions` to `BasicCatalogOptions`, extend `AngularCatalog` directly and pass the combined lists of components and functions to `super()`. - ```typescript - import { AngularCatalog, BASIC_COMPONENTS, BASIC_FUNCTIONS } from '@a2ui/angular/v0_9'; - - export class CustomCatalog extends AngularCatalog { - constructor() { - super( - 'https://example.com/custom-catalog.json', - [...BASIC_COMPONENTS, myCustomComponent], - [...BASIC_FUNCTIONS, myCustomFunction], - ); - } - } - ``` - Standardize package entry points to `index.ts` while maintaining `public-api.ts` wrappers for backward compatibility. - (v0_8) Export `A2uiMessageSchema` in public API. From 0b9bdd8e53a6c30bc8a1b84f002f63a0deba2e0a Mon Sep 17 00:00:00 2001 From: Jose Montes Date: Mon, 27 Jul 2026 22:15:04 +0000 Subject: [PATCH 7/8] Refactor basic catalog components to use createAngularComponentImplementation helper and add JSDoc --- .../src/v0_9/catalog/basic/basic-catalog.ts | 38 +++++++++---------- renderers/angular/src/v0_9/catalog/types.ts | 10 +++++ 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts b/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts index 87a1b48215..31eb79cc2b 100644 --- a/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts +++ b/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts @@ -15,7 +15,7 @@ */ import {Inject, Injectable, InjectionToken, Optional} from '@angular/core'; -import {AngularCatalog, AngularComponentImplementation} from '../types'; +import {AngularCatalog, AngularComponentImplementation, createAngularComponentImplementation} from '../types'; import {TextComponent} from './text.component'; import {RowComponent} from './row.component'; import {ColumnComponent} from './column.component'; @@ -66,24 +66,24 @@ import {FunctionImplementation} from '@a2ui/web_core/v0_9'; // Ignore Prettier to preserve quoted keys, needed to survive property renaming. // prettier-ignore const DEFAULT_COMPONENT_IMPLEMENTATIONS: Record = { - 'text': {...TextApi, component: TextComponent}, - 'row': {...RowApi, component: RowComponent}, - 'column': {...ColumnApi, component: ColumnComponent}, - 'button': {...ButtonApi, component: ButtonComponent}, - 'textField': {...TextFieldApi, component: TextFieldComponent}, - 'image': {...ImageApi, component: ImageComponent}, - 'icon': {...IconApi, component: IconComponent}, - 'video': {...VideoApi, component: VideoComponent}, - 'audioPlayer': {...AudioPlayerApi, component: AudioPlayerComponent}, - 'list': {...ListApi, component: ListComponent}, - 'card': {...CardApi, component: CardComponent}, - 'tabs': {...TabsApi, component: TabsComponent}, - 'modal': {...ModalApi, component: ModalComponent}, - 'divider': {...DividerApi, component: DividerComponent}, - 'checkBox': {...CheckBoxApi, component: CheckBoxComponent}, - 'choicePicker': {...ChoicePickerApi, component: ChoicePickerComponent}, - 'slider': {...SliderApi, component: SliderComponent}, - 'dateTimeInput': {...DateTimeInputApi, component: DateTimeInputComponent}, + 'text': createAngularComponentImplementation(TextApi, TextComponent), + 'row': createAngularComponentImplementation(RowApi, RowComponent), + 'column': createAngularComponentImplementation(ColumnApi, ColumnComponent), + 'button': createAngularComponentImplementation(ButtonApi, ButtonComponent), + 'textField': createAngularComponentImplementation(TextFieldApi, TextFieldComponent), + 'image': createAngularComponentImplementation(ImageApi, ImageComponent), + 'icon': createAngularComponentImplementation(IconApi, IconComponent), + 'video': createAngularComponentImplementation(VideoApi, VideoComponent), + 'audioPlayer': createAngularComponentImplementation(AudioPlayerApi, AudioPlayerComponent), + 'list': createAngularComponentImplementation(ListApi, ListComponent), + 'card': createAngularComponentImplementation(CardApi, CardComponent), + 'tabs': createAngularComponentImplementation(TabsApi, TabsComponent), + 'modal': createAngularComponentImplementation(ModalApi, ModalComponent), + 'divider': createAngularComponentImplementation(DividerApi, DividerComponent), + 'checkBox': createAngularComponentImplementation(CheckBoxApi, CheckBoxComponent), + 'choicePicker': createAngularComponentImplementation(ChoicePickerApi, ChoicePickerComponent), + 'slider': createAngularComponentImplementation(SliderApi, SliderComponent), + 'dateTimeInput': createAngularComponentImplementation(DateTimeInputApi, DateTimeInputComponent), } as const; /** diff --git a/renderers/angular/src/v0_9/catalog/types.ts b/renderers/angular/src/v0_9/catalog/types.ts index 0d63cc9ec6..8e5fc85e20 100644 --- a/renderers/angular/src/v0_9/catalog/types.ts +++ b/renderers/angular/src/v0_9/catalog/types.ts @@ -50,6 +50,16 @@ export interface AngularComponentImplementation extends ComponentApi { */ export class AngularCatalog extends Catalog {} +/** + * Helper function to create an {@link AngularComponentImplementation}. + * + * It extracts the name and schema from a generic {@link ComponentApi} and + * associates it with the given Angular component type. + * + * @param api The generic component API definition. + * @param component The Angular component class implementing the API. + * @returns The structured Angular component implementation. + */ export function createAngularComponentImplementation( api: ComponentApi, component: Type, From f2583219ed88909ccce6d1a61983e48d67bc316a Mon Sep 17 00:00:00 2001 From: Jose Montes Date: Mon, 27 Jul 2026 23:13:35 +0000 Subject: [PATCH 8/8] Implement: Rename createAngularComponentImplementation to createComponentImplementation --- renderers/angular/CHANGELOG.md | 2 +- .../src/v0_9/catalog/basic/basic-catalog.ts | 38 +++++++++---------- .../angular/src/v0_9/catalog/types.spec.ts | 6 +-- renderers/angular/src/v0_9/catalog/types.ts | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/renderers/angular/CHANGELOG.md b/renderers/angular/CHANGELOG.md index 48a2365731..ef5f4d5459 100644 --- a/renderers/angular/CHANGELOG.md +++ b/renderers/angular/CHANGELOG.md @@ -1,6 +1,6 @@ ## Unreleased -- (v0_9) Implement `createAngularComponentImplementation` helper and deprecate `extraComponents` and `functions` in `BasicCatalogOptions` to align with the core API. [#2060](https://github.com/a2ui-project/a2ui/pull/2060) +- (v0_9) Implement `createComponentImplementation` helper and deprecate `extraComponents` and `functions` in `BasicCatalogOptions` to align with the core API. [#2060](https://github.com/a2ui-project/a2ui/pull/2060) - Standardize package entry points to `index.ts` while maintaining `public-api.ts` wrappers for backward compatibility. - (v0_8) Export `A2uiMessageSchema` in public API. diff --git a/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts b/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts index 31eb79cc2b..f55961f2e2 100644 --- a/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts +++ b/renderers/angular/src/v0_9/catalog/basic/basic-catalog.ts @@ -15,7 +15,7 @@ */ import {Inject, Injectable, InjectionToken, Optional} from '@angular/core'; -import {AngularCatalog, AngularComponentImplementation, createAngularComponentImplementation} from '../types'; +import {AngularCatalog, AngularComponentImplementation, createComponentImplementation} from '../types'; import {TextComponent} from './text.component'; import {RowComponent} from './row.component'; import {ColumnComponent} from './column.component'; @@ -66,24 +66,24 @@ import {FunctionImplementation} from '@a2ui/web_core/v0_9'; // Ignore Prettier to preserve quoted keys, needed to survive property renaming. // prettier-ignore const DEFAULT_COMPONENT_IMPLEMENTATIONS: Record = { - 'text': createAngularComponentImplementation(TextApi, TextComponent), - 'row': createAngularComponentImplementation(RowApi, RowComponent), - 'column': createAngularComponentImplementation(ColumnApi, ColumnComponent), - 'button': createAngularComponentImplementation(ButtonApi, ButtonComponent), - 'textField': createAngularComponentImplementation(TextFieldApi, TextFieldComponent), - 'image': createAngularComponentImplementation(ImageApi, ImageComponent), - 'icon': createAngularComponentImplementation(IconApi, IconComponent), - 'video': createAngularComponentImplementation(VideoApi, VideoComponent), - 'audioPlayer': createAngularComponentImplementation(AudioPlayerApi, AudioPlayerComponent), - 'list': createAngularComponentImplementation(ListApi, ListComponent), - 'card': createAngularComponentImplementation(CardApi, CardComponent), - 'tabs': createAngularComponentImplementation(TabsApi, TabsComponent), - 'modal': createAngularComponentImplementation(ModalApi, ModalComponent), - 'divider': createAngularComponentImplementation(DividerApi, DividerComponent), - 'checkBox': createAngularComponentImplementation(CheckBoxApi, CheckBoxComponent), - 'choicePicker': createAngularComponentImplementation(ChoicePickerApi, ChoicePickerComponent), - 'slider': createAngularComponentImplementation(SliderApi, SliderComponent), - 'dateTimeInput': createAngularComponentImplementation(DateTimeInputApi, DateTimeInputComponent), + 'text': createComponentImplementation(TextApi, TextComponent), + 'row': createComponentImplementation(RowApi, RowComponent), + 'column': createComponentImplementation(ColumnApi, ColumnComponent), + 'button': createComponentImplementation(ButtonApi, ButtonComponent), + 'textField': createComponentImplementation(TextFieldApi, TextFieldComponent), + 'image': createComponentImplementation(ImageApi, ImageComponent), + 'icon': createComponentImplementation(IconApi, IconComponent), + 'video': createComponentImplementation(VideoApi, VideoComponent), + 'audioPlayer': createComponentImplementation(AudioPlayerApi, AudioPlayerComponent), + 'list': createComponentImplementation(ListApi, ListComponent), + 'card': createComponentImplementation(CardApi, CardComponent), + 'tabs': createComponentImplementation(TabsApi, TabsComponent), + 'modal': createComponentImplementation(ModalApi, ModalComponent), + 'divider': createComponentImplementation(DividerApi, DividerComponent), + 'checkBox': createComponentImplementation(CheckBoxApi, CheckBoxComponent), + 'choicePicker': createComponentImplementation(ChoicePickerApi, ChoicePickerComponent), + 'slider': createComponentImplementation(SliderApi, SliderComponent), + 'dateTimeInput': createComponentImplementation(DateTimeInputApi, DateTimeInputComponent), } as const; /** diff --git a/renderers/angular/src/v0_9/catalog/types.spec.ts b/renderers/angular/src/v0_9/catalog/types.spec.ts index 5e18a1c550..98de267008 100644 --- a/renderers/angular/src/v0_9/catalog/types.spec.ts +++ b/renderers/angular/src/v0_9/catalog/types.spec.ts @@ -16,7 +16,7 @@ import {Component} from '@angular/core'; import {ComponentApi} from '@a2ui/web_core/v0_9'; -import {createAngularComponentImplementation} from './types'; +import {createComponentImplementation} from './types'; import {CatalogComponent} from '../core/catalog_component'; import {z} from 'zod'; @@ -27,14 +27,14 @@ import {z} from 'zod'; }) class TestComponent extends CatalogComponent {} -describe('createAngularComponentImplementation', () => { +describe('createComponentImplementation', () => { it('should map ComponentApi and Angular Component Type correctly', () => { const api: ComponentApi = { name: 'TestComp', schema: z.object({}), }; - const impl = createAngularComponentImplementation(api, TestComponent); + const impl = createComponentImplementation(api, TestComponent); expect(impl.name).toBe('TestComp'); expect(impl.schema).toEqual(api.schema); diff --git a/renderers/angular/src/v0_9/catalog/types.ts b/renderers/angular/src/v0_9/catalog/types.ts index 8e5fc85e20..88076289ac 100644 --- a/renderers/angular/src/v0_9/catalog/types.ts +++ b/renderers/angular/src/v0_9/catalog/types.ts @@ -60,7 +60,7 @@ export class AngularCatalog extends Catalog {} * @param component The Angular component class implementing the API. * @returns The structured Angular component implementation. */ -export function createAngularComponentImplementation( +export function createComponentImplementation( api: ComponentApi, component: Type, ): AngularComponentImplementation {