@a2ui/angular 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Inject, Injectable, signal, inject, DestroyRef, NgZone, input, ChangeDetectorRef, ChangeDetectionStrategy, Component, computed as computed$1, HostBinding, Directive, effect as effect$1 } from '@angular/core';
2
+ import { InjectionToken, Inject, Injectable, signal, inject, DestroyRef, NgZone, input, ChangeDetectorRef, effect as effect$1, ChangeDetectionStrategy, Component, Directive, computed as computed$1, HostBinding } from '@angular/core';
3
3
  import { MessageProcessor, effect, computed, ComponentContext, Catalog, DataContext } from '@a2ui/web_core/v0_9';
4
4
  export { signal as preactSignal } from '@a2ui/web_core/v0_9';
5
5
  import { NgComponentOutlet } from '@angular/common';
@@ -164,6 +164,7 @@ class ComponentBinder {
164
164
  bind(context) {
165
165
  const props = context.componentModel.properties;
166
166
  const bound = {};
167
+ let template = undefined;
167
168
  for (const key of Object.keys(props)) {
168
169
  const value = props[key];
169
170
  let preactSig;
@@ -198,6 +199,11 @@ class ComponentBinder {
198
199
  }
199
200
  else if (key === 'children') {
200
201
  const originalSig = preactSig;
202
+ const id = value.componentId;
203
+ const path = value.path;
204
+ if (id && path) {
205
+ template = { id, path };
206
+ }
201
207
  preactSig = computed(() => {
202
208
  const val = originalSig.value;
203
209
  const arr = Array.isArray(val) ? val : [];
@@ -213,6 +219,7 @@ class ComponentBinder {
213
219
  bound[key] = {
214
220
  value: angSig,
215
221
  raw: value,
222
+ template,
216
223
  onUpdate: isBoundPath
217
224
  ? (newValue) => context.dataContext.set(value.path, newValue)
218
225
  : () => { }, // No-op for non-bound values
@@ -229,9 +236,7 @@ class ComponentBinder {
229
236
  return ruleResults.every((r) => !!r.conditionSig.value);
230
237
  });
231
238
  const validationErrorsPreactSig = computed(() => {
232
- return ruleResults
233
- .filter((r) => !r.conditionSig.value)
234
- .map((r) => r.message);
239
+ return ruleResults.filter((r) => !r.conditionSig.value).map((r) => r.message);
235
240
  });
236
241
  bound['isValid'] = {
237
242
  value: toAngularSignal(isValidPreactSig, this.destroyRef, this.ngZone),
@@ -296,13 +301,26 @@ class ComponentHostComponent {
296
301
  context;
297
302
  resolvedComponentId = '';
298
303
  resolvedDataContextPath = '/';
299
- ngOnInit() {
300
- const surface = this.rendererService.surfaceGroup?.getSurface(this.surfaceId());
304
+ propsSub;
305
+ createSub;
306
+ constructor() {
307
+ effect$1(() => {
308
+ const key = this.componentKey();
309
+ const surfaceId = this.surfaceId();
310
+ this.setupComponent(key, surfaceId);
311
+ });
312
+ this.destroyRef.onDestroy(() => {
313
+ this.propsSub?.unsubscribe();
314
+ this.createSub?.unsubscribe();
315
+ });
316
+ }
317
+ setupComponent(key, surfaceId) {
318
+ this.resetState();
319
+ const surface = this.rendererService.surfaceGroup?.getSurface(surfaceId);
301
320
  if (!surface) {
302
- console.warn(`Surface ${this.surfaceId()} not found`);
321
+ console.warn(`Surface ${surfaceId} not found`);
303
322
  return;
304
323
  }
305
- const key = this.componentKey();
306
324
  let id;
307
325
  let basePath;
308
326
  if (typeof key === 'object' && key !== null && 'id' in key) {
@@ -316,15 +334,14 @@ class ComponentHostComponent {
316
334
  this.resolvedComponentId = id;
317
335
  const componentModel = surface.componentsModel.get(id);
318
336
  if (!componentModel) {
319
- console.warn(`Component ${id} not found in surface ${this.surfaceId()}. Waiting for it...`);
320
- const sub = surface.componentsModel.onCreated.subscribe((comp) => {
337
+ console.warn(`Component ${id} not found in surface ${surfaceId}. Waiting for it...`);
338
+ const sub = surface.componentsModel.onCreated.subscribe(comp => {
321
339
  if (comp.id === id) {
322
340
  this.initializeComponent(surface, comp, id, basePath);
323
- this.cdr.markForCheck();
324
341
  sub.unsubscribe();
325
342
  }
326
343
  });
327
- this.destroyRef.onDestroy(() => sub.unsubscribe());
344
+ this.createSub = sub;
328
345
  return;
329
346
  }
330
347
  this.initializeComponent(surface, componentModel, id, basePath);
@@ -344,15 +361,23 @@ class ComponentHostComponent {
344
361
  this.resolvedDataContextPath = this.context.dataContext.path;
345
362
  // Subscribes to updates to the component model properties, to get the
346
363
  // component to react when a new prop is added after creation.
347
- const onPropsUpdateSub = componentModel.onUpdated.subscribe(() => {
364
+ this.propsSub = componentModel.onUpdated.subscribe(() => {
348
365
  this.props = this.binder.bind(this.context);
349
366
  this.cdr.markForCheck();
350
367
  });
351
- this.destroyRef.onDestroy(() => {
352
- // ComponentContext itself doesn't have a dispose, but its inner components might.
353
- // However, SurfaceModel takes care of component disposal.
354
- onPropsUpdateSub.unsubscribe();
355
- });
368
+ this.cdr.markForCheck();
369
+ }
370
+ /**
371
+ * Resets the component host state, unsubscribing from active subscriptions
372
+ * and clearing component properties to avoid rendering stale data while
373
+ * a new component is being loaded.
374
+ */
375
+ resetState() {
376
+ this.propsSub?.unsubscribe();
377
+ this.createSub?.unsubscribe();
378
+ this.componentType = null;
379
+ this.props = {};
380
+ this.resolvedDataContextPath = '/';
356
381
  this.cdr.markForCheck();
357
382
  }
358
383
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ComponentHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -378,7 +403,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
378
403
  selector: 'a2ui-v09-component-host',
379
404
  imports: [NgComponentOutlet],
380
405
  host: {
381
- 'style': 'display: contents;'
406
+ style: 'display: contents;',
382
407
  },
383
408
  template: `
384
409
  @if (componentType) {
@@ -397,7 +422,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
397
422
  `,
398
423
  changeDetection: ChangeDetectionStrategy.OnPush,
399
424
  }]
400
- }], propDecorators: { componentKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentKey", required: false }] }], surfaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "surfaceId", required: true }] }] } });
425
+ }], ctorParameters: () => [], propDecorators: { componentKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentKey", required: false }] }], surfaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "surfaceId", required: true }] }] } });
401
426
 
402
427
  /**
403
428
  * Copyright 2026 Google LLC
@@ -432,7 +457,7 @@ class SurfaceComponent {
432
457
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SurfaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
433
458
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", type: SurfaceComponent, isStandalone: true, selector: "a2ui-v09-surface", inputs: { surfaceId: { classPropertyName: "surfaceId", publicName: "surfaceId", isSignal: true, isRequired: true, transformFunction: null }, dataContextPath: { classPropertyName: "dataContextPath", publicName: "dataContextPath", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents;" }, ngImport: i0, template: `
434
459
  <a2ui-v09-component-host
435
- [componentKey]="{ id: 'root', basePath: dataContextPath() }"
460
+ [componentKey]="{id: 'root', basePath: dataContextPath()}"
436
461
  [surfaceId]="surfaceId()"
437
462
  >
438
463
  </a2ui-v09-component-host>
@@ -445,11 +470,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
445
470
  standalone: true,
446
471
  imports: [ComponentHostComponent],
447
472
  host: {
448
- 'style': 'display: contents;'
473
+ style: 'display: contents;',
449
474
  },
450
475
  template: `
451
476
  <a2ui-v09-component-host
452
- [componentKey]="{ id: 'root', basePath: dataContextPath() }"
477
+ [componentKey]="{id: 'root', basePath: dataContextPath()}"
453
478
  [surfaceId]="surfaceId()"
454
479
  >
455
480
  </a2ui-v09-component-host>
@@ -458,6 +483,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
458
483
  }]
459
484
  }], propDecorators: { surfaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "surfaceId", required: true }] }], dataContextPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataContextPath", required: false }] }] } });
460
485
 
486
+ /**
487
+ * Base class for A2UI catalog component in Angular.
488
+ *
489
+ * All Angular catalog components should extend this base class,
490
+ * which provides type safe access to props() and other common
491
+ * fields.
492
+ */
493
+ class CatalogComponent {
494
+ /**
495
+ * Reactive properties resolved from the A2UI ComponentModel.
496
+ */
497
+ props = input({}, ...(ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []));
498
+ surfaceId = input.required(...(ngDevMode ? [{ debugName: "surfaceId" }] : /* istanbul ignore next */ []));
499
+ componentId = input.required(...(ngDevMode ? [{ debugName: "componentId" }] : /* istanbul ignore next */ []));
500
+ dataContextPath = input('/', ...(ngDevMode ? [{ debugName: "dataContextPath" }] : /* istanbul ignore next */ []));
501
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CatalogComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
502
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: CatalogComponent, isStandalone: true, inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, surfaceId: { classPropertyName: "surfaceId", publicName: "surfaceId", isSignal: true, isRequired: true, transformFunction: null }, componentId: { classPropertyName: "componentId", publicName: "componentId", isSignal: true, isRequired: true, transformFunction: null }, dataContextPath: { classPropertyName: "dataContextPath", publicName: "dataContextPath", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
503
+ }
504
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CatalogComponent, decorators: [{
505
+ type: Directive
506
+ }], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], surfaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "surfaceId", required: true }] }], componentId: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentId", required: true }] }], dataContextPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataContextPath", required: false }] }] } });
507
+
461
508
  /**
462
509
  * Copyright 2026 Google LLC
463
510
  *
@@ -501,7 +548,7 @@ class DefaultMarkdownRenderer extends MarkdownRenderer {
501
548
  }
502
549
  catch (e) {
503
550
  if (!DefaultMarkdownRenderer.warningLogged) {
504
- console.warn("[DefaultMarkdownRenderer] Failed to load optional `@a2ui/markdown-it` renderer. Using fallback.");
551
+ console.warn('[DefaultMarkdownRenderer] Failed to load optional `@a2ui/markdown-it` renderer. Using fallback.');
505
552
  DefaultMarkdownRenderer.warningLogged = true;
506
553
  }
507
554
  return markdown;
@@ -573,36 +620,45 @@ class AngularCatalog extends Catalog {
573
620
  * Base class for A2UI basic catalog components in Angular.
574
621
  *
575
622
  * Automatically injects the basic catalog styles when the component is instantiated.
623
+ * Also binds the primary brand color to the host element.
576
624
  */
577
- class BasicCatalogComponent {
578
- /**
579
- * Reactive properties resolved from the A2UI ComponentModel.
580
- */
581
- props = input({}, ...(ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []));
582
- surfaceId = input.required(...(ngDevMode ? [{ debugName: "surfaceId" }] : /* istanbul ignore next */ []));
583
- componentId = input.required(...(ngDevMode ? [{ debugName: "componentId" }] : /* istanbul ignore next */ []));
584
- dataContextPath = input('/', ...(ngDevMode ? [{ debugName: "dataContextPath" }] : /* istanbul ignore next */ []));
625
+ class BasicCatalogComponent extends CatalogComponent {
626
+ rendererService = inject(A2uiRendererService);
627
+ surface = computed$1(() => {
628
+ return this.rendererService.surfaceGroup.getSurface(this.surfaceId());
629
+ }, ...(ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []));
630
+ theme = computed$1(() => {
631
+ return this.surface()?.theme;
632
+ }, ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
633
+ primaryColor = computed$1(() => {
634
+ return this.theme()?.primaryColor;
635
+ }, ...(ngDevMode ? [{ debugName: "primaryColor" }] : /* istanbul ignore next */ []));
636
+ /** Weight is applied as flex css property on the component host HTML element. */
637
+ weight = computed$1(() => this.props()['weight']?.value() ?? null, ...(ngDevMode ? [{ debugName: "weight" }] : /* istanbul ignore next */ []));
585
638
  constructor() {
639
+ super();
586
640
  injectBasicCatalogStyles();
587
641
  }
588
- /**
589
- * Computes the weight of the component from the properties.
590
- */
591
- weight = computed$1(() => this.props()['weight']?.value() ?? null, ...(ngDevMode ? [{ debugName: "weight" }] : /* istanbul ignore next */ []));
592
642
  /**
593
643
  * Binds the flex style to the host element based on the weight.
594
644
  */
595
645
  get flexStyle() {
596
646
  return this.weight() !== null ? `${this.weight()}` : null;
597
647
  }
648
+ get primaryColorStyle() {
649
+ return this.primaryColor() || null;
650
+ }
598
651
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BasicCatalogComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
599
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: BasicCatalogComponent, isStandalone: true, inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, surfaceId: { classPropertyName: "surfaceId", publicName: "surfaceId", isSignal: true, isRequired: true, transformFunction: null }, componentId: { classPropertyName: "componentId", publicName: "componentId", isSignal: true, isRequired: true, transformFunction: null }, dataContextPath: { classPropertyName: "dataContextPath", publicName: "dataContextPath", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.flex": "this.flexStyle" } }, ngImport: i0 });
652
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.5", type: BasicCatalogComponent, isStandalone: true, host: { properties: { "style.flex": "this.flexStyle", "style.--a2ui-color-primary": "this.primaryColorStyle" } }, usesInheritance: true, ngImport: i0 });
600
653
  }
601
654
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BasicCatalogComponent, decorators: [{
602
655
  type: Directive
603
- }], ctorParameters: () => [], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], surfaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "surfaceId", required: true }] }], componentId: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentId", required: true }] }], dataContextPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataContextPath", required: false }] }], flexStyle: [{
656
+ }], ctorParameters: () => [], propDecorators: { flexStyle: [{
604
657
  type: HostBinding,
605
658
  args: ['style.flex']
659
+ }], primaryColorStyle: [{
660
+ type: HostBinding,
661
+ args: ['style.--a2ui-color-primary']
606
662
  }] } });
607
663
 
608
664
  /**
@@ -669,7 +725,7 @@ class TextComponent extends BasicCatalogComponent {
669
725
  break;
670
726
  }
671
727
  const requestId = ++this.renderRequestId;
672
- this.markdownRenderer.render(value).then((rendered) => {
728
+ this.markdownRenderer.render(value).then(rendered => {
673
729
  if (requestId === this.renderRequestId) {
674
730
  this.resolvedText.set(rendered);
675
731
  }
@@ -755,20 +811,17 @@ class RowComponent extends BasicCatalogComponent {
755
811
  const val = this.props()['align']?.value();
756
812
  return val ? ALIGN_MAP[val] || val : undefined;
757
813
  }, ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
758
- children = computed$1(() => {
759
- const raw = this.props()['children']?.value() || [];
760
- return Array.isArray(raw) ? raw : [];
761
- }, ...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
814
+ children = computed$1(() => this.props()['children'].value() || [], ...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
762
815
  isRepeating = computed$1(() => {
763
- return !!this.props()['children']?.raw?.componentId;
816
+ return !!this.props()['children'].template;
764
817
  }, ...(ngDevMode ? [{ debugName: "isRepeating" }] : /* istanbul ignore next */ []));
765
818
  templateId = computed$1(() => {
766
- return this.props()['children']?.raw?.componentId;
819
+ return this.props()['children'].template?.id;
767
820
  }, ...(ngDevMode ? [{ debugName: "templateId" }] : /* istanbul ignore next */ []));
768
821
  normalizedChildren = computed$1(() => {
769
822
  if (this.isRepeating())
770
823
  return [];
771
- return this.children().map((child) => {
824
+ return this.children().map(child => {
772
825
  if (typeof child === 'object' && child !== null && 'id' in child) {
773
826
  return child;
774
827
  }
@@ -776,7 +829,7 @@ class RowComponent extends BasicCatalogComponent {
776
829
  });
777
830
  }, ...(ngDevMode ? [{ debugName: "normalizedChildren" }] : /* istanbul ignore next */ []));
778
831
  getNormalizedPath(index) {
779
- return getNormalizedPath(this.props()['children']?.raw?.path, this.dataContextPath(), index);
832
+ return getNormalizedPath(this.props()['children'].template?.path, this.dataContextPath(), index);
780
833
  }
781
834
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: RowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
782
835
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: RowComponent, isStandalone: true, selector: "a2ui-v09-row", host: { properties: { "style.display": "\"flex\"", "style.flex-direction": "\"row\"", "style.gap": "\"var(--a2ui-row-gap, var(--a2ui-spacing-m, 16px))\"", "style.justify-content": "justify()", "style.align-items": "align()" } }, usesInheritance: true, ngImport: i0, template: `
@@ -790,7 +843,7 @@ class RowComponent extends BasicCatalogComponent {
790
843
  @if (isRepeating()) {
791
844
  @for (item of children(); track item; let i = $index) {
792
845
  <a2ui-v09-component-host
793
- [componentKey]="{ id: templateId()!, basePath: getNormalizedPath(i) }"
846
+ [componentKey]="{id: templateId()!, basePath: getNormalizedPath(i)}"
794
847
  [surfaceId]="surfaceId()"
795
848
  >
796
849
  </a2ui-v09-component-host>
@@ -822,7 +875,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
822
875
  @if (isRepeating()) {
823
876
  @for (item of children(); track item; let i = $index) {
824
877
  <a2ui-v09-component-host
825
- [componentKey]="{ id: templateId()!, basePath: getNormalizedPath(i) }"
878
+ [componentKey]="{id: templateId()!, basePath: getNormalizedPath(i)}"
826
879
  [surfaceId]="surfaceId()"
827
880
  >
828
881
  </a2ui-v09-component-host>
@@ -866,20 +919,17 @@ class ColumnComponent extends BasicCatalogComponent {
866
919
  const val = this.props()['align']?.value();
867
920
  return val ? ALIGN_MAP[val] || val : undefined;
868
921
  }, ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
869
- children = computed$1(() => {
870
- const raw = this.props()['children']?.value() || [];
871
- return Array.isArray(raw) ? raw : [];
872
- }, ...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
922
+ children = computed$1(() => this.props()['children'].value() || [], ...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
873
923
  isRepeating = computed$1(() => {
874
- return !!this.props()['children']?.raw?.componentId;
924
+ return !!this.props()['children'].template;
875
925
  }, ...(ngDevMode ? [{ debugName: "isRepeating" }] : /* istanbul ignore next */ []));
876
926
  templateId = computed$1(() => {
877
- return this.props()['children']?.raw?.componentId;
927
+ return this.props()['children'].template?.id;
878
928
  }, ...(ngDevMode ? [{ debugName: "templateId" }] : /* istanbul ignore next */ []));
879
929
  normalizedChildren = computed$1(() => {
880
930
  if (this.isRepeating())
881
931
  return [];
882
- return this.children().map((child) => {
932
+ return this.children().map(child => {
883
933
  if (typeof child === 'object' && child !== null && 'id' in child) {
884
934
  return child;
885
935
  }
@@ -887,7 +937,7 @@ class ColumnComponent extends BasicCatalogComponent {
887
937
  });
888
938
  }, ...(ngDevMode ? [{ debugName: "normalizedChildren" }] : /* istanbul ignore next */ []));
889
939
  getNormalizedPath(index) {
890
- return getNormalizedPath(this.props()['children']?.raw?.path, this.dataContextPath(), index);
940
+ return getNormalizedPath(this.props()['children'].template?.path, this.dataContextPath(), index);
891
941
  }
892
942
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
893
943
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: ColumnComponent, isStandalone: true, selector: "a2ui-v09-column", host: { properties: { "style.display": "\"flex\"", "style.flex-direction": "\"column\"", "style.width": "\"100%\"", "style.gap": "\"var(--a2ui-column-gap, var(--a2ui-spacing-m, 16px))\"", "style.justify-content": "justify()", "style.align-items": "align()" } }, usesInheritance: true, ngImport: i0, template: `
@@ -901,7 +951,7 @@ class ColumnComponent extends BasicCatalogComponent {
901
951
  @if (isRepeating()) {
902
952
  @for (item of children(); track item; let i = $index) {
903
953
  <a2ui-v09-component-host
904
- [componentKey]="{ id: templateId()!, basePath: getNormalizedPath(i) }"
954
+ [componentKey]="{id: templateId()!, basePath: getNormalizedPath(i)}"
905
955
  [surfaceId]="surfaceId()"
906
956
  >
907
957
  </a2ui-v09-component-host>
@@ -934,7 +984,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
934
984
  @if (isRepeating()) {
935
985
  @for (item of children(); track item; let i = $index) {
936
986
  <a2ui-v09-component-host
937
- [componentKey]="{ id: templateId()!, basePath: getNormalizedPath(i) }"
987
+ [componentKey]="{id: templateId()!, basePath: getNormalizedPath(i)}"
938
988
  [surfaceId]="surfaceId()"
939
989
  >
940
990
  </a2ui-v09-component-host>
@@ -976,14 +1026,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
976
1026
  * - `--a2ui-button-font-weight`: Controls the font weight.
977
1027
  */
978
1028
  class ButtonComponent extends BasicCatalogComponent {
979
- rendererService = inject(A2uiRendererService);
980
1029
  variant = computed$1(() => this.props()['variant']?.value() ?? 'default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
981
1030
  child = computed$1(() => this.props()['child']?.value(), ...(ngDevMode ? [{ debugName: "child" }] : /* istanbul ignore next */ []));
982
1031
  action = computed$1(() => this.props()['action']?.value(), ...(ngDevMode ? [{ debugName: "action" }] : /* istanbul ignore next */ []));
983
1032
  handleClick() {
984
1033
  const action = this.action();
985
1034
  if (action) {
986
- const surface = this.rendererService.surfaceGroup?.getSurface(this.surfaceId());
1035
+ const surface = this.surface();
987
1036
  if (surface) {
988
1037
  const dataContext = new DataContext(surface, this.dataContextPath());
989
1038
  const resolvedAction = dataContext.resolveAction(action);
@@ -1004,7 +1053,7 @@ class ButtonComponent extends BasicCatalogComponent {
1004
1053
  </a2ui-v09-component-host>
1005
1054
  }
1006
1055
  </button>
1007
- `, isInline: true, styles: [".a2ui-button{padding:var( --a2ui-button-padding, var(--a2ui-spacing-m, .5rem) var(--a2ui-spacing-l, 1rem) );border-radius:var(--a2ui-button-border-radius, var(--a2ui-spacing-s, .25rem));border:var( --a2ui-button-border, var(--a2ui-border-width, 1px) solid var(--a2ui-color-border, #ccc) );cursor:pointer;margin:var(--a2ui-button-margin, var(--a2ui-spacing-m, .5rem));background:var(--a2ui-button-background, var(--a2ui-color-surface, #fff));box-shadow:var(--a2ui-button-box-shadow, none);font-weight:var(--a2ui-button-font-weight, normal);--_a2ui-text-margin: 0;--_a2ui-text-color: var(--a2ui-color-on-secondary, #333);color:var(--_a2ui-text-color)}.a2ui-button.primary{background-color:var(--a2ui-color-primary, #17e);--_a2ui-text-color: var(--a2ui-color-on-primary, #fff);color:var(--_a2ui-text-color);border-color:var(--a2ui-color-primary-hover, #0069d9)}.a2ui-button.borderless{background:none;border:none;padding:0;color:var(--a2ui-color-primary, #17e)}.a2ui-button:disabled{background-color:#e9ecef;color:#6c757d;border-color:#ced4da;cursor:not-allowed}\n"], dependencies: [{ kind: "component", type: ComponentHostComponent, selector: "a2ui-v09-component-host", inputs: ["componentKey", "surfaceId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1056
+ `, isInline: true, styles: [".a2ui-button{padding:var( --a2ui-button-padding, var(--a2ui-spacing-m, .5rem) var(--a2ui-spacing-l, 1rem) );border-radius:var(--a2ui-button-border-radius, var(--a2ui-spacing-s, .25rem));border:var( --a2ui-button-border, var(--a2ui-border-width, 1px) solid var(--a2ui-color-border, #ccc) );cursor:pointer;margin:var(--a2ui-button-margin, var(--a2ui-spacing-m, .5rem));background:var(--a2ui-button-background, var(--a2ui-color-surface, #fff));box-shadow:var(--a2ui-button-box-shadow, none);font-weight:var(--a2ui-button-font-weight, normal);--_a2ui-text-margin: 0;--_a2ui-text-color: var(--a2ui-color-on-secondary, #333);color:var(--_a2ui-text-color)}.a2ui-button.primary{background:var(--a2ui-color-primary, #17e);--_a2ui-text-color: var(--a2ui-color-on-primary, #fff);color:var(--_a2ui-text-color);border:none}.a2ui-button.borderless{background:none;border:none;padding:0;color:var(--a2ui-color-primary, #17e)}.a2ui-button:disabled{background-color:#e9ecef;color:#6c757d;border-color:#ced4da;cursor:not-allowed}\n"], dependencies: [{ kind: "component", type: ComponentHostComponent, selector: "a2ui-v09-component-host", inputs: ["componentKey", "surfaceId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1008
1057
  }
1009
1058
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ButtonComponent, decorators: [{
1010
1059
  type: Component,
@@ -1020,7 +1069,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1020
1069
  </a2ui-v09-component-host>
1021
1070
  }
1022
1071
  </button>
1023
- `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".a2ui-button{padding:var( --a2ui-button-padding, var(--a2ui-spacing-m, .5rem) var(--a2ui-spacing-l, 1rem) );border-radius:var(--a2ui-button-border-radius, var(--a2ui-spacing-s, .25rem));border:var( --a2ui-button-border, var(--a2ui-border-width, 1px) solid var(--a2ui-color-border, #ccc) );cursor:pointer;margin:var(--a2ui-button-margin, var(--a2ui-spacing-m, .5rem));background:var(--a2ui-button-background, var(--a2ui-color-surface, #fff));box-shadow:var(--a2ui-button-box-shadow, none);font-weight:var(--a2ui-button-font-weight, normal);--_a2ui-text-margin: 0;--_a2ui-text-color: var(--a2ui-color-on-secondary, #333);color:var(--_a2ui-text-color)}.a2ui-button.primary{background-color:var(--a2ui-color-primary, #17e);--_a2ui-text-color: var(--a2ui-color-on-primary, #fff);color:var(--_a2ui-text-color);border-color:var(--a2ui-color-primary-hover, #0069d9)}.a2ui-button.borderless{background:none;border:none;padding:0;color:var(--a2ui-color-primary, #17e)}.a2ui-button:disabled{background-color:#e9ecef;color:#6c757d;border-color:#ced4da;cursor:not-allowed}\n"] }]
1072
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".a2ui-button{padding:var( --a2ui-button-padding, var(--a2ui-spacing-m, .5rem) var(--a2ui-spacing-l, 1rem) );border-radius:var(--a2ui-button-border-radius, var(--a2ui-spacing-s, .25rem));border:var( --a2ui-button-border, var(--a2ui-border-width, 1px) solid var(--a2ui-color-border, #ccc) );cursor:pointer;margin:var(--a2ui-button-margin, var(--a2ui-spacing-m, .5rem));background:var(--a2ui-button-background, var(--a2ui-color-surface, #fff));box-shadow:var(--a2ui-button-box-shadow, none);font-weight:var(--a2ui-button-font-weight, normal);--_a2ui-text-margin: 0;--_a2ui-text-color: var(--a2ui-color-on-secondary, #333);color:var(--_a2ui-text-color)}.a2ui-button.primary{background:var(--a2ui-color-primary, #17e);--_a2ui-text-color: var(--a2ui-color-on-primary, #fff);color:var(--_a2ui-text-color);border:none}.a2ui-button.borderless{background:none;border:none;padding:0;color:var(--a2ui-color-primary, #17e)}.a2ui-button:disabled{background-color:#e9ecef;color:#6c757d;border-color:#ced4da;cursor:not-allowed}\n"] }]
1024
1073
  }] });
1025
1074
 
1026
1075
  /**
@@ -1157,7 +1206,7 @@ class ImageComponent extends BasicCatalogComponent {
1157
1206
  [style.object-fit]="fit()"
1158
1207
  [class]="'a2ui-image ' + variant()"
1159
1208
  />
1160
- `, isInline: true, styles: [".a2ui-image{display:block;max-width:100%;height:auto}.a2ui-image.circle{border-radius:50%;aspect-ratio:1 / 1}.a2ui-image.rounded{border-radius:var(--a2ui-image-border-radius, var(--a2ui-border-radius, 8px))}.a2ui-image.icon{width:var(--a2ui-image-icon-size, 24px);height:var(--a2ui-image-icon-size, 24px)}.a2ui-image.avatar{width:var(--a2ui-image-avatar-size, 40px);height:var(--a2ui-image-avatar-size, 40px);border-radius:50%}.a2ui-image.smallFeature{max-width:var(--a2ui-image-small-feature-size, 100px)}.a2ui-image.mediumFeature{max-width:300px;height:auto}.a2ui-image.largeFeature{width:100%;max-height:var(--a2ui-image-large-feature-size, 400px)}.a2ui-image.header{width:100%;height:var(--a2ui-image-header-size, 200px)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1209
+ `, isInline: true, styles: [".a2ui-image{display:block;max-width:100%;height:auto;border-radius:var(--a2ui-image-border-radius, var(--a2ui-border-radius, 8px))}.a2ui-image.icon{width:var(--a2ui-image-icon-size, 24px);height:var(--a2ui-image-icon-size, 24px)}.a2ui-image.avatar{width:var(--a2ui-image-avatar-size, 40px);height:var(--a2ui-image-avatar-size, 40px);border-radius:50%}.a2ui-image.smallFeature{max-width:var(--a2ui-image-small-feature-size, 100px)}.a2ui-image.largeFeature{max-height:var(--a2ui-image-large-feature-size, 400px)}.a2ui-image.header{height:var(--a2ui-image-header-size, 200px)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1161
1210
  }
1162
1211
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ImageComponent, decorators: [{
1163
1212
  type: Component,
@@ -1168,7 +1217,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1168
1217
  [style.object-fit]="fit()"
1169
1218
  [class]="'a2ui-image ' + variant()"
1170
1219
  />
1171
- `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".a2ui-image{display:block;max-width:100%;height:auto}.a2ui-image.circle{border-radius:50%;aspect-ratio:1 / 1}.a2ui-image.rounded{border-radius:var(--a2ui-image-border-radius, var(--a2ui-border-radius, 8px))}.a2ui-image.icon{width:var(--a2ui-image-icon-size, 24px);height:var(--a2ui-image-icon-size, 24px)}.a2ui-image.avatar{width:var(--a2ui-image-avatar-size, 40px);height:var(--a2ui-image-avatar-size, 40px);border-radius:50%}.a2ui-image.smallFeature{max-width:var(--a2ui-image-small-feature-size, 100px)}.a2ui-image.mediumFeature{max-width:300px;height:auto}.a2ui-image.largeFeature{width:100%;max-height:var(--a2ui-image-large-feature-size, 400px)}.a2ui-image.header{width:100%;height:var(--a2ui-image-header-size, 200px)}\n"] }]
1220
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".a2ui-image{display:block;max-width:100%;height:auto;border-radius:var(--a2ui-image-border-radius, var(--a2ui-border-radius, 8px))}.a2ui-image.icon{width:var(--a2ui-image-icon-size, 24px);height:var(--a2ui-image-icon-size, 24px)}.a2ui-image.avatar{width:var(--a2ui-image-avatar-size, 40px);height:var(--a2ui-image-avatar-size, 40px);border-radius:50%}.a2ui-image.smallFeature{max-width:var(--a2ui-image-small-feature-size, 100px)}.a2ui-image.largeFeature{max-height:var(--a2ui-image-large-feature-size, 400px)}.a2ui-image.header{height:var(--a2ui-image-header-size, 200px)}\n"] }]
1172
1221
  }] });
1173
1222
 
1174
1223
  /**
@@ -1206,14 +1255,17 @@ const ICON_NAME_OVERRIDES = {
1206
1255
  class IconComponent extends BasicCatalogComponent {
1207
1256
  color = computed$1(() => this.props()['color']?.value(), ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
1208
1257
  iconNameRaw = computed$1(() => this.props()['name']?.value(), ...(ngDevMode ? [{ debugName: "iconNameRaw" }] : /* istanbul ignore next */ []));
1209
- isPath = computed$1(() => {
1258
+ isSvgPath = computed$1(() => {
1210
1259
  const name = this.iconNameRaw();
1211
- return typeof name === 'object' && name !== null && 'path' in name;
1212
- }, ...(ngDevMode ? [{ debugName: "isPath" }] : /* istanbul ignore next */ []));
1213
- path = computed$1(() => {
1260
+ return typeof name === 'object' && name !== null && 'svgPath' in name;
1261
+ }, ...(ngDevMode ? [{ debugName: "isSvgPath" }] : /* istanbul ignore next */ []));
1262
+ svgPath = computed$1(() => {
1214
1263
  const name = this.iconNameRaw();
1215
- return name?.path || '';
1216
- }, ...(ngDevMode ? [{ debugName: "path" }] : /* istanbul ignore next */ []));
1264
+ if (typeof name === 'object' && name !== null && 'svgPath' in name) {
1265
+ return name.svgPath;
1266
+ }
1267
+ return '';
1268
+ }, ...(ngDevMode ? [{ debugName: "svgPath" }] : /* istanbul ignore next */ []));
1217
1269
  iconName = computed$1(() => {
1218
1270
  const name = this.iconNameRaw();
1219
1271
  if (typeof name !== 'string')
@@ -1221,13 +1273,13 @@ class IconComponent extends BasicCatalogComponent {
1221
1273
  if (ICON_NAME_OVERRIDES[name])
1222
1274
  return ICON_NAME_OVERRIDES[name];
1223
1275
  // Convert camelCase to snake_case for Material Icons
1224
- return name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
1276
+ return name.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`);
1225
1277
  }, ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
1226
1278
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: IconComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1227
1279
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: IconComponent, isStandalone: true, selector: "a2ui-v09-icon", usesInheritance: true, ngImport: i0, template: `
1228
- @if (isPath()) {
1280
+ @if (isSvgPath()) {
1229
1281
  <svg class="a2ui-icon svg" viewBox="0 0 24 24" [style.fill]="color() || 'currentColor'">
1230
- <path [attr.d]="path()"></path>
1282
+ <path [attr.d]="svgPath()"></path>
1231
1283
  </svg>
1232
1284
  } @else {
1233
1285
  <i class="material-icons a2ui-icon" [style.color]="color()">
@@ -1239,9 +1291,9 @@ class IconComponent extends BasicCatalogComponent {
1239
1291
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: IconComponent, decorators: [{
1240
1292
  type: Component,
1241
1293
  args: [{ selector: 'a2ui-v09-icon', standalone: true, imports: [], template: `
1242
- @if (isPath()) {
1294
+ @if (isSvgPath()) {
1243
1295
  <svg class="a2ui-icon svg" viewBox="0 0 24 24" [style.fill]="color() || 'currentColor'">
1244
- <path [attr.d]="path()"></path>
1296
+ <path [attr.d]="svgPath()"></path>
1245
1297
  </svg>
1246
1298
  } @else {
1247
1299
  <i class="material-icons a2ui-icon" [style.color]="color()">
@@ -1384,7 +1436,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1384
1436
  * Angular implementation of the A2UI List component (v0.9).
1385
1437
  *
1386
1438
  * Renders a list of child components with support for ordered, unordered,
1387
- * and unstyled layouts in both vertical and horizontal orientations.
1439
+ * and unstyled layouts in both vertical and horizontal directions.
1388
1440
  *
1389
1441
  * Supported CSS variables:
1390
1442
  * - `--a2ui-list-gap`: Controls the gap between items.
@@ -1392,11 +1444,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1392
1444
  */
1393
1445
  class ListComponent extends BasicCatalogComponent {
1394
1446
  listStyle = computed$1(() => this.props()['listStyle']?.value(), ...(ngDevMode ? [{ debugName: "listStyle" }] : /* istanbul ignore next */ []));
1395
- orientation = computed$1(() => this.props()['orientation']?.value() || 'vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
1396
- children = computed$1(() => {
1397
- const raw = this.props()['children']?.value();
1398
- return Array.isArray(raw) ? raw : [];
1399
- }, ...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
1447
+ direction = computed$1(() => this.props()['direction']?.value() || 'vertical', ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
1448
+ children = computed$1(() => this.props()['children'].value(), ...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
1400
1449
  listTag = computed$1(() => {
1401
1450
  const style = this.listStyle();
1402
1451
  if (style === 'ordered')
@@ -1420,7 +1469,7 @@ class ListComponent extends BasicCatalogComponent {
1420
1469
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: ListComponent, isStandalone: true, selector: "a2ui-v09-list", usesInheritance: true, ngImport: i0, template: `
1421
1470
  @switch (listTag()) {
1422
1471
  @case ('ol') {
1423
- <ol [class]="'a2ui-list ' + orientation()" [style.list-style-type]="styleType()">
1472
+ <ol [class]="'a2ui-list ' + direction()" [style.list-style-type]="styleType()">
1424
1473
  @for (child of children(); track trackBy($index, child)) {
1425
1474
  <li>
1426
1475
  <a2ui-v09-component-host [componentKey]="child" [surfaceId]="surfaceId()">
@@ -1430,7 +1479,7 @@ class ListComponent extends BasicCatalogComponent {
1430
1479
  </ol>
1431
1480
  }
1432
1481
  @case ('ul') {
1433
- <ul [class]="'a2ui-list ' + orientation()" [style.list-style-type]="styleType()">
1482
+ <ul [class]="'a2ui-list ' + direction()" [style.list-style-type]="styleType()">
1434
1483
  @for (child of children(); track trackBy($index, child)) {
1435
1484
  <li>
1436
1485
  <a2ui-v09-component-host [componentKey]="child" [surfaceId]="surfaceId()">
@@ -1440,7 +1489,7 @@ class ListComponent extends BasicCatalogComponent {
1440
1489
  </ul>
1441
1490
  }
1442
1491
  @default {
1443
- <div [class]="'a2ui-list ' + orientation()" style="list-style-type: none;">
1492
+ <div [class]="'a2ui-list ' + direction()" style="list-style-type: none;">
1444
1493
  @for (child of children(); track trackBy($index, child)) {
1445
1494
  <div class="a2ui-list-item-none">
1446
1495
  <a2ui-v09-component-host [componentKey]="child" [surfaceId]="surfaceId()">
@@ -1457,7 +1506,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1457
1506
  args: [{ selector: 'a2ui-v09-list', standalone: true, imports: [ComponentHostComponent], template: `
1458
1507
  @switch (listTag()) {
1459
1508
  @case ('ol') {
1460
- <ol [class]="'a2ui-list ' + orientation()" [style.list-style-type]="styleType()">
1509
+ <ol [class]="'a2ui-list ' + direction()" [style.list-style-type]="styleType()">
1461
1510
  @for (child of children(); track trackBy($index, child)) {
1462
1511
  <li>
1463
1512
  <a2ui-v09-component-host [componentKey]="child" [surfaceId]="surfaceId()">
@@ -1467,7 +1516,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1467
1516
  </ol>
1468
1517
  }
1469
1518
  @case ('ul') {
1470
- <ul [class]="'a2ui-list ' + orientation()" [style.list-style-type]="styleType()">
1519
+ <ul [class]="'a2ui-list ' + direction()" [style.list-style-type]="styleType()">
1471
1520
  @for (child of children(); track trackBy($index, child)) {
1472
1521
  <li>
1473
1522
  <a2ui-v09-component-host [componentKey]="child" [surfaceId]="surfaceId()">
@@ -1477,7 +1526,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1477
1526
  </ul>
1478
1527
  }
1479
1528
  @default {
1480
- <div [class]="'a2ui-list ' + orientation()" style="list-style-type: none;">
1529
+ <div [class]="'a2ui-list ' + direction()" style="list-style-type: none;">
1481
1530
  @for (child of children(); track trackBy($index, child)) {
1482
1531
  <div class="a2ui-list-item-none">
1483
1532
  <a2ui-v09-component-host [componentKey]="child" [surfaceId]="surfaceId()">
@@ -1528,7 +1577,7 @@ class CardComponent extends BasicCatalogComponent {
1528
1577
  </a2ui-v09-component-host>
1529
1578
  }
1530
1579
  </div>
1531
- `, isInline: true, styles: [".a2ui-card{padding:var(--a2ui-card-padding, var(--a2ui-spacing-m, 16px));border-radius:var(--a2ui-card-border-radius, var(--a2ui-border-radius, 8px));box-shadow:var(--a2ui-card-box-shadow, 0 2px 4px rgba(0, 0, 0, .1));background-color:var(--a2ui-card-background, var(--a2ui-color-surface, #fff));border:var( --a2ui-card-border, var(--a2ui-border-width, 1px) solid var(--a2ui-color-border, #ccc) );margin:var(--a2ui-card-margin, var(--a2ui-spacing-m, 16px))}\n"], dependencies: [{ kind: "component", type: ComponentHostComponent, selector: "a2ui-v09-component-host", inputs: ["componentKey", "surfaceId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1580
+ `, isInline: true, styles: [".a2ui-card{padding:var(--a2ui-card-padding, var(--a2ui-spacing-m, 16px));border-radius:var(--a2ui-card-border-radius, var(--a2ui-border-radius, 8px));box-shadow:var(--a2ui-card-box-shadow, 0 2px 4px rgba(0, 0, 0, .1));background:var(--a2ui-card-background, var(--a2ui-color-surface, #fff));border:var( --a2ui-card-border, var(--a2ui-border-width, 1px) solid var(--a2ui-color-border, #ccc) );margin:var(--a2ui-card-margin, var(--a2ui-spacing-m, 16px))}\n"], dependencies: [{ kind: "component", type: ComponentHostComponent, selector: "a2ui-v09-component-host", inputs: ["componentKey", "surfaceId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1532
1581
  }
1533
1582
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CardComponent, decorators: [{
1534
1583
  type: Component,
@@ -1539,7 +1588,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1539
1588
  </a2ui-v09-component-host>
1540
1589
  }
1541
1590
  </div>
1542
- `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".a2ui-card{padding:var(--a2ui-card-padding, var(--a2ui-spacing-m, 16px));border-radius:var(--a2ui-card-border-radius, var(--a2ui-border-radius, 8px));box-shadow:var(--a2ui-card-box-shadow, 0 2px 4px rgba(0, 0, 0, .1));background-color:var(--a2ui-card-background, var(--a2ui-color-surface, #fff));border:var( --a2ui-card-border, var(--a2ui-border-width, 1px) solid var(--a2ui-color-border, #ccc) );margin:var(--a2ui-card-margin, var(--a2ui-spacing-m, 16px))}\n"] }]
1591
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".a2ui-card{padding:var(--a2ui-card-padding, var(--a2ui-spacing-m, 16px));border-radius:var(--a2ui-card-border-radius, var(--a2ui-border-radius, 8px));box-shadow:var(--a2ui-card-box-shadow, 0 2px 4px rgba(0, 0, 0, .1));background:var(--a2ui-card-background, var(--a2ui-color-surface, #fff));border:var( --a2ui-card-border, var(--a2ui-border-width, 1px) solid var(--a2ui-color-border, #ccc) );margin:var(--a2ui-card-margin, var(--a2ui-spacing-m, 16px))}\n"] }]
1543
1592
  }] });
1544
1593
 
1545
1594
  /**
@@ -1575,15 +1624,15 @@ class TabsComponent extends BasicCatalogComponent {
1575
1624
  activeTabIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeTabIndex" }] : /* istanbul ignore next */ []));
1576
1625
  tabs = computed$1(() => this.props()['tabs']?.value() || [], ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
1577
1626
  activeTab = computed$1(() => this.tabs()[this.activeTabIndex()], ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
1578
- normalizedActiveTabContent = computed$1(() => {
1579
- const content = this.activeTab()?.content;
1580
- if (!content)
1627
+ normalizedActiveTabChild = computed$1(() => {
1628
+ const child = this.activeTab()?.child;
1629
+ if (!child)
1581
1630
  return null;
1582
- if (typeof content === 'object' && content !== null && 'id' in content) {
1583
- return content;
1631
+ if (typeof child === 'object' && child !== null && 'id' in child) {
1632
+ return child;
1584
1633
  }
1585
- return { id: content, basePath: this.dataContextPath() };
1586
- }, ...(ngDevMode ? [{ debugName: "normalizedActiveTabContent" }] : /* istanbul ignore next */ []));
1634
+ return { id: child, basePath: this.dataContextPath() };
1635
+ }, ...(ngDevMode ? [{ debugName: "normalizedActiveTabChild" }] : /* istanbul ignore next */ []));
1587
1636
  setActiveTab(index) {
1588
1637
  this.activeTabIndex.set(index);
1589
1638
  }
@@ -1597,14 +1646,14 @@ class TabsComponent extends BasicCatalogComponent {
1597
1646
  [class.active]="activeTabIndex() === i"
1598
1647
  (click)="setActiveTab(i)"
1599
1648
  >
1600
- {{ tab.label }}
1649
+ {{ tab.title }}
1601
1650
  </button>
1602
1651
  }
1603
1652
  </div>
1604
- @if (normalizedActiveTabContent()) {
1653
+ @if (normalizedActiveTabChild()) {
1605
1654
  <div class="a2ui-tab-content">
1606
1655
  <a2ui-v09-component-host
1607
- [componentKey]="normalizedActiveTabContent()!"
1656
+ [componentKey]="normalizedActiveTabChild()!"
1608
1657
  [surfaceId]="surfaceId()"
1609
1658
  >
1610
1659
  </a2ui-v09-component-host>
@@ -1624,14 +1673,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1624
1673
  [class.active]="activeTabIndex() === i"
1625
1674
  (click)="setActiveTab(i)"
1626
1675
  >
1627
- {{ tab.label }}
1676
+ {{ tab.title }}
1628
1677
  </button>
1629
1678
  }
1630
1679
  </div>
1631
- @if (normalizedActiveTabContent()) {
1680
+ @if (normalizedActiveTabChild()) {
1632
1681
  <div class="a2ui-tab-content">
1633
1682
  <a2ui-v09-component-host
1634
- [componentKey]="normalizedActiveTabContent()!"
1683
+ [componentKey]="normalizedActiveTabChild()!"
1635
1684
  [surfaceId]="surfaceId()"
1636
1685
  >
1637
1686
  </a2ui-v09-component-host>
@@ -1827,7 +1876,7 @@ class CheckBoxComponent extends BasicCatalogComponent {
1827
1876
  />
1828
1877
  <span class="a2ui-check-box-text">{{ label() }}</span>
1829
1878
  </label>
1830
- `, isInline: true, styles: [".a2ui-check-box-label{display:flex;align-items:center;gap:var(--a2ui-checkbox-gap, var(--a2ui-spacing-s, .5rem));cursor:pointer;padding:4px 0;margin:var(--a2ui-checkbox-margin, var(--a2ui-spacing-m, 16px));color:var(--a2ui-text-color-text, var(--a2ui-color-on-background, #333))}.a2ui-check-box-input{width:var(--a2ui-checkbox-size, 1rem);height:var(--a2ui-checkbox-size, 1rem);cursor:pointer;background:var(--a2ui-checkbox-background, inherit);border:var(--a2ui-checkbox-border, var(--a2ui-border-width, 1px) solid #ccc);border-radius:var(--a2ui-checkbox-border-radius, 4px)}.a2ui-check-box-text{font-size:var( --a2ui-checkbox-label-font-size, var(--a2ui-label-font-size, var(--a2ui-font-size-s, 16px)) );font-weight:var(--a2ui-checkbox-label-font-weight, bold)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1879
+ `, isInline: true, styles: [".a2ui-check-box-label{display:flex;align-items:center;gap:var(--a2ui-checkbox-gap, var(--a2ui-spacing-s, .5rem));cursor:pointer;padding:4px 0;margin:var(--a2ui-checkbox-margin, var(--a2ui-spacing-m, 16px));color:var(--a2ui-text-color-text, var(--a2ui-color-on-background, #333))}.a2ui-check-box-input{width:var(--a2ui-checkbox-size, 1rem);height:var(--a2ui-checkbox-size, 1rem);cursor:pointer;background:var(--a2ui-checkbox-background, inherit);border:var(--a2ui-checkbox-border, var(--a2ui-border-width, 1px) solid #ccc);border-radius:var(--a2ui-checkbox-border-radius, 4px);accent-color:var(--a2ui-color-primary)}.a2ui-check-box-text{font-size:var( --a2ui-checkbox-label-font-size, var(--a2ui-label-font-size, var(--a2ui-font-size-s, 16px)) );font-weight:var(--a2ui-checkbox-label-font-weight, bold)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1831
1880
  }
1832
1881
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CheckBoxComponent, decorators: [{
1833
1882
  type: Component,
@@ -1841,7 +1890,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1841
1890
  />
1842
1891
  <span class="a2ui-check-box-text">{{ label() }}</span>
1843
1892
  </label>
1844
- `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".a2ui-check-box-label{display:flex;align-items:center;gap:var(--a2ui-checkbox-gap, var(--a2ui-spacing-s, .5rem));cursor:pointer;padding:4px 0;margin:var(--a2ui-checkbox-margin, var(--a2ui-spacing-m, 16px));color:var(--a2ui-text-color-text, var(--a2ui-color-on-background, #333))}.a2ui-check-box-input{width:var(--a2ui-checkbox-size, 1rem);height:var(--a2ui-checkbox-size, 1rem);cursor:pointer;background:var(--a2ui-checkbox-background, inherit);border:var(--a2ui-checkbox-border, var(--a2ui-border-width, 1px) solid #ccc);border-radius:var(--a2ui-checkbox-border-radius, 4px)}.a2ui-check-box-text{font-size:var( --a2ui-checkbox-label-font-size, var(--a2ui-label-font-size, var(--a2ui-font-size-s, 16px)) );font-weight:var(--a2ui-checkbox-label-font-weight, bold)}\n"] }]
1893
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".a2ui-check-box-label{display:flex;align-items:center;gap:var(--a2ui-checkbox-gap, var(--a2ui-spacing-s, .5rem));cursor:pointer;padding:4px 0;margin:var(--a2ui-checkbox-margin, var(--a2ui-spacing-m, 16px));color:var(--a2ui-text-color-text, var(--a2ui-color-on-background, #333))}.a2ui-check-box-input{width:var(--a2ui-checkbox-size, 1rem);height:var(--a2ui-checkbox-size, 1rem);cursor:pointer;background:var(--a2ui-checkbox-background, inherit);border:var(--a2ui-checkbox-border, var(--a2ui-border-width, 1px) solid #ccc);border-radius:var(--a2ui-checkbox-border-radius, 4px);accent-color:var(--a2ui-color-primary)}.a2ui-check-box-text{font-size:var( --a2ui-checkbox-label-font-size, var(--a2ui-label-font-size, var(--a2ui-font-size-s, 16px)) );font-weight:var(--a2ui-checkbox-label-font-weight, bold)}\n"] }]
1845
1894
  }] });
1846
1895
 
1847
1896
  /**
@@ -1877,7 +1926,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1877
1926
  */
1878
1927
  class ChoicePickerComponent extends BasicCatalogComponent {
1879
1928
  displayStyle = computed$1(() => this.props()['displayStyle']?.value(), ...(ngDevMode ? [{ debugName: "displayStyle" }] : /* istanbul ignore next */ []));
1880
- choices = computed$1(() => this.props()['choices']?.value() || this.props()['options']?.value() || [], ...(ngDevMode ? [{ debugName: "choices" }] : /* istanbul ignore next */ []));
1929
+ options = computed$1(() => this.props()['options']?.value() || [], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
1881
1930
  variant = computed$1(() => this.props()['variant']?.value(), ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1882
1931
  selectedValue = computed$1(() => this.props()['value']?.value(), ...(ngDevMode ? [{ debugName: "selectedValue" }] : /* istanbul ignore next */ []));
1883
1932
  isMultiple() {
@@ -1913,7 +1962,7 @@ class ChoicePickerComponent extends BasicCatalogComponent {
1913
1962
  }
1914
1963
  else {
1915
1964
  if (active) {
1916
- this.props()['value']?.onUpdate(value);
1965
+ this.props()['value']?.onUpdate([value]);
1917
1966
  }
1918
1967
  }
1919
1968
  }
@@ -1923,30 +1972,30 @@ class ChoicePickerComponent extends BasicCatalogComponent {
1923
1972
  <!-- Chips Variant -->
1924
1973
  @if (displayStyle() === 'chips') {
1925
1974
  <div class="a2ui-chips-group">
1926
- @for (choice of choices(); track choice.value) {
1975
+ @for (option of options(); track option.value) {
1927
1976
  <button
1928
1977
  class="a2ui-chip"
1929
- [class.active]="isSelected(choice.value)"
1930
- (click)="toggleActive(choice.value)"
1978
+ [class.active]="isSelected(option.value)"
1979
+ (click)="toggleActive(option.value)"
1931
1980
  >
1932
- {{ choice.label }}
1981
+ {{ option.label }}
1933
1982
  </button>
1934
1983
  }
1935
1984
  </div>
1936
1985
  } @else {
1937
1986
  <!-- Checkbox/Radio Variant -->
1938
1987
  <div class="a2ui-options-group">
1939
- @for (choice of choices(); track choice.value) {
1988
+ @for (option of options(); track option.value) {
1940
1989
  <label class="a2ui-option-label">
1941
1990
  <input
1942
1991
  [type]="isMultiple() ? 'checkbox' : 'radio'"
1943
1992
  [name]="componentId()"
1944
- [value]="choice.value"
1945
- [checked]="isSelected(choice.value)"
1946
- (change)="onCheckChange(choice.value, $event)"
1993
+ [value]="option.value"
1994
+ [checked]="isSelected(option.value)"
1995
+ (change)="onCheckChange(option.value, $event)"
1947
1996
  class="a2ui-option-input"
1948
1997
  />
1949
- <span class="a2ui-option-text">{{ choice.label }}</span>
1998
+ <span class="a2ui-option-text">{{ option.label }}</span>
1950
1999
  </label>
1951
2000
  }
1952
2001
  </div>
@@ -1961,30 +2010,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1961
2010
  <!-- Chips Variant -->
1962
2011
  @if (displayStyle() === 'chips') {
1963
2012
  <div class="a2ui-chips-group">
1964
- @for (choice of choices(); track choice.value) {
2013
+ @for (option of options(); track option.value) {
1965
2014
  <button
1966
2015
  class="a2ui-chip"
1967
- [class.active]="isSelected(choice.value)"
1968
- (click)="toggleActive(choice.value)"
2016
+ [class.active]="isSelected(option.value)"
2017
+ (click)="toggleActive(option.value)"
1969
2018
  >
1970
- {{ choice.label }}
2019
+ {{ option.label }}
1971
2020
  </button>
1972
2021
  }
1973
2022
  </div>
1974
2023
  } @else {
1975
2024
  <!-- Checkbox/Radio Variant -->
1976
2025
  <div class="a2ui-options-group">
1977
- @for (choice of choices(); track choice.value) {
2026
+ @for (option of options(); track option.value) {
1978
2027
  <label class="a2ui-option-label">
1979
2028
  <input
1980
2029
  [type]="isMultiple() ? 'checkbox' : 'radio'"
1981
2030
  [name]="componentId()"
1982
- [value]="choice.value"
1983
- [checked]="isSelected(choice.value)"
1984
- (change)="onCheckChange(choice.value, $event)"
2031
+ [value]="option.value"
2032
+ [checked]="isSelected(option.value)"
2033
+ (change)="onCheckChange(option.value, $event)"
1985
2034
  class="a2ui-option-input"
1986
2035
  />
1987
- <span class="a2ui-option-text">{{ choice.label }}</span>
2036
+ <span class="a2ui-option-text">{{ option.label }}</span>
1988
2037
  </label>
1989
2038
  }
1990
2039
  </div>
@@ -2042,7 +2091,7 @@ class SliderComponent extends BasicCatalogComponent {
2042
2091
  [min]="min()"
2043
2092
  [max]="max()"
2044
2093
  [step]="step()"
2045
- [value]="value() ?? min()"
2094
+ [value]="value()"
2046
2095
  (input)="handleInput($event)"
2047
2096
  class="a2ui-slider"
2048
2097
  />
@@ -2062,7 +2111,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
2062
2111
  [min]="min()"
2063
2112
  [max]="max()"
2064
2113
  [step]="step()"
2065
- [value]="value() ?? min()"
2114
+ [value]="value()"
2066
2115
  (input)="handleInput($event)"
2067
2116
  class="a2ui-slider"
2068
2117
  />
@@ -2213,26 +2262,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
2213
2262
  */
2214
2263
  /**
2215
2264
  * The set of default Angular implementations for each component in the basic catalog.
2265
+ * Using string literals as keys, to survive property renaming, as these names need to match the JSON payload.
2216
2266
  */
2267
+ // Ignore Prettier to preserve quoted keys, needed to survive property renaming.
2268
+ // prettier-ignore
2217
2269
  const DEFAULT_COMPONENT_IMPLEMENTATIONS = {
2218
- text: { ...TextApi, component: TextComponent },
2219
- row: { ...RowApi, component: RowComponent },
2220
- column: { ...ColumnApi, component: ColumnComponent },
2221
- button: { ...ButtonApi, component: ButtonComponent },
2222
- textField: { ...TextFieldApi, component: TextFieldComponent },
2223
- image: { ...ImageApi, component: ImageComponent },
2224
- icon: { ...IconApi, component: IconComponent },
2225
- video: { ...VideoApi, component: VideoComponent },
2226
- audioPlayer: { ...AudioPlayerApi, component: AudioPlayerComponent },
2227
- list: { ...ListApi, component: ListComponent },
2228
- card: { ...CardApi, component: CardComponent },
2229
- tabs: { ...TabsApi, component: TabsComponent },
2230
- modal: { ...ModalApi, component: ModalComponent },
2231
- divider: { ...DividerApi, component: DividerComponent },
2232
- checkBox: { ...CheckBoxApi, component: CheckBoxComponent },
2233
- choicePicker: { ...ChoicePickerApi, component: ChoicePickerComponent },
2234
- slider: { ...SliderApi, component: SliderComponent },
2235
- dateTimeInput: { ...DateTimeInputApi, component: DateTimeInputComponent },
2270
+ 'text': { ...TextApi, component: TextComponent },
2271
+ 'row': { ...RowApi, component: RowComponent },
2272
+ 'column': { ...ColumnApi, component: ColumnComponent },
2273
+ 'button': { ...ButtonApi, component: ButtonComponent },
2274
+ 'textField': { ...TextFieldApi, component: TextFieldComponent },
2275
+ 'image': { ...ImageApi, component: ImageComponent },
2276
+ 'icon': { ...IconApi, component: IconComponent },
2277
+ 'video': { ...VideoApi, component: VideoComponent },
2278
+ 'audioPlayer': { ...AudioPlayerApi, component: AudioPlayerComponent },
2279
+ 'list': { ...ListApi, component: ListComponent },
2280
+ 'card': { ...CardApi, component: CardComponent },
2281
+ 'tabs': { ...TabsApi, component: TabsComponent },
2282
+ 'modal': { ...ModalApi, component: ModalComponent },
2283
+ 'divider': { ...DividerApi, component: DividerComponent },
2284
+ 'checkBox': { ...CheckBoxApi, component: CheckBoxComponent },
2285
+ 'choicePicker': { ...ChoicePickerApi, component: ChoicePickerComponent },
2286
+ 'slider': { ...SliderApi, component: SliderComponent },
2287
+ 'dateTimeInput': { ...DateTimeInputApi, component: DateTimeInputComponent },
2236
2288
  };
2237
2289
  /**
2238
2290
  * The set of Angular UI components provided by the basic catalog.
@@ -2306,5 +2358,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
2306
2358
  * Generated bundle index. Do not edit.
2307
2359
  */
2308
2360
 
2309
- export { A2UI_RENDERER_CONFIG, A2uiRendererService, AngularCatalog, AudioPlayerComponent, BASIC_COMPONENTS, BasicCatalog, BasicCatalogBase, ButtonComponent, CardComponent, CheckBoxComponent, ChoicePickerComponent, ColumnComponent, ComponentBinder, ComponentHostComponent, DateTimeInputComponent, DefaultMarkdownRenderer, DividerComponent, IconComponent, ImageComponent, ListComponent, MarkdownRenderer, ModalComponent, RowComponent, SliderComponent, SurfaceComponent, TabsComponent, TextComponent, TextFieldComponent, VideoComponent, getNormalizedPath, provideMarkdownRenderer, toAngularSignal };
2361
+ export { A2UI_RENDERER_CONFIG, A2uiRendererService, AngularCatalog, AudioPlayerComponent, BASIC_COMPONENTS, BasicCatalog, BasicCatalogBase, ButtonComponent, CardComponent, CatalogComponent, CheckBoxComponent, ChoicePickerComponent, ColumnComponent, ComponentBinder, ComponentHostComponent, DateTimeInputComponent, DefaultMarkdownRenderer, DividerComponent, IconComponent, ImageComponent, ListComponent, MarkdownRenderer, ModalComponent, RowComponent, SliderComponent, SurfaceComponent, TabsComponent, TextComponent, TextFieldComponent, VideoComponent, getNormalizedPath, provideMarkdownRenderer, toAngularSignal };
2310
2362
  //# sourceMappingURL=a2ui-angular-src-v0_9.mjs.map