@molecule/app-avatar-stack-angular 1.1.0 → 1.2.1
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 +78 -8
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +22 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/user-chip.component.d.ts +24 -4
- package/dist/user-chip.component.d.ts.map +1 -1
- package/dist/user-chip.component.js +123 -30
- package/dist/user-chip.component.js.map +1 -1
- package/package.json +5 -5
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-
|
|
6
|
+
Generated: 2026-11-19T16:16:48.854Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-avatar-stack-angular
|
|
@@ -39,6 +39,13 @@ import { AvatarStack, UserChip } from '@molecule/app-avatar-stack-angular'
|
|
|
39
39
|
<div mol-user-chip name="Alice Kim" src="/avatars/alice.jpg">
|
|
40
40
|
<span slot="subtitle">Admin</span>
|
|
41
41
|
</div>
|
|
42
|
+
<div
|
|
43
|
+
mol-user-chip
|
|
44
|
+
name="Alice Kim"
|
|
45
|
+
href="/people/alice"
|
|
46
|
+
data-person="alice"
|
|
47
|
+
[nameLinkProps]="{ className: 'person-name', target: '_blank', rel: 'noreferrer' }"
|
|
48
|
+
></div>
|
|
42
49
|
`,
|
|
43
50
|
})
|
|
44
51
|
export class Assignees {
|
|
@@ -110,6 +117,10 @@ so they are typed `unknown`: pass them in the host template, projected as
|
|
|
110
117
|
interface UserChipProps {
|
|
111
118
|
/** Display name. */
|
|
112
119
|
name: string
|
|
120
|
+
/** Profile destination. Only the displayed name becomes a link. */
|
|
121
|
+
href?: string
|
|
122
|
+
/** Attributes and events for the canonical name link. */
|
|
123
|
+
nameLinkProps?: UserChipNameLinkProps
|
|
113
124
|
/** Optional avatar image URL. */
|
|
114
125
|
src?: string
|
|
115
126
|
/** Optional secondary line (role / email / handle), projected as `[slot=subtitle]` content. */
|
|
@@ -244,21 +255,27 @@ no span at all for an absent or empty subtitle.
|
|
|
244
255
|
selector: 'div[mol-user-chip]',
|
|
245
256
|
standalone: true,
|
|
246
257
|
imports: [Avatar],
|
|
247
|
-
inputs: ['name', 'src', 'subtitle', 'trailing', 'size', 'className'],
|
|
258
|
+
inputs: ['name', 'href', 'nameLinkProps', 'src', 'subtitle', 'trailing', 'size', 'className'],
|
|
248
259
|
host: {
|
|
249
260
|
'[class]': 'classes()',
|
|
250
261
|
},
|
|
251
262
|
// prettier-ignore
|
|
252
|
-
template:
|
|
263
|
+
template: `@if (href === undefined) {<div mol-avatar [src]="src" [alt]="name" [name]="name" [size]="avatarSize()"></div>}
|
|
264
|
+
@else {<div aria-hidden="true"><div mol-avatar [src]="src" [alt]="name" [name]="name" [size]="avatarSize()"></div></div>}
|
|
253
265
|
<div [class]="bodyClasses()">
|
|
254
|
-
<span [class]="nameClasses()">{{ name }}</span>
|
|
266
|
+
@if (href === undefined) {<span [class]="nameClasses()">{{ name }}</span>}
|
|
267
|
+
@else {<a #nameLink data-mol-id="user-chip-profile" [href]="href" [class]="nameClasses(true)" [attr.style]="nameLinkStyle()">{{ name }}</a>}
|
|
255
268
|
@if (showSubtitle()) {<span #subtitleEl [class]="cm().textSize('xs')">@if (hasTextSubtitle()) {<ng-container>{{ subtitle }}</ng-container>}<ng-content select="[slot=subtitle]"></ng-content></span>}
|
|
256
269
|
</div>
|
|
257
270
|
<ng-content select="[slot=trailing]"></ng-content>`,
|
|
258
271
|
})
|
|
259
|
-
export class UserChip implements AfterViewInit {
|
|
272
|
+
export class UserChip implements AfterViewInit, AfterViewChecked, OnDestroy {
|
|
260
273
|
/** Display name. */
|
|
261
274
|
name = ''
|
|
275
|
+
/** Profile destination. The avatar stays outside the single name link. */
|
|
276
|
+
href?: string
|
|
277
|
+
/** Attributes, classes and event handlers for the canonical name link. */
|
|
278
|
+
nameLinkProps?: UserChipProps['nameLinkProps']
|
|
262
279
|
/** Optional avatar image URL. */
|
|
263
280
|
src?: string
|
|
264
281
|
/** Optional secondary line: text, or `[slot=subtitle]` content. */
|
|
@@ -273,6 +290,13 @@ export class UserChip implements AfterViewInit {
|
|
|
273
290
|
/** The optimistic subtitle span (projected content lands here). */
|
|
274
291
|
@ViewChild('subtitleEl') private subtitleEl?: ElementRef<HTMLSpanElement>
|
|
275
292
|
|
|
293
|
+
/** The name anchor, present only while href is defined. */
|
|
294
|
+
@ViewChild('nameLink') private nameLink?: ElementRef<HTMLAnchorElement>
|
|
295
|
+
|
|
296
|
+
private readonly renderer = inject(Renderer2)
|
|
297
|
+
private renderedNameLink?: HTMLAnchorElement
|
|
298
|
+
private nameLinkWriter?: ElementPropsWriter
|
|
299
|
+
|
|
276
300
|
/** Whether the subtitle span renders (withdrawn when nothing fills it). */
|
|
277
301
|
private readonly subtitleProjected = signal(true)
|
|
278
302
|
|
|
@@ -331,10 +355,48 @@ export class UserChip implements AfterViewInit {
|
|
|
331
355
|
/**
|
|
332
356
|
* Computes the name span's class list (`cm.textSize('sm')` +
|
|
333
357
|
* `cm.fontWeight('medium')`).
|
|
358
|
+
* @param linked - Whether to include the name-link classes.
|
|
334
359
|
* @returns The class string.
|
|
335
360
|
*/
|
|
336
|
-
nameClasses(): string {
|
|
337
|
-
return this.cm().cn(
|
|
361
|
+
nameClasses(linked = false): string {
|
|
362
|
+
return this.cm().cn(
|
|
363
|
+
this.cm().textSize('sm'),
|
|
364
|
+
this.cm().fontWeight('medium'),
|
|
365
|
+
linked && this.nameLinkProps?.className,
|
|
366
|
+
linked && this.nameLinkProps?.class,
|
|
367
|
+
)
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Serializes the link's inline style with the shared React-compatible utility.
|
|
372
|
+
* @returns The style attribute, or null when absent.
|
|
373
|
+
*/
|
|
374
|
+
nameLinkStyle(): string | null {
|
|
375
|
+
return styleText(this.nameLinkProps?.style)
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/** Applies the link attribute input to the anchor, including changes and removals. */
|
|
379
|
+
ngAfterViewChecked(): void {
|
|
380
|
+
const link = this.nameLink?.nativeElement
|
|
381
|
+
if (link !== this.renderedNameLink) {
|
|
382
|
+
this.nameLinkWriter?.destroy()
|
|
383
|
+
this.nameLinkWriter = undefined
|
|
384
|
+
this.renderedNameLink = link
|
|
385
|
+
}
|
|
386
|
+
if (!link) return
|
|
387
|
+
this.nameLinkWriter ??= new ElementPropsWriter(this.renderer, link)
|
|
388
|
+
// The profile id is the default: a caller's own `data-mol-id` wins, as
|
|
389
|
+
// React's spread order does.
|
|
390
|
+
this.nameLinkWriter.write(
|
|
391
|
+
{ 'data-mol-id': 'user-chip-profile', ...this.nameLinkProps },
|
|
392
|
+
OWNED_NAME_LINK_KEYS,
|
|
393
|
+
)
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/** Removes link listeners when the chip unmounts. */
|
|
397
|
+
ngOnDestroy(): void {
|
|
398
|
+
this.nameLinkWriter?.destroy()
|
|
399
|
+
this.nameLinkWriter = undefined
|
|
338
400
|
}
|
|
339
401
|
|
|
340
402
|
/**
|
|
@@ -363,7 +425,7 @@ Peer dependencies:
|
|
|
363
425
|
- `@angular/platform-browser` ^22.0.0
|
|
364
426
|
- `@molecule/app-angular` ^3.5.0
|
|
365
427
|
- `@molecule/app-ui` ^1.0.1
|
|
366
|
-
- `@molecule/app-ui-angular` ^1.
|
|
428
|
+
- `@molecule/app-ui-angular` ^1.3.0
|
|
367
429
|
|
|
368
430
|
### Runtime Dependencies
|
|
369
431
|
|
|
@@ -374,6 +436,14 @@ Peer dependencies:
|
|
|
374
436
|
- `@molecule/app-ui`
|
|
375
437
|
- `@molecule/app-ui-angular`
|
|
376
438
|
|
|
439
|
+
`UserChip` with `href` renders one profile link on the displayed name, with
|
|
440
|
+
a decorative avatar outside it. Subtitle and trailing projections remain outside
|
|
441
|
+
the link. The `nameLinkProps` input forwards anchor attributes and events
|
|
442
|
+
(including `onClick` for app routing); `className` or `class` adds link classes.
|
|
443
|
+
The host div is the root: bind ordinary attributes and events directly on it.
|
|
444
|
+
Without `href`, the plain avatar/name DOM is unchanged and `nameLinkProps`
|
|
445
|
+
is ignored. An empty-string `href` still renders a link.
|
|
446
|
+
|
|
377
447
|
The overflow chip announces "+N more" — this is the only user-visible
|
|
378
448
|
text (currently English-only). Avatar fallbacks (initials, color hash)
|
|
379
449
|
come from `<div mol-avatar>` in `@molecule/app-ui-angular`. The overlap is
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
* <div mol-user-chip name="Alice Kim" src="/avatars/alice.jpg">
|
|
25
25
|
* <span slot="subtitle">Admin</span>
|
|
26
26
|
* </div>
|
|
27
|
+
* <div mol-user-chip name="Alice Kim" href="/people/alice" data-person="alice"
|
|
28
|
+
* [nameLinkProps]="{ className: 'person-name', target: '_blank', rel: 'noreferrer' }">
|
|
29
|
+
* </div>
|
|
27
30
|
* `,
|
|
28
31
|
* })
|
|
29
32
|
* export class Assignees {
|
|
@@ -36,6 +39,14 @@
|
|
|
36
39
|
* ```
|
|
37
40
|
*
|
|
38
41
|
* @remarks
|
|
42
|
+
* `UserChip` with `href` renders one profile link on the displayed name, with
|
|
43
|
+
* a decorative avatar outside it. Subtitle and trailing projections remain outside
|
|
44
|
+
* the link. The `nameLinkProps` input forwards anchor attributes and events
|
|
45
|
+
* (including `onClick` for app routing); `className` or `class` adds link classes.
|
|
46
|
+
* The host div is the root: bind ordinary attributes and events directly on it.
|
|
47
|
+
* Without `href`, the plain avatar/name DOM is unchanged and `nameLinkProps`
|
|
48
|
+
* is ignored. An empty-string `href` still renders a link.
|
|
49
|
+
*
|
|
39
50
|
* The overflow chip announces "+N more" — this is the only user-visible
|
|
40
51
|
* text (currently English-only). Avatar fallbacks (initials, color hash)
|
|
41
52
|
* come from `<div mol-avatar>` in `@molecule/app-ui-angular`. The overlap is
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH,cAAc,6BAA6B,CAAA;AAC3C,cAAc,YAAY,CAAA;AAC1B,cAAc,0BAA0B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
* <div mol-user-chip name="Alice Kim" src="/avatars/alice.jpg">
|
|
25
25
|
* <span slot="subtitle">Admin</span>
|
|
26
26
|
* </div>
|
|
27
|
+
* <div mol-user-chip name="Alice Kim" href="/people/alice" data-person="alice"
|
|
28
|
+
* [nameLinkProps]="{ className: 'person-name', target: '_blank', rel: 'noreferrer' }">
|
|
29
|
+
* </div>
|
|
27
30
|
* `,
|
|
28
31
|
* })
|
|
29
32
|
* export class Assignees {
|
|
@@ -36,6 +39,14 @@
|
|
|
36
39
|
* ```
|
|
37
40
|
*
|
|
38
41
|
* @remarks
|
|
42
|
+
* `UserChip` with `href` renders one profile link on the displayed name, with
|
|
43
|
+
* a decorative avatar outside it. Subtitle and trailing projections remain outside
|
|
44
|
+
* the link. The `nameLinkProps` input forwards anchor attributes and events
|
|
45
|
+
* (including `onClick` for app routing); `className` or `class` adds link classes.
|
|
46
|
+
* The host div is the root: bind ordinary attributes and events directly on it.
|
|
47
|
+
* Without `href`, the plain avatar/name DOM is unchanged and `nameLinkProps`
|
|
48
|
+
* is ignored. An empty-string `href` still renders a link.
|
|
49
|
+
*
|
|
39
50
|
* The overflow chip announces "+N more" — this is the only user-visible
|
|
40
51
|
* text (currently English-only). Avatar fallbacks (initials, color hash)
|
|
41
52
|
* come from `<div mol-avatar>` in `@molecule/app-ui-angular`. The overlap is
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH,cAAc,6BAA6B,CAAA;AAC3C,cAAc,YAAY,CAAA;AAC1B,cAAc,0BAA0B,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -28,6 +28,23 @@ export interface AvatarStackProps {
|
|
|
28
28
|
/** Extra classes on the outer stack. */
|
|
29
29
|
className?: string;
|
|
30
30
|
}
|
|
31
|
+
/** Attributes for the canonical UserChip name link; other native attributes are accepted by name. */
|
|
32
|
+
interface UserChipNameLinkProps {
|
|
33
|
+
/** Extra name-link classes. */
|
|
34
|
+
className?: string;
|
|
35
|
+
/** Extra name-link classes (the native HTML spelling). */
|
|
36
|
+
class?: string;
|
|
37
|
+
/** Browsing context for the profile destination. */
|
|
38
|
+
target?: string;
|
|
39
|
+
/** Relationship to the profile destination. */
|
|
40
|
+
rel?: string;
|
|
41
|
+
/** App router or click handler; receives the native link event. */
|
|
42
|
+
onClick?: (event: MouseEvent) => void;
|
|
43
|
+
/** React-style inline style values. */
|
|
44
|
+
style?: Record<string, string | number | undefined | null>;
|
|
45
|
+
/** Additional native attributes and event handlers, using `onClick`-style event names. */
|
|
46
|
+
[attribute: string]: unknown;
|
|
47
|
+
}
|
|
31
48
|
/**
|
|
32
49
|
* Props accepted by {@link UserChip} — the same props
|
|
33
50
|
* `@molecule/app-avatar-stack-react` accepts. Node props (`subtitle`,
|
|
@@ -38,6 +55,10 @@ export interface AvatarStackProps {
|
|
|
38
55
|
export interface UserChipProps {
|
|
39
56
|
/** Display name. */
|
|
40
57
|
name: string;
|
|
58
|
+
/** Profile destination. Only the displayed name becomes a link. */
|
|
59
|
+
href?: string;
|
|
60
|
+
/** Attributes and events for the canonical name link. */
|
|
61
|
+
nameLinkProps?: UserChipNameLinkProps;
|
|
41
62
|
/** Optional avatar image URL. */
|
|
42
63
|
src?: string;
|
|
43
64
|
/** Optional secondary line (role / email / handle), projected as `[slot=subtitle]` content. */
|
|
@@ -49,4 +70,5 @@ export interface UserChipProps {
|
|
|
49
70
|
/** Extra classes on the outer row. */
|
|
50
71
|
className?: string;
|
|
51
72
|
}
|
|
73
|
+
export {};
|
|
52
74
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,8CAA8C;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wBAAwB;IACxB,MAAM,EAAE,iBAAiB,EAAE,CAAA;IAC3B,+EAA+E;IAC/E,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,0BAA0B;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAChC,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IAC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AAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,CAAA;IAC1D,0FAA0F;IAC1F,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAA;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,aAAa,CAAC,EAAE,qBAAqB,CAAA;IACrC,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAChC,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { type AfterViewInit } from '@angular/core';
|
|
6
|
+
import { type AfterViewChecked, type AfterViewInit, type OnDestroy } from '@angular/core';
|
|
7
7
|
import type { UIClassMap } from '@molecule/app-ui';
|
|
8
|
+
import type { UserChipProps } from './types.js';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* UserChip component.
|
|
@@ -18,9 +19,13 @@ import * as i0 from "@angular/core";
|
|
|
18
19
|
* init when neither a text input nor a projection is present — React renders
|
|
19
20
|
* no span at all for an absent or empty subtitle.
|
|
20
21
|
*/
|
|
21
|
-
export declare class UserChip implements AfterViewInit {
|
|
22
|
+
export declare class UserChip implements AfterViewInit, AfterViewChecked, OnDestroy {
|
|
22
23
|
/** Display name. */
|
|
23
24
|
name: string;
|
|
25
|
+
/** Profile destination. The avatar stays outside the single name link. */
|
|
26
|
+
href?: string;
|
|
27
|
+
/** Attributes, classes and event handlers for the canonical name link. */
|
|
28
|
+
nameLinkProps?: UserChipProps['nameLinkProps'];
|
|
24
29
|
/** Optional avatar image URL. */
|
|
25
30
|
src?: string;
|
|
26
31
|
/** Optional secondary line: text, or `[slot=subtitle]` content. */
|
|
@@ -33,6 +38,11 @@ export declare class UserChip implements AfterViewInit {
|
|
|
33
38
|
className?: string;
|
|
34
39
|
/** The optimistic subtitle span (projected content lands here). */
|
|
35
40
|
private subtitleEl?;
|
|
41
|
+
/** The name anchor, present only while href is defined. */
|
|
42
|
+
private nameLink?;
|
|
43
|
+
private readonly renderer;
|
|
44
|
+
private renderedNameLink?;
|
|
45
|
+
private nameLinkWriter?;
|
|
36
46
|
/** Whether the subtitle span renders (withdrawn when nothing fills it). */
|
|
37
47
|
private readonly subtitleProjected;
|
|
38
48
|
/**
|
|
@@ -72,9 +82,19 @@ export declare class UserChip implements AfterViewInit {
|
|
|
72
82
|
/**
|
|
73
83
|
* Computes the name span's class list (`cm.textSize('sm')` +
|
|
74
84
|
* `cm.fontWeight('medium')`).
|
|
85
|
+
* @param linked - Whether to include the name-link classes.
|
|
75
86
|
* @returns The class string.
|
|
76
87
|
*/
|
|
77
|
-
nameClasses(): string;
|
|
88
|
+
nameClasses(linked?: boolean): string;
|
|
89
|
+
/**
|
|
90
|
+
* Serializes the link's inline style with the shared React-compatible utility.
|
|
91
|
+
* @returns The style attribute, or null when absent.
|
|
92
|
+
*/
|
|
93
|
+
nameLinkStyle(): string | null;
|
|
94
|
+
/** Applies the link attribute input to the anchor, including changes and removals. */
|
|
95
|
+
ngAfterViewChecked(): void;
|
|
96
|
+
/** Removes link listeners when the chip unmounts. */
|
|
97
|
+
ngOnDestroy(): void;
|
|
78
98
|
/**
|
|
79
99
|
* Withdraws the optimistic subtitle span when its slot projection did not
|
|
80
100
|
* land: when neither a text input nor projected content is present, React
|
|
@@ -83,6 +103,6 @@ export declare class UserChip implements AfterViewInit {
|
|
|
83
103
|
*/
|
|
84
104
|
ngAfterViewInit(): void;
|
|
85
105
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserChip, never>;
|
|
86
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UserChip, "div[mol-user-chip]", never, { "name": { "alias": "name"; "required": false; }; "src": { "alias": "src"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "trailing": { "alias": "trailing"; "required": false; }; "size": { "alias": "size"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["[slot=subtitle]", "[slot=trailing]"], true, never>;
|
|
106
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserChip, "div[mol-user-chip]", never, { "name": { "alias": "name"; "required": false; }; "href": { "alias": "href"; "required": false; }; "nameLinkProps": { "alias": "nameLinkProps"; "required": false; }; "src": { "alias": "src"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "trailing": { "alias": "trailing"; "required": false; }; "size": { "alias": "size"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["[slot=subtitle]", "[slot=trailing]"], true, never>;
|
|
87
107
|
}
|
|
88
108
|
//# sourceMappingURL=user-chip.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-chip.component.d.ts","sourceRoot":"","sources":["../src/user-chip.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"user-chip.component.d.ts","sourceRoot":"","sources":["../src/user-chip.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAIlB,KAAK,SAAS,EAIf,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAIlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;;AAkB/C;;;;;;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I;IAiB1B,qDAAqD;IACrD,WAAW,IAAI,IAAI;IAKnB;;;;;OAKG;IACH,eAAe,IAAI,IAAI;yCAxIZ,QAAQ;2CAAR,QAAQ;CA8IpB"}
|
|
@@ -3,14 +3,52 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { Component, signal, ViewChild } from '@angular/core';
|
|
6
|
+
import { Component, inject, Renderer2, signal, ViewChild, } from '@angular/core';
|
|
7
7
|
import { getClassMap } from '@molecule/app-ui';
|
|
8
|
-
import { Avatar, hasNodes } from '@molecule/app-ui-angular';
|
|
8
|
+
import { Avatar, ElementPropsWriter, hasNodes, styleText } from '@molecule/app-ui-angular';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
const _c0 = ["subtitleEl"];
|
|
11
|
-
const _c1 = [
|
|
12
|
-
const _c2 = ["
|
|
13
|
-
|
|
11
|
+
const _c1 = ["nameLink"];
|
|
12
|
+
const _c2 = [[["", "slot", "trailing"]], [["", "slot", "subtitle"]]];
|
|
13
|
+
const _c3 = ["[slot=trailing]", "[slot=subtitle]"];
|
|
14
|
+
function UserChip_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
15
|
+
i0.ɵɵelement(0, "div", 2);
|
|
16
|
+
} if (rf & 2) {
|
|
17
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
18
|
+
i0.ɵɵproperty("src", ctx_r0.src)("alt", ctx_r0.name)("name", ctx_r0.name)("size", ctx_r0.avatarSize());
|
|
19
|
+
} }
|
|
20
|
+
function UserChip_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
22
|
+
i0.ɵɵelement(1, "div", 2);
|
|
23
|
+
i0.ɵɵelementEnd();
|
|
24
|
+
} if (rf & 2) {
|
|
25
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
26
|
+
i0.ɵɵadvance();
|
|
27
|
+
i0.ɵɵproperty("src", ctx_r0.src)("alt", ctx_r0.name)("name", ctx_r0.name)("size", ctx_r0.avatarSize());
|
|
28
|
+
} }
|
|
29
|
+
function UserChip_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
+
i0.ɵɵelementStart(0, "span");
|
|
31
|
+
i0.ɵɵtext(1);
|
|
32
|
+
i0.ɵɵelementEnd();
|
|
33
|
+
} if (rf & 2) {
|
|
34
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
35
|
+
i0.ɵɵclassMap(ctx_r0.nameClasses());
|
|
36
|
+
i0.ɵɵadvance();
|
|
37
|
+
i0.ɵɵtextInterpolate(ctx_r0.name);
|
|
38
|
+
} }
|
|
39
|
+
function UserChip_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
40
|
+
i0.ɵɵelementStart(0, "a", 6, 0);
|
|
41
|
+
i0.ɵɵtext(2);
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
43
|
+
} if (rf & 2) {
|
|
44
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
45
|
+
i0.ɵɵclassMap(ctx_r0.nameClasses(true));
|
|
46
|
+
i0.ɵɵproperty("href", ctx_r0.href, i0.ɵɵsanitizeUrl);
|
|
47
|
+
i0.ɵɵattribute("style", ctx_r0.nameLinkStyle(), i0.ɵɵsanitizeStyle);
|
|
48
|
+
i0.ɵɵadvance(2);
|
|
49
|
+
i0.ɵɵtextInterpolate(ctx_r0.name);
|
|
50
|
+
} }
|
|
51
|
+
function UserChip_Conditional_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
14
52
|
i0.ɵɵelementContainerStart(0);
|
|
15
53
|
i0.ɵɵtext(1);
|
|
16
54
|
i0.ɵɵelementContainerEnd();
|
|
@@ -19,9 +57,9 @@ function UserChip_Conditional_4_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
19
57
|
i0.ɵɵadvance();
|
|
20
58
|
i0.ɵɵtextInterpolate(ctx_r0.subtitle);
|
|
21
59
|
} }
|
|
22
|
-
function
|
|
23
|
-
i0.ɵɵelementStart(0, "span", null,
|
|
24
|
-
i0.ɵɵconditionalCreate(2,
|
|
60
|
+
function UserChip_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
i0.ɵɵelementStart(0, "span", null, 1);
|
|
62
|
+
i0.ɵɵconditionalCreate(2, UserChip_Conditional_5_Conditional_2_Template, 2, 1, "ng-container");
|
|
25
63
|
i0.ɵɵprojection(3, 1);
|
|
26
64
|
i0.ɵɵelementEnd();
|
|
27
65
|
} if (rf & 2) {
|
|
@@ -30,6 +68,21 @@ function UserChip_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
30
68
|
i0.ɵɵadvance(2);
|
|
31
69
|
i0.ɵɵconditional(ctx_r0.hasTextSubtitle() ? 2 : -1);
|
|
32
70
|
} }
|
|
71
|
+
/**
|
|
72
|
+
* `nameLinkProps` keys the template owns: `href` is the input, `className` /
|
|
73
|
+
* `class` are composed into the template's `[class]` binding, the style is
|
|
74
|
+
* serialized by `nameLinkStyle()`, and the rest cannot replace the name or the
|
|
75
|
+
* profile `data-mol-id`.
|
|
76
|
+
*/
|
|
77
|
+
const OWNED_NAME_LINK_KEYS = new Set([
|
|
78
|
+
'className',
|
|
79
|
+
'class',
|
|
80
|
+
'href',
|
|
81
|
+
'children',
|
|
82
|
+
'innerHTML',
|
|
83
|
+
'textContent',
|
|
84
|
+
'style',
|
|
85
|
+
]);
|
|
33
86
|
/**
|
|
34
87
|
* UserChip component.
|
|
35
88
|
*
|
|
@@ -45,6 +98,10 @@ function UserChip_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
45
98
|
export class UserChip {
|
|
46
99
|
/** Display name. */
|
|
47
100
|
name = '';
|
|
101
|
+
/** Profile destination. The avatar stays outside the single name link. */
|
|
102
|
+
href;
|
|
103
|
+
/** Attributes, classes and event handlers for the canonical name link. */
|
|
104
|
+
nameLinkProps;
|
|
48
105
|
/** Optional avatar image URL. */
|
|
49
106
|
src;
|
|
50
107
|
/** Optional secondary line: text, or `[slot=subtitle]` content. */
|
|
@@ -57,6 +114,11 @@ export class UserChip {
|
|
|
57
114
|
className;
|
|
58
115
|
/** The optimistic subtitle span (projected content lands here). */
|
|
59
116
|
subtitleEl;
|
|
117
|
+
/** The name anchor, present only while href is defined. */
|
|
118
|
+
nameLink;
|
|
119
|
+
renderer = inject(Renderer2);
|
|
120
|
+
renderedNameLink;
|
|
121
|
+
nameLinkWriter;
|
|
60
122
|
/** Whether the subtitle span renders (withdrawn when nothing fills it). */
|
|
61
123
|
subtitleProjected = signal(true, /* @ts-ignore */
|
|
62
124
|
...(ngDevMode ? [{ debugName: "subtitleProjected" }] : /* istanbul ignore next */ []));
|
|
@@ -109,10 +171,38 @@ export class UserChip {
|
|
|
109
171
|
/**
|
|
110
172
|
* Computes the name span's class list (`cm.textSize('sm')` +
|
|
111
173
|
* `cm.fontWeight('medium')`).
|
|
174
|
+
* @param linked - Whether to include the name-link classes.
|
|
112
175
|
* @returns The class string.
|
|
113
176
|
*/
|
|
114
|
-
nameClasses() {
|
|
115
|
-
return this.cm().cn(this.cm().textSize('sm'), this.cm().fontWeight('medium'));
|
|
177
|
+
nameClasses(linked = false) {
|
|
178
|
+
return this.cm().cn(this.cm().textSize('sm'), this.cm().fontWeight('medium'), linked && this.nameLinkProps?.className, linked && this.nameLinkProps?.class);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Serializes the link's inline style with the shared React-compatible utility.
|
|
182
|
+
* @returns The style attribute, or null when absent.
|
|
183
|
+
*/
|
|
184
|
+
nameLinkStyle() {
|
|
185
|
+
return styleText(this.nameLinkProps?.style);
|
|
186
|
+
}
|
|
187
|
+
/** Applies the link attribute input to the anchor, including changes and removals. */
|
|
188
|
+
ngAfterViewChecked() {
|
|
189
|
+
const link = this.nameLink?.nativeElement;
|
|
190
|
+
if (link !== this.renderedNameLink) {
|
|
191
|
+
this.nameLinkWriter?.destroy();
|
|
192
|
+
this.nameLinkWriter = undefined;
|
|
193
|
+
this.renderedNameLink = link;
|
|
194
|
+
}
|
|
195
|
+
if (!link)
|
|
196
|
+
return;
|
|
197
|
+
this.nameLinkWriter ??= new ElementPropsWriter(this.renderer, link);
|
|
198
|
+
// The profile id is the default: a caller's own `data-mol-id` wins, as
|
|
199
|
+
// React's spread order does.
|
|
200
|
+
this.nameLinkWriter.write({ 'data-mol-id': 'user-chip-profile', ...this.nameLinkProps }, OWNED_NAME_LINK_KEYS);
|
|
201
|
+
}
|
|
202
|
+
/** Removes link listeners when the chip unmounts. */
|
|
203
|
+
ngOnDestroy() {
|
|
204
|
+
this.nameLinkWriter?.destroy();
|
|
205
|
+
this.nameLinkWriter = undefined;
|
|
116
206
|
}
|
|
117
207
|
/**
|
|
118
208
|
* Withdraws the optimistic subtitle span when its slot projection did not
|
|
@@ -128,31 +218,29 @@ export class UserChip {
|
|
|
128
218
|
}
|
|
129
219
|
static ɵfac = function UserChip_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserChip)(); };
|
|
130
220
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserChip, selectors: [["div", "mol-user-chip", ""]], viewQuery: function UserChip_Query(rf, ctx) { if (rf & 1) {
|
|
131
|
-
i0.ɵɵviewQuery(_c0, 5);
|
|
221
|
+
i0.ɵɵviewQuery(_c0, 5)(_c1, 5);
|
|
132
222
|
} if (rf & 2) {
|
|
133
223
|
let _t;
|
|
134
224
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subtitleEl = _t.first);
|
|
225
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.nameLink = _t.first);
|
|
135
226
|
} }, hostVars: 2, hostBindings: function UserChip_HostBindings(rf, ctx) { if (rf & 2) {
|
|
136
227
|
i0.ɵɵclassMap(ctx.classes());
|
|
137
|
-
} }, inputs: { name: "name", src: "src", subtitle: "subtitle", trailing: "trailing", size: "size", className: "className" }, ngContentSelectors:
|
|
138
|
-
i0.ɵɵprojectionDef(
|
|
139
|
-
i0.ɵɵ
|
|
140
|
-
i0.ɵɵelementStart(
|
|
141
|
-
i0.ɵɵ
|
|
142
|
-
i0.ɵɵ
|
|
143
|
-
i0.ɵɵconditionalCreate(4, UserChip_Conditional_4_Template, 4, 3, "span", 2);
|
|
228
|
+
} }, inputs: { name: "name", href: "href", nameLinkProps: "nameLinkProps", src: "src", subtitle: "subtitle", trailing: "trailing", size: "size", className: "className" }, ngContentSelectors: _c3, decls: 7, vars: 5, consts: [["nameLink", ""], ["subtitleEl", ""], ["mol-avatar", "", 3, "src", "alt", "name", "size"], ["aria-hidden", "true"], [3, "class"], ["data-mol-id", "user-chip-profile", 3, "href", "class"], ["data-mol-id", "user-chip-profile", 3, "href"]], template: function UserChip_Template(rf, ctx) { if (rf & 1) {
|
|
229
|
+
i0.ɵɵprojectionDef(_c2);
|
|
230
|
+
i0.ɵɵconditionalCreate(0, UserChip_Conditional_0_Template, 1, 4, "div", 2)(1, UserChip_Conditional_1_Template, 2, 4, "div", 3);
|
|
231
|
+
i0.ɵɵelementStart(2, "div");
|
|
232
|
+
i0.ɵɵconditionalCreate(3, UserChip_Conditional_3_Template, 2, 3, "span", 4)(4, UserChip_Conditional_4_Template, 3, 5, "a", 5);
|
|
233
|
+
i0.ɵɵconditionalCreate(5, UserChip_Conditional_5_Template, 4, 3, "span", 4);
|
|
144
234
|
i0.ɵɵelementEnd();
|
|
145
|
-
i0.ɵɵprojection(
|
|
235
|
+
i0.ɵɵprojection(6);
|
|
146
236
|
} if (rf & 2) {
|
|
147
|
-
i0.ɵɵ
|
|
148
|
-
i0.ɵɵadvance();
|
|
237
|
+
i0.ɵɵconditional(ctx.href === undefined ? 0 : 1);
|
|
238
|
+
i0.ɵɵadvance(2);
|
|
149
239
|
i0.ɵɵclassMap(ctx.bodyClasses());
|
|
150
240
|
i0.ɵɵadvance();
|
|
151
|
-
i0.ɵɵ
|
|
152
|
-
i0.ɵɵadvance();
|
|
153
|
-
i0.ɵɵ
|
|
154
|
-
i0.ɵɵadvance();
|
|
155
|
-
i0.ɵɵconditional(ctx.showSubtitle() ? 4 : -1);
|
|
241
|
+
i0.ɵɵconditional(ctx.href === undefined ? 3 : 4);
|
|
242
|
+
i0.ɵɵadvance(2);
|
|
243
|
+
i0.ɵɵconditional(ctx.showSubtitle() ? 5 : -1);
|
|
156
244
|
} }, dependencies: [Avatar], encapsulation: 2 });
|
|
157
245
|
}
|
|
158
246
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserChip, [{
|
|
@@ -161,14 +249,16 @@ export class UserChip {
|
|
|
161
249
|
selector: 'div[mol-user-chip]',
|
|
162
250
|
standalone: true,
|
|
163
251
|
imports: [Avatar],
|
|
164
|
-
inputs: ['name', 'src', 'subtitle', 'trailing', 'size', 'className'],
|
|
252
|
+
inputs: ['name', 'href', 'nameLinkProps', 'src', 'subtitle', 'trailing', 'size', 'className'],
|
|
165
253
|
host: {
|
|
166
254
|
'[class]': 'classes()',
|
|
167
255
|
},
|
|
168
256
|
// prettier-ignore
|
|
169
|
-
template:
|
|
257
|
+
template: `@if (href === undefined) {<div mol-avatar [src]="src" [alt]="name" [name]="name" [size]="avatarSize()"></div>}
|
|
258
|
+
@else {<div aria-hidden="true"><div mol-avatar [src]="src" [alt]="name" [name]="name" [size]="avatarSize()"></div></div>}
|
|
170
259
|
<div [class]="bodyClasses()">
|
|
171
|
-
<span [class]="nameClasses()">{{ name }}</span>
|
|
260
|
+
@if (href === undefined) {<span [class]="nameClasses()">{{ name }}</span>}
|
|
261
|
+
@else {<a #nameLink data-mol-id="user-chip-profile" [href]="href" [class]="nameClasses(true)" [attr.style]="nameLinkStyle()">{{ name }}</a>}
|
|
172
262
|
@if (showSubtitle()) {<span #subtitleEl [class]="cm().textSize('xs')">@if (hasTextSubtitle()) {<ng-container>{{ subtitle }}</ng-container>}<ng-content select="[slot=subtitle]"></ng-content></span>}
|
|
173
263
|
</div>
|
|
174
264
|
<ng-content select="[slot=trailing]"></ng-content>`,
|
|
@@ -176,6 +266,9 @@ export class UserChip {
|
|
|
176
266
|
}], null, { subtitleEl: [{
|
|
177
267
|
type: ViewChild,
|
|
178
268
|
args: ['subtitleEl']
|
|
269
|
+
}], nameLink: [{
|
|
270
|
+
type: ViewChild,
|
|
271
|
+
args: ['nameLink']
|
|
179
272
|
}] }); })();
|
|
180
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserChip, { className: "UserChip", filePath: "user-chip.component.ts", lineNumber:
|
|
273
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserChip, { className: "UserChip", filePath: "user-chip.component.ts", lineNumber: 71 }); })();
|
|
181
274
|
//# sourceMappingURL=user-chip.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-chip.component.js","sourceRoot":"","sources":["../src/user-chip.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"user-chip.component.js","sourceRoot":"","sources":["../src/user-chip.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,SAAS,EAET,MAAM,EAEN,SAAS,EACT,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;;;;;;;IAyCnD,yBAAmF;;;IAA5B,AAAd,AAAb,AAAZ,gCAAW,oBAAa,qBAAc,6BAAsB;;;IACxG,8BAAwB;IAAA,yBAAmF;IAAA,iBAAM;;;IAAzE,cAAW;IAA4B,AAAd,AAAb,AAAZ,gCAAW,oBAAa,qBAAc,6BAAsB;;;IAE/E,4BAA8B;IAAA,YAAU;IAAA,iBAAO;;;IAAzC,mCAA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AAE,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC;gBAC7F,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,kBAAkB;gBAClB,QAAQ,EAAE;;;;;;;uDAO2C;aACtD;;kBAoBE,SAAS;mBAAC,YAAY;;kBAGtB,SAAS;mBAAC,UAAU;;kFAtBV,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-avatar-stack-angular",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Angular stacked avatars and user-chip component",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-avatar-stack-angular",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@angular/platform-browser": "^22.0.0",
|
|
48
48
|
"@molecule/app-angular": "^3.5.0",
|
|
49
49
|
"@molecule/app-ui": "^1.0.1",
|
|
50
|
-
"@molecule/app-ui-angular": "^1.
|
|
50
|
+
"@molecule/app-ui-angular": "^1.3.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@angular/common": "22.2.3",
|
|
@@ -55,12 +55,12 @@
|
|
|
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.
|
|
58
|
+
"@molecule/app-angular": "3.8.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
|
-
"@molecule/app-ui": "1.
|
|
63
|
-
"@molecule/app-ui-angular": "1.
|
|
62
|
+
"@molecule/app-ui": "1.5.0",
|
|
63
|
+
"@molecule/app-ui-angular": "1.3.0",
|
|
64
64
|
"@types/node": "26.6.5",
|
|
65
65
|
"jsdom": "30.1.3",
|
|
66
66
|
"rxjs": "7.8.2",
|