@molecule/app-data-table-ui-angular 1.1.1 → 1.1.2

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.
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-22T16:18:14.704Z
6
+ Generated: 2026-11-23T14:53:23.879Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-data-table-ui-angular
@@ -237,6 +237,7 @@ Column `cell` templates receive the row as `$implicit` and `a0`; a column
237
237
  @Component({
238
238
  selector: 'section[mol-data-table-card]',
239
239
  standalone: true,
240
+ hostDirectives: [MolPlacement],
240
241
  imports: [NgTemplateOutlet],
241
242
  inputs: [
242
243
  'title',
@@ -321,7 +322,7 @@ Column `cell` templates receive the row as `$implicit` and `a0`; a column
321
322
  </table>
322
323
  </div>`,
323
324
  })
324
- export class DataTableCard<T = unknown> implements AfterViewInit, DoCheck {
325
+ export class DataTableCard<T = unknown> {
325
326
  title?: unknown
326
327
  titleAction?: unknown
327
328
  /** Column definitions. */
@@ -335,15 +336,18 @@ export class DataTableCard<T = unknown> implements AfterViewInit, DoCheck {
335
336
  emptyMessage?: unknown
336
337
  /** Extra classes on the outer card. */
337
338
  className?: string
339
+ /** `data-mol-id` for AI-agent selectors. */
338
340
  dataMolId?: string
339
341
 
342
+ /** The index list of the five skeleton rows. */
340
343
  readonly skeletonIndexes = [0, 1, 2, 3, 4]
341
344
 
342
345
  @ViewChild('headerRow') private headerRow?: ElementRef<HTMLElement>
343
346
  @ViewChild('titleHeading') private titleHeading?: ElementRef<HTMLElement>
344
347
 
345
- private readonly renderer = inject(Renderer2)
346
- private readonly conditional = new ConditionalElement(this.renderer)
348
+ constructor() {
349
+ usePlacement((hasContent) => this.syncVisibility(hasContent))
350
+ }
347
351
 
348
352
  /** The current class map. */
349
353
  cm(): UIClassMap {
@@ -370,6 +374,7 @@ export class DataTableCard<T = unknown> implements AfterViewInit, DoCheck {
370
374
  )
371
375
  }
372
376
 
377
+ /** The scroller's class list (`overflow-x-auto`). */
373
378
  scrollerClasses(): string {
374
379
  return this.cm().cn(this.cm().dataTableCardScroller)
375
380
  }
@@ -378,6 +383,7 @@ export class DataTableCard<T = unknown> implements AfterViewInit, DoCheck {
378
383
  return this.cm().cn(this.cm().w('full'), this.cm().dataTableCardTable)
379
384
  }
380
385
 
386
+ /** The header row's class list (the card head token). */
381
387
  headClasses(): string {
382
388
  return this.cm().cn(this.cm().dataTableCardHead)
383
389
  }
@@ -391,10 +397,12 @@ export class DataTableCard<T = unknown> implements AfterViewInit, DoCheck {
391
397
  )
392
398
  }
393
399
 
400
+ /** The body's class list (the card body token). */
394
401
  bodyClasses(): string {
395
402
  return this.cm().cn(this.cm().dataTableCardBody)
396
403
  }
397
404
 
405
+ /** A skeleton cell's class list (`px-8` + `py-5`). */
398
406
  skeletonCellClasses(): string {
399
407
  return this.cm().cn(this.cm().sp('px', 8), this.cm().sp('py', 5))
400
408
  }
@@ -484,37 +492,24 @@ export class DataTableCard<T = unknown> implements AfterViewInit, DoCheck {
484
492
  this.onRowClick?.(row)
485
493
  }
486
494
 
487
- ngAfterViewInit(): void {
488
- this.syncVisibility()
489
- }
490
-
491
- ngDoCheck(): void {
492
- this.syncVisibility()
493
- }
494
-
495
- private syncVisibility(): void {
495
+ private syncVisibility(hasContent: SlotReader): void {
496
496
  const heading = this.titleHeading?.nativeElement
497
- const titleShown = this.title !== undefined || hasContent(heading)
498
- this.conditional.sync(this.headerRow?.nativeElement, titleShown || this.hasTitleAction())
499
- this.conditional.sync(heading, titleShown)
497
+ const headingHas = hasContent(heading, 1)
498
+ const titleShown = this.title !== undefined || headingHas
499
+ setElementPresent(this.headerRow?.nativeElement, titleShown || this.hasTitleAction(hasContent))
500
+ setElementPresent(heading, titleShown)
500
501
  }
501
502
 
502
- private hasTitleAction(): boolean {
503
+ private hasTitleAction(hasContent: SlotReader): boolean {
503
504
  if (this.titleAction !== undefined) return true
504
505
  const row = this.headerRow?.nativeElement
505
506
  if (!row) return false
506
- const heading = this.titleHeading?.nativeElement
507
- return Array.from(row.childNodes).some(
508
- (node) =>
509
- node !== heading &&
510
- (node.nodeType === Node.ELEMENT_NODE ||
511
- (node.nodeType === Node.TEXT_NODE && (node.textContent ?? '').trim() !== '')),
512
- )
507
+ return hasContent(row, 1)
513
508
  }
514
509
  }
515
510
  ```
516
511
 
517
- _(Member comments are shortened to their first sentence, and the 37 longest are left out to fit; the full declaration is in `node_modules/@molecule/app-data-table-ui-angular/dist/data-table-card.component.d.ts`.)_
512
+ _(Member comments are shortened to their first sentence, and the 29 longest are left out to fit; the full declaration is in `node_modules/@molecule/app-data-table-ui-angular/dist/data-table-card.component.d.ts`.)_
518
513
 
519
514
  #### `RowWithActions`
520
515
 
@@ -534,6 +529,7 @@ cell does not reach the row's handler (React's `stopPropagation`).
534
529
  @Component({
535
530
  selector: 'tr[mol-row-with-actions]',
536
531
  standalone: true,
532
+ hostDirectives: [MolPlacement],
537
533
  imports: [NgTemplateOutlet],
538
534
  inputs: ['actions', 'onClick', 'selected', 'className'],
539
535
  host: {
@@ -550,7 +546,7 @@ cell does not reach the row's handler (React's `stopPropagation`).
550
546
  {{ actionsText() }}
551
547
  </td>`,
552
548
  })
553
- export class RowWithActions implements AfterViewInit, DoCheck {
549
+ export class RowWithActions {
554
550
  /** Action buttons/menu for the trailing cell (a `TemplateRef` or `[slot=actions]` content). */
555
551
  actions?: unknown
556
552
  /** Called when the row body is clicked, with the click event. */
@@ -563,8 +559,9 @@ export class RowWithActions implements AfterViewInit, DoCheck {
563
559
  /** The trailing actions cell, detached while React renders none. */
564
560
  @ViewChild('actionsCell') private actionsCell?: ElementRef<HTMLElement>
565
561
 
566
- private readonly renderer = inject(Renderer2)
567
- private readonly conditional = new ConditionalElement(this.renderer)
562
+ constructor() {
563
+ usePlacement((hasContent) => this.syncActions(hasContent))
564
+ }
568
565
 
569
566
  /**
570
567
  * The current class map.
@@ -626,20 +623,15 @@ export class RowWithActions implements AfterViewInit, DoCheck {
626
623
  event.stopPropagation()
627
624
  }
628
625
 
629
- /** Reconciles the actions cell once the view (and its projected content) exists. */
630
- ngAfterViewInit(): void {
631
- this.syncActions()
632
- }
633
-
634
- /** Re-reconciles the actions cell after input writes. */
635
- ngDoCheck(): void {
636
- this.syncActions()
637
- }
638
-
639
- /** Keeps the actions cell in the DOM exactly while React renders it. */
640
- private syncActions(): void {
626
+ /**
627
+ * Keeps the actions cell in the DOM exactly while React renders it.
628
+ *
629
+ * @param hasContent - Reads whether a slot has content.
630
+ */
631
+ private syncActions(hasContent: SlotReader): void {
641
632
  const cell = this.actionsCell?.nativeElement
642
- this.conditional.sync(cell, this.actions !== undefined || hasContent(cell))
633
+ const projected = hasContent(cell)
634
+ setElementPresent(cell, this.actions !== undefined || projected)
643
635
  }
644
636
  }
645
637
  ```
@@ -957,7 +949,7 @@ Peer dependencies:
957
949
  - `@angular/common` ^22.0.0
958
950
  - `@angular/core` ^22.0.0
959
951
  - `@angular/platform-browser` ^22.0.0
960
- - `@molecule/app-angular` ^3.5.0
952
+ - `@molecule/app-angular` ^3.13.0
961
953
  - `@molecule/app-ui` ^1.3.11
962
954
  - `@molecule/app-ui-angular` ^1.1.0
963
955
 
@@ -1,7 +1,8 @@
1
- import { type AfterViewInit, type DoCheck, type TemplateRef } from '@angular/core';
1
+ import { type TemplateRef } from '@angular/core';
2
2
  import type { UIClassMap } from '@molecule/app-ui';
3
3
  import type { DataTableColumn } from './types.js';
4
4
  import * as i0 from "@angular/core";
5
+ import * as i1 from "@molecule/app-angular";
5
6
  /**
6
7
  * DataTableCard component.
7
8
  *
@@ -20,7 +21,7 @@ import * as i0 from "@angular/core";
20
21
  * `header` may be text or a `TemplateRef`. Node props (`title`, `titleAction`,
21
22
  * `emptyMessage`) may be `[slot=…]` content, a `TemplateRef`, or text.
22
23
  */
23
- export declare class DataTableCard<T = unknown> implements AfterViewInit, DoCheck {
24
+ export declare class DataTableCard<T = unknown> {
24
25
  /** Optional title above the table chrome (text, a `TemplateRef`, or `[slot=title]` content). */
25
26
  title?: unknown;
26
27
  /** Right-aligned action in the title row (a `TemplateRef` or `[slot=titleAction]` content). */
@@ -47,8 +48,7 @@ export declare class DataTableCard<T = unknown> implements AfterViewInit, DoChec
47
48
  private headerRow?;
48
49
  /** The `<h3>`, detached while React renders no title. */
49
50
  private titleHeading?;
50
- private readonly renderer;
51
- private readonly conditional;
51
+ constructor();
52
52
  /**
53
53
  * The current class map.
54
54
  * @returns The UIClassMap.
@@ -192,23 +192,23 @@ export declare class DataTableCard<T = unknown> implements AfterViewInit, DoChec
192
192
  * @param row - The clicked row.
193
193
  */
194
194
  clickRow(row: T): void;
195
- /** Reconciles the title row once the view (and its projected content) exists. */
196
- ngAfterViewInit(): void;
197
- /** Re-reconciles the title row after input writes. */
198
- ngDoCheck(): void;
199
195
  /**
200
196
  * Keeps the title row and the `<h3>` in the DOM exactly while React renders
201
197
  * them: the row when a title or a title action exists, the heading when a
202
198
  * title exists.
199
+ *
200
+ * @param hasContent - Reads whether a slot has content.
203
201
  */
204
202
  private syncVisibility;
205
203
  /**
206
204
  * Whether React renders a title action: the prop, or `[slot=titleAction]`
207
- * content beside the heading.
205
+ * content beside the heading (the heading is the row's own first child).
206
+ *
207
+ * @param hasContent - Reads whether a slot has content.
208
208
  * @returns True when an action renders.
209
209
  */
210
210
  private hasTitleAction;
211
211
  static ɵfac: i0.ɵɵFactoryDeclaration<DataTableCard<any>, never>;
212
- static ɵcmp: i0.ɵɵComponentDeclaration<DataTableCard<any>, "section[mol-data-table-card]", never, { "title": { "alias": "title"; "required": false; }; "titleAction": { "alias": "titleAction"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "rowKey": { "alias": "rowKey"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "onRowClick": { "alias": "onRowClick"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "className": { "alias": "className"; "required": false; }; "dataMolId": { "alias": "dataMolId"; "required": false; }; }, {}, never, ["[slot=title]", "[slot=titleAction]", "[slot=emptyMessage]"], true, never>;
212
+ static ɵcmp: i0.ɵɵComponentDeclaration<DataTableCard<any>, "section[mol-data-table-card]", never, { "title": { "alias": "title"; "required": false; }; "titleAction": { "alias": "titleAction"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "rowKey": { "alias": "rowKey"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "onRowClick": { "alias": "onRowClick"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "className": { "alias": "className"; "required": false; }; "dataMolId": { "alias": "dataMolId"; "required": false; }; }, {}, never, ["[slot=title]", "[slot=titleAction]", "[slot=emptyMessage]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
213
213
  }
214
214
  //# sourceMappingURL=data-table-card.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-table-card.component.d.ts","sourceRoot":"","sources":["../src/data-table-card.component.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,OAAO,EAIZ,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAIlD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAuFa,aAAa,CAAC,CAAC,GAAG,OAAO,CAAE,YAAW,aAAa,EAAE,OAAO;IACvE,gGAAgG;IAChG,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,+FAA+F;IAC/F,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0BAA0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H,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI3C;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM;IAIxB;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI;IAItB;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAQtB;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;yCAtTX,aAAa;2CAAb,aAAa;CA4TzB"}
@@ -4,10 +4,12 @@
4
4
  * @module
5
5
  */
6
6
  import { NgTemplateOutlet } from '@angular/common';
7
- import { Component, inject, Renderer2, ViewChild, } from '@angular/core';
7
+ import { Component, ViewChild } from '@angular/core';
8
+ import { MolPlacement, setElementPresent, usePlacement, } from '@molecule/app-angular';
8
9
  import { getClassMap } from '@molecule/app-ui';
9
- import { ConditionalElement, hasContent, templateOf, textOf } from './slot-dom.js';
10
+ import { templateOf, textOf } from './slot-dom.js';
10
11
  import * as i0 from "@angular/core";
12
+ import * as i1 from "@molecule/app-angular";
11
13
  const _c0 = ["headerRow"];
12
14
  const _c1 = ["titleHeading"];
13
15
  const _c2 = [[["", "slot", "title"]], [["", "slot", "titleaction"]], [["", "slot", "emptymessage"]]];
@@ -173,8 +175,9 @@ export class DataTableCard {
173
175
  headerRow;
174
176
  /** The `<h3>`, detached while React renders no title. */
175
177
  titleHeading;
176
- renderer = inject(Renderer2);
177
- conditional = new ConditionalElement(this.renderer);
178
+ constructor() {
179
+ usePlacement((hasContent) => this.syncVisibility(hasContent));
180
+ }
178
181
  /**
179
182
  * The current class map.
180
183
  * @returns The UIClassMap.
@@ -378,40 +381,34 @@ export class DataTableCard {
378
381
  clickRow(row) {
379
382
  this.onRowClick?.(row);
380
383
  }
381
- /** Reconciles the title row once the view (and its projected content) exists. */
382
- ngAfterViewInit() {
383
- this.syncVisibility();
384
- }
385
- /** Re-reconciles the title row after input writes. */
386
- ngDoCheck() {
387
- this.syncVisibility();
388
- }
389
384
  /**
390
385
  * Keeps the title row and the `<h3>` in the DOM exactly while React renders
391
386
  * them: the row when a title or a title action exists, the heading when a
392
387
  * title exists.
388
+ *
389
+ * @param hasContent - Reads whether a slot has content.
393
390
  */
394
- syncVisibility() {
391
+ syncVisibility(hasContent) {
395
392
  const heading = this.titleHeading?.nativeElement;
396
- const titleShown = this.title !== undefined || hasContent(heading);
397
- this.conditional.sync(this.headerRow?.nativeElement, titleShown || this.hasTitleAction());
398
- this.conditional.sync(heading, titleShown);
393
+ const headingHas = hasContent(heading, 1);
394
+ const titleShown = this.title !== undefined || headingHas;
395
+ setElementPresent(this.headerRow?.nativeElement, titleShown || this.hasTitleAction(hasContent));
396
+ setElementPresent(heading, titleShown);
399
397
  }
400
398
  /**
401
399
  * Whether React renders a title action: the prop, or `[slot=titleAction]`
402
- * content beside the heading.
400
+ * content beside the heading (the heading is the row's own first child).
401
+ *
402
+ * @param hasContent - Reads whether a slot has content.
403
403
  * @returns True when an action renders.
404
404
  */
405
- hasTitleAction() {
405
+ hasTitleAction(hasContent) {
406
406
  if (this.titleAction !== undefined)
407
407
  return true;
408
408
  const row = this.headerRow?.nativeElement;
409
409
  if (!row)
410
410
  return false;
411
- const heading = this.titleHeading?.nativeElement;
412
- return Array.from(row.childNodes).some((node) => node !== heading &&
413
- (node.nodeType === Node.ELEMENT_NODE ||
414
- (node.nodeType === Node.TEXT_NODE && (node.textContent ?? '').trim() !== '')));
411
+ return hasContent(row, 1);
415
412
  }
416
413
  static ɵfac = function DataTableCard_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DataTableCard)(); };
417
414
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DataTableCard, selectors: [["section", "mol-data-table-card", ""]], viewQuery: function DataTableCard_Query(rf, ctx) { if (rf & 1) {
@@ -423,7 +420,7 @@ export class DataTableCard {
423
420
  } }, hostVars: 3, hostBindings: function DataTableCard_HostBindings(rf, ctx) { if (rf & 2) {
424
421
  i0.ɵɵattribute("data-mol-id", ctx.dataMolId ?? null);
425
422
  i0.ɵɵclassMap(ctx.classes());
426
- } }, inputs: { title: "title", titleAction: "titleAction", columns: "columns", rows: "rows", rowKey: "rowKey", loading: "loading", onRowClick: "onRowClick", emptyMessage: "emptyMessage", className: "className", dataMolId: "dataMolId" }, ngContentSelectors: _c3, decls: 20, vars: 17, consts: [["headerRow", ""], ["titleHeading", ""], [3, "ngTemplateOutlet"], [3, "class"], ["aria-hidden", "true"], [3, "click"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function DataTableCard_Template(rf, ctx) { if (rf & 1) {
423
+ } }, inputs: { title: "title", titleAction: "titleAction", columns: "columns", rows: "rows", rowKey: "rowKey", loading: "loading", onRowClick: "onRowClick", emptyMessage: "emptyMessage", className: "className", dataMolId: "dataMolId" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], ngContentSelectors: _c3, decls: 20, vars: 17, consts: [["headerRow", ""], ["titleHeading", ""], [3, "ngTemplateOutlet"], [3, "class"], ["aria-hidden", "true"], [3, "click"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function DataTableCard_Template(rf, ctx) { if (rf & 1) {
427
424
  i0.ɵɵprojectionDef(_c2);
428
425
  i0.ɵɵelementStart(0, "div", null, 0)(2, "h3", null, 1);
429
426
  i0.ɵɵtext(4);
@@ -473,6 +470,7 @@ export class DataTableCard {
473
470
  args: [{
474
471
  selector: 'section[mol-data-table-card]',
475
472
  standalone: true,
473
+ hostDirectives: [MolPlacement],
476
474
  imports: [NgTemplateOutlet],
477
475
  inputs: [
478
476
  'title',
@@ -557,12 +555,12 @@ export class DataTableCard {
557
555
  </table>
558
556
  </div>`,
559
557
  }]
560
- }], null, { headerRow: [{
558
+ }], () => [], { headerRow: [{
561
559
  type: ViewChild,
562
560
  args: ['headerRow']
563
561
  }], titleHeading: [{
564
562
  type: ViewChild,
565
563
  args: ['titleHeading']
566
564
  }] }); })();
567
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DataTableCard, { className: "DataTableCard", filePath: "data-table-card.component.ts", lineNumber: 130 }); })();
565
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DataTableCard, { className: "DataTableCard", filePath: "data-table-card.component.ts", lineNumber: 128 }); })();
568
566
  //# sourceMappingURL=data-table-card.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-table-card.component.js","sourceRoot":"","sources":["../src/data-table-card.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAEL,SAAS,EAGT,MAAM,EACN,SAAS,EAET,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;;;;;;;;OAyFtE,oBAAa;;IA5Cf,2BAAyC;;IAA3B,sCAAwB;;;IAKxC,2BAAyC;;IAA3B,sCAAwB;;;IAW5B,2BAAyC;;IAA3B,sCAAwB;;;IAEtC,YACF;;;;IADE,6DACF;;;IALF,0BAA+C;IAG3C,AAFF,+FAAsC,sDAE7B;IAGX,iBAAK;;;;;;IAND,iEAA0C;IAC5C,cAIC;IAJD,iFAIC;;;IASD,AADF,6BAAuB,SAC+C;IAClE,sBAA0C;IAE9C,AADE,iBAAK,EACF;;;IAHiC,cAA+B;IAA/B,2CAA+B;;IAC5D,cAA8B;IAA9B,0CAA8B;;;IAHzC,gHAMC;;;IAND,qCAMC;;;IAMK,2BAAyC;;IAA3B,sCAAwB;;;IAH1C,AADF,0BAAI,SAC+D;IAC/D,qBAAsD;IACtD,uGAA+B;IAG/B,YACF;IACF,AADE,iBAAK,EACF;;;;IAPiC,cAA4B;IAA5B,wCAA4B;;IAE9D,eAEC;IAFD,sE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T,QAAQ,EAAE,8BAA8B;gBACxC,UAAU,EAAE,IAAI;gBAChB,cAAc,EAAE,CAAC,YAAY,CAAC;gBAC9B,OAAO,EAAE,CAAC,gBAAgB,CAAC;gBAC3B,MAAM,EAAE;oBACN,OAAO;oBACP,aAAa;oBACb,SAAS;oBACT,MAAM;oBACN,QAAQ;oBACR,SAAS;oBACT,YAAY;oBACZ,cAAc;oBACd,WAAW;oBACX,WAAW;iBACZ;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,oBAAoB,EAAE,mBAAmB;iBAC1C;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAiED;aACV;;kBA2BE,SAAS;mBAAC,WAAW;;kBAErB,SAAS;mBAAC,cAAc;;kFA5Bd,aAAa"}
@@ -1,6 +1,7 @@
1
- import { type AfterViewInit, type DoCheck, type TemplateRef } from '@angular/core';
1
+ import { type TemplateRef } from '@angular/core';
2
2
  import type { UIClassMap } from '@molecule/app-ui';
3
3
  import * as i0 from "@angular/core";
4
+ import * as i1 from "@molecule/app-angular";
4
5
  /**
5
6
  * RowWithActions component.
6
7
  *
@@ -14,7 +15,7 @@ import * as i0 from "@angular/core";
14
15
  * `[slot=actions]` content, a `TemplateRef`, or text. A click inside the actions
15
16
  * cell does not reach the row's handler (React's `stopPropagation`).
16
17
  */
17
- export declare class RowWithActions implements AfterViewInit, DoCheck {
18
+ export declare class RowWithActions {
18
19
  /** Action buttons/menu for the trailing cell (a `TemplateRef` or `[slot=actions]` content). */
19
20
  actions?: unknown;
20
21
  /** Called when the row body is clicked, with the click event. */
@@ -25,8 +26,7 @@ export declare class RowWithActions implements AfterViewInit, DoCheck {
25
26
  className?: string;
26
27
  /** The trailing actions cell, detached while React renders none. */
27
28
  private actionsCell?;
28
- private readonly renderer;
29
- private readonly conditional;
29
+ constructor();
30
30
  /**
31
31
  * The current class map.
32
32
  * @returns The UIClassMap.
@@ -64,13 +64,13 @@ export declare class RowWithActions implements AfterViewInit, DoCheck {
64
64
  * @param event - The native click event.
65
65
  */
66
66
  stopClick(event: MouseEvent): void;
67
- /** Reconciles the actions cell once the view (and its projected content) exists. */
68
- ngAfterViewInit(): void;
69
- /** Re-reconciles the actions cell after input writes. */
70
- ngDoCheck(): void;
71
- /** Keeps the actions cell in the DOM exactly while React renders it. */
67
+ /**
68
+ * Keeps the actions cell in the DOM exactly while React renders it.
69
+ *
70
+ * @param hasContent - Reads whether a slot has content.
71
+ */
72
72
  private syncActions;
73
73
  static ɵfac: i0.ɵɵFactoryDeclaration<RowWithActions, never>;
74
- static ɵcmp: i0.ɵɵComponentDeclaration<RowWithActions, "tr[mol-row-with-actions]", never, { "actions": { "alias": "actions"; "required": false; }; "onClick": { "alias": "onClick"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["*", "[slot=actions]"], true, never>;
74
+ static ɵcmp: i0.ɵɵComponentDeclaration<RowWithActions, "tr[mol-row-with-actions]", never, { "actions": { "alias": "actions"; "required": false; }; "onClick": { "alias": "onClick"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["*", "[slot=actions]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
75
75
  }
76
76
  //# sourceMappingURL=row-with-actions.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"row-with-actions.component.d.ts","sourceRoot":"","sources":["../src/row-with-actions.component.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,OAAO,EAIZ,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAKlD;;;;;;;;;;;;GAYG;AACH,qBAmBa,cAAe,YAAW,aAAa,EAAE,OAAO;IAC3D,+FAA+F;IAC/F,OAAO,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I,CAAA;IACrC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,oEAAoE;IAC1C,OAAO,CAAC,WAAW,CAAC,CAAyB;;IAMvE;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;;OAIG;IACH,OAAO,IAAI,MAAM;IAIjB;;;OAGG;IACH,kBAAkB,IAAI,MAAM;IAI5B;;;OAGG;IACH,WAAW,IAAI,MAAM;IAMrB;;;OAGG;IACH,eAAe,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI;IAI9C;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAIjC;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAIlC;;;;OAIG;IACH,OAAO,CAAC,WAAW;yCAlFR,cAAc;2CAAd,cAAc;CAuF1B"}
@@ -4,10 +4,12 @@
4
4
  * @module
5
5
  */
6
6
  import { NgTemplateOutlet } from '@angular/common';
7
- import { Component, inject, Renderer2, ViewChild, } from '@angular/core';
7
+ import { Component, ViewChild } from '@angular/core';
8
+ import { MolPlacement, setElementPresent, usePlacement, } from '@molecule/app-angular';
8
9
  import { getClassMap } from '@molecule/app-ui';
9
- import { ConditionalElement, hasContent, templateOf, textOf } from './slot-dom.js';
10
+ import { templateOf, textOf } from './slot-dom.js';
10
11
  import * as i0 from "@angular/core";
12
+ import * as i1 from "@molecule/app-angular";
11
13
  const _c0 = ["actionsCell"];
12
14
  const _c1 = ["*", [["", "slot", "actions"]]];
13
15
  const _c2 = ["*", "[slot=actions]"];
@@ -40,8 +42,9 @@ export class RowWithActions {
40
42
  className;
41
43
  /** The trailing actions cell, detached while React renders none. */
42
44
  actionsCell;
43
- renderer = inject(Renderer2);
44
- conditional = new ConditionalElement(this.renderer);
45
+ constructor() {
46
+ usePlacement((hasContent) => this.syncActions(hasContent));
47
+ }
45
48
  /**
46
49
  * The current class map.
47
50
  * @returns The UIClassMap.
@@ -95,18 +98,15 @@ export class RowWithActions {
95
98
  stopClick(event) {
96
99
  event.stopPropagation();
97
100
  }
98
- /** Reconciles the actions cell once the view (and its projected content) exists. */
99
- ngAfterViewInit() {
100
- this.syncActions();
101
- }
102
- /** Re-reconciles the actions cell after input writes. */
103
- ngDoCheck() {
104
- this.syncActions();
105
- }
106
- /** Keeps the actions cell in the DOM exactly while React renders it. */
107
- syncActions() {
101
+ /**
102
+ * Keeps the actions cell in the DOM exactly while React renders it.
103
+ *
104
+ * @param hasContent - Reads whether a slot has content.
105
+ */
106
+ syncActions(hasContent) {
108
107
  const cell = this.actionsCell?.nativeElement;
109
- this.conditional.sync(cell, this.actions !== undefined || hasContent(cell));
108
+ const projected = hasContent(cell);
109
+ setElementPresent(cell, this.actions !== undefined || projected);
110
110
  }
111
111
  static ɵfac = function RowWithActions_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RowWithActions)(); };
112
112
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RowWithActions, selectors: [["tr", "mol-row-with-actions", ""]], viewQuery: function RowWithActions_Query(rf, ctx) { if (rf & 1) {
@@ -119,7 +119,7 @@ export class RowWithActions {
119
119
  } if (rf & 2) {
120
120
  i0.ɵɵattribute("aria-selected", ctx.selected ?? null);
121
121
  i0.ɵɵclassMap(ctx.classes());
122
- } }, inputs: { actions: "actions", onClick: "onClick", selected: "selected", className: "className" }, ngContentSelectors: _c2, decls: 6, vars: 4, consts: [["actionsCell", ""], [3, "click"], [3, "ngTemplateOutlet"]], template: function RowWithActions_Template(rf, ctx) { if (rf & 1) {
122
+ } }, inputs: { actions: "actions", onClick: "onClick", selected: "selected", className: "className" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], ngContentSelectors: _c2, decls: 6, vars: 4, consts: [["actionsCell", ""], [3, "click"], [3, "ngTemplateOutlet"]], template: function RowWithActions_Template(rf, ctx) { if (rf & 1) {
123
123
  i0.ɵɵprojectionDef(_c1);
124
124
  i0.ɵɵprojection(0);
125
125
  i0.ɵɵelementStart(1, "td", 1, 0);
@@ -143,6 +143,7 @@ export class RowWithActions {
143
143
  args: [{
144
144
  selector: 'tr[mol-row-with-actions]',
145
145
  standalone: true,
146
+ hostDirectives: [MolPlacement],
146
147
  imports: [NgTemplateOutlet],
147
148
  inputs: ['actions', 'onClick', 'selected', 'className'],
148
149
  host: {
@@ -159,9 +160,9 @@ export class RowWithActions {
159
160
  {{ actionsText() }}
160
161
  </td>`,
161
162
  }]
162
- }], null, { actionsCell: [{
163
+ }], () => [], { actionsCell: [{
163
164
  type: ViewChild,
164
165
  args: ['actionsCell']
165
166
  }] }); })();
166
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RowWithActions, { className: "RowWithActions", filePath: "row-with-actions.component.ts", lineNumber: 56 }); })();
167
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RowWithActions, { className: "RowWithActions", filePath: "row-with-actions.component.ts", lineNumber: 54 }); })();
167
168
  //# sourceMappingURL=row-with-actions.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"row-with-actions.component.js","sourceRoot":"","sources":["../src/row-with-actions.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAEL,SAAS,EAGT,MAAM,EACN,SAAS,EAET,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;;;;;;IA6B1E,2BAAyC;;IAA3B,sCAAwB;;AA3B9C;;;;;;;;;;;;GAYG;AAoBH,MAAM,OAAO,cAAc;IACzB,+FAA+F;IAC/F,OAAO,CAAU;IACjB,iE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ACpB,CAAC;IAED,yDAAyD;IACzD,SAAS;QACP,IAAI,CAAC,WAAW,EAAE,CAAA;IACpB,CAAC;IAED,wEAAwE;IAChE,WAAW;QACjB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,CAAA;QAC5C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA;IAC7E,CAAC;wGA1FU,cAAc;6DAAd,cAAc;;;;;;YAAd,yFAAA,oBAAgB,IAAF;;4DAAF,IAAI;YAAhB,cAAA,aAAS,CAAK;;;YATd,kBAAyB;YAClC,gCAA4E;YAA5B,6FAAS,qBAAiB,IAAC;YACzE,qBAAiD;YACjD,yFAAiC;YAGjC,YACF;YAAA,iBAAK;;;YANY,cAA8B;YAA9B,uCAA8B;YAE7C,eAEC;YAFD,qEAEC;YACD,cACF;YADE,kDACF;4BAdQ,gBAAgB;;iFAgBf,cAAc;cAnB1B,SAAS;eAAC;gBACT,QAAQ,EAAE,0BAA0B;gBACpC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,gBAAgB,CAAC;gBAC3B,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC;gBACvD,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,sBAAsB,EAAE,kBAAkB;oBAC1C,SAAS,EAAE,kBAAkB;iBAC9B;gBACD,QAAQ,EAAE;;;;;;;UAOF;aACT;;kBAYE,SAAS;mBAAC,aAAa;;kFAXb,cAAc"}
1
+ {"version":3,"file":"row-with-actions.component.js","sourceRoot":"","sources":["../src/row-with-actions.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAqC,SAAS,EAAE,MAAM,eAAe,CAAA;AAEvF,OA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b,cAAc"}
@@ -1,11 +1,10 @@
1
1
  /**
2
- * DOM helpers shared by the Angular data-table components: node-prop
3
- * detection, text rendering, projected-content presence, and keeping a
4
- * template element in the DOM exactly while React renders it.
2
+ * Node-prop helpers shared by the Angular data-table components: node-prop
3
+ * detection and text rendering.
5
4
  *
6
5
  * @module
7
6
  */
8
- import type { Renderer2, TemplateRef } from '@angular/core';
7
+ import type { TemplateRef } from '@angular/core';
9
8
  /**
10
9
  * Whether a node-valued prop is an Angular template (a projected node) rather
11
10
  * than plain text. Checked structurally — `TemplateRef` is a type-only import
@@ -29,39 +28,4 @@ export declare const templateOf: (value: unknown) => TemplateRef<unknown> | null
29
28
  * @returns The text to render, or `''` when there is nothing.
30
29
  */
31
30
  export declare const textOf: (value: unknown) => string;
32
- /**
33
- * Whether an element holds anything that renders (projected content or text),
34
- * ignoring the template's own whitespace and Angular's anchor comments.
35
- *
36
- * @param el - The element, or undefined before the view resolves.
37
- * @returns True when the element renders content.
38
- */
39
- export declare const hasContent: (el: Element | undefined | null) => boolean;
40
- /**
41
- * Keeps one template element in the DOM exactly while React renders it.
42
- *
43
- * React renders a wrapper element only when its content exists (the title row
44
- * when there is a title or an action, the actions cell when there are actions).
45
- * Angular has no way to select projected content, so each wrapper stays in the
46
- * template and this helper detaches it — projected content travels with it —
47
- * while React renders nothing, restoring it at the same position when content
48
- * appears.
49
- */
50
- export declare class ConditionalElement {
51
- private readonly renderer;
52
- private readonly detached;
53
- /**
54
- * Creates the helper.
55
- *
56
- * @param renderer - The DOM renderer.
57
- */
58
- constructor(renderer: Renderer2);
59
- /**
60
- * Shows or withholds one element.
61
- *
62
- * @param el - The element (undefined before the view resolves).
63
- * @param shouldShow - Whether React renders it.
64
- */
65
- sync(el: Element | undefined | null, shouldShow: boolean): void;
66
- }
67
31
  //# sourceMappingURL=slot-dom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slot-dom.d.ts","sourceRoot":"","sources":["../src/slot-dom.ts"],"names":[],"mappings":"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ANGED
@@ -1,7 +1,6 @@
1
1
  /**
2
- * DOM helpers shared by the Angular data-table components: node-prop
3
- * detection, text rendering, projected-content presence, and keeping a
4
- * template element in the DOM exactly while React renders it.
2
+ * Node-prop helpers shared by the Angular data-table components: node-prop
3
+ * detection and text rendering.
5
4
  *
6
5
  * @module
7
6
  */
@@ -30,65 +29,4 @@ export const templateOf = (value) => isTemplate(value) ? value : null;
30
29
  * @returns The text to render, or `''` when there is nothing.
31
30
  */
32
31
  export const textOf = (value) => value === null || value === undefined ? '' : String(value);
33
- /**
34
- * Whether an element holds anything that renders (projected content or text),
35
- * ignoring the template's own whitespace and Angular's anchor comments.
36
- *
37
- * @param el - The element, or undefined before the view resolves.
38
- * @returns True when the element renders content.
39
- */
40
- export const hasContent = (el) => {
41
- if (!el)
42
- return false;
43
- return Array.from(el.childNodes).some((node) => node.nodeType === Node.ELEMENT_NODE ||
44
- ((node.nodeType === Node.TEXT_NODE || node.nodeType === Node.CDATA_SECTION_NODE) &&
45
- (node.textContent ?? '').trim() !== ''));
46
- };
47
- /**
48
- * Keeps one template element in the DOM exactly while React renders it.
49
- *
50
- * React renders a wrapper element only when its content exists (the title row
51
- * when there is a title or an action, the actions cell when there are actions).
52
- * Angular has no way to select projected content, so each wrapper stays in the
53
- * template and this helper detaches it — projected content travels with it —
54
- * while React renders nothing, restoring it at the same position when content
55
- * appears.
56
- */
57
- export class ConditionalElement {
58
- renderer;
59
- detached = new Map();
60
- /**
61
- * Creates the helper.
62
- *
63
- * @param renderer - The DOM renderer.
64
- */
65
- constructor(renderer) {
66
- this.renderer = renderer;
67
- }
68
- /**
69
- * Shows or withholds one element.
70
- *
71
- * @param el - The element (undefined before the view resolves).
72
- * @param shouldShow - Whether React renders it.
73
- */
74
- sync(el, shouldShow) {
75
- if (!el)
76
- return;
77
- if (shouldShow) {
78
- const at = this.detached.get(el);
79
- if (!at)
80
- return;
81
- at.parent.insertBefore(el, at.anchor);
82
- this.detached.delete(el);
83
- return;
84
- }
85
- if (!el.isConnected)
86
- return;
87
- const parent = el.parentNode;
88
- if (!parent)
89
- return;
90
- this.detached.set(el, { parent, anchor: el.nextSibling });
91
- this.renderer.removeChild(parent, el);
92
- }
93
- }
94
32
  //# sourceMappingURL=slot-dom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slot-dom.js","sourceRoot":"","sources":["../src/slot-dom.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAc,EAAiC,EAAE,CAC1E,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK,KAAK,IAAI;IACd,OAAQ,KAA8B,CAAC,kBAAkB,KAAK,UAAU,CAAA;AAE1E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAc,EAA+B,EAAE,CACxE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;AAElC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAc,EAAU,EAAE,CAC/C,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAE5D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAA8B,EAAW,EAAE;IACpE,IAAI,CAAC,EAAE;QAAE,OAAO,KAAK,CAAA;IACrB,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,IAAI,CACnC,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;QACnC,CAAC,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,kBAAkB,CAAC;YAC9E,CAAC,IAAI,CAAC,W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AAK,IAAI;IACd,OAAQ,KAA8B,CAAC,kBAAkB,KAAK,UAAU,CAAA;AAE1E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAc,EAA+B,EAAE,CACxE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;AAElC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAc,EAAU,EAAE,CAC/C,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-data-table-ui-angular",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Card data table + table chrome primitives (toolbar, footer, row-with-actions, empty row) — standalone, renders its own table elements",
5
5
  "homepage": "https://www.molecule.dev/packages/app-data-table-ui-angular",
6
6
  "type": "module",
@@ -45,7 +45,7 @@
45
45
  "@angular/common": "^22.0.0",
46
46
  "@angular/core": "^22.0.0",
47
47
  "@angular/platform-browser": "^22.0.0",
48
- "@molecule/app-angular": "^3.5.0",
48
+ "@molecule/app-angular": "^3.13.0",
49
49
  "@molecule/app-ui": "^1.3.11",
50
50
  "@molecule/app-ui-angular": "^1.1.0"
51
51
  },
@@ -55,14 +55,14 @@
55
55
  "@angular/compiler-cli": "22.2.3",
56
56
  "@angular/core": "22.2.3",
57
57
  "@angular/platform-browser": "22.2.3",
58
- "@molecule/app-angular": "3.11.0",
58
+ "@molecule/app-angular": "3.13.0",
59
59
  "@molecule/app-framework-conformance": "0.0.0",
60
60
  "@molecule/app-i18n": "1.2.2",
61
61
  "@molecule/app-icons": "1.0.4",
62
62
  "@molecule/app-ui": "1.5.0",
63
- "@molecule/app-ui-angular": "1.4.0",
63
+ "@molecule/app-ui-angular": "1.5.1",
64
64
  "@types/node": "26.6.5",
65
- "jsdom": "30.1.3",
65
+ "jsdom": "31.0.1",
66
66
  "rxjs": "7.8.2",
67
67
  "typescript": "6.0.3",
68
68
  "vitest": "4.1.12",