@agorapulse/ui-components 18.0.23 → 18.0.24
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/agorapulse-ui-components-18.0.24.tgz +0 -0
- package/esm2022/media-display-overlay/media-display-overlay-dialog.component.mjs +3 -3
- package/esm2022/nav-selector/nav-selector-category/nav-selector-category.component.mjs +40 -6
- package/esm2022/nav-selector/nav-selector-group/nav-selector-group.component.mjs +21 -14
- package/esm2022/nav-selector/nav-selector-leaf/nav-selector-leaf.component.mjs +46 -20
- package/esm2022/nav-selector/nav-selector-leaf/nav-selector-leaf.presenter.mjs +4 -1
- package/esm2022/nav-selector/nav-selector-leaf-detail/nav-selector-leaf-detail.component.mjs +5 -3
- package/esm2022/nav-selector/nav-selector-leaf-detail/nav-selector-leaf-detail.presenter.mjs +4 -2
- package/esm2022/nav-selector/nav-selector-popover/nav-selector-popover-item.component.mjs +39 -10
- package/esm2022/nav-selector/nav-selector-popover/nav-selector-popover.component.mjs +3 -4
- package/esm2022/nav-selector/nav-selector.component.mjs +20 -7
- package/esm2022/nav-selector/nav-selector.mjs +1 -1
- package/esm2022/nav-selector/nav-selector.state.mjs +17 -5
- package/esm2022/nav-selector/public_api.mjs +2 -1
- package/esm2022/nav-selector/utils/nav-selector.builder.mjs +6 -3
- package/esm2022/nav-selector/utils/nav-selector.folding.mjs +106 -46
- package/esm2022/nav-selector/utils/nav-selector.minifying.mjs +6 -2
- package/esm2022/popmenu/popmenu.directive.mjs +1 -1
- package/esm2022/select/dropdown-item-multiple-one-line/dropdown-item-multiple-one-line.component.mjs +2 -2
- package/esm2022/select/dropdown-item-multiple-two-lines/dropdown-item-multiple-two-lines.component.mjs +2 -2
- package/esm2022/select/dropdown-search-form/dropdown-search-form.component.mjs +2 -4
- package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +503 -310
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-popmenu.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-select.mjs +3 -5
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/nav-selector/nav-selector-category/nav-selector-category.component.d.ts +10 -0
- package/nav-selector/nav-selector-group/nav-selector-group.component.d.ts +1 -0
- package/nav-selector/nav-selector-leaf/nav-selector-leaf.component.d.ts +5 -1
- package/nav-selector/nav-selector-leaf/nav-selector-leaf.presenter.d.ts +2 -1
- package/nav-selector/nav-selector-popover/nav-selector-popover-item.component.d.ts +7 -2
- package/nav-selector/nav-selector.component.d.ts +1 -0
- package/nav-selector/nav-selector.d.ts +2 -0
- package/nav-selector/nav-selector.state.d.ts +2 -0
- package/nav-selector/public_api.d.ts +1 -0
- package/nav-selector/utils/nav-selector.folding.d.ts +32 -9
- package/package.json +1 -1
- package/popmenu/popmenu.directive.d.ts +6 -4
- package/select/dropdown-item-multiple-one-line/dropdown-item-multiple-one-line.component.d.ts +1 -1
- package/select/dropdown-item-multiple-two-lines/dropdown-item-multiple-two-lines.component.d.ts +1 -1
- package/agorapulse-ui-components-18.0.23.tgz +0 -0
|
@@ -1,18 +1,63 @@
|
|
|
1
|
+
import * as i1 from '@agorapulse/ui-components/directives';
|
|
2
|
+
import { BaseButtonDirective } from '@agorapulse/ui-components/directives';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { input, inject, Component, afterRender, Directive, effect, untracked, signal, computed, Injectable, ChangeDetectionStrategy, contentChildren, viewChild, afterNextRender, model, contentChild, output } from '@angular/core';
|
|
1
5
|
import { IconButtonComponent } from '@agorapulse/ui-components/icon-button';
|
|
2
6
|
import { InputSearchComponent } from '@agorapulse/ui-components/input-search';
|
|
3
7
|
import { SymbolComponent, withSymbols, apErrorFill, apFeatureLock, apChevronDown, apChevronUp, apFolder, apArrowExpand, apArrowReduce, apSearch } from '@agorapulse/ui-symbol';
|
|
4
8
|
import { trigger, state, transition, style, animate, keyframes } from '@angular/animations';
|
|
5
9
|
import { NgTemplateOutlet } from '@angular/common';
|
|
6
|
-
import * as i0 from '@angular/core';
|
|
7
|
-
import { input, afterRender, Directive, effect, untracked, signal, computed, Injectable, ChangeDetectionStrategy, Component, HostBinding, contentChildren, viewChild, afterNextRender, model, contentChild, output } from '@angular/core';
|
|
8
10
|
import * as i2 from '@angular/forms';
|
|
9
11
|
import { FormsModule } from '@angular/forms';
|
|
12
|
+
import { TooltipDirective } from '@agorapulse/ui-components/tooltip';
|
|
10
13
|
import { AvatarComponent } from '@agorapulse/ui-components/avatar';
|
|
11
14
|
import { CheckboxComponent } from '@agorapulse/ui-components/checkbox';
|
|
12
15
|
import { CounterComponent } from '@agorapulse/ui-components/counter';
|
|
13
|
-
import { TooltipDirective } from '@agorapulse/ui-components/tooltip';
|
|
14
16
|
import { apMore } from '@agorapulse/ui-symbol/icons';
|
|
15
17
|
|
|
18
|
+
class NavSelectorPopoverItemComponent {
|
|
19
|
+
selected = input(false);
|
|
20
|
+
disabled = input(false);
|
|
21
|
+
name = input.required();
|
|
22
|
+
ariaLabel = input(undefined);
|
|
23
|
+
baseButtonDirective = inject(BaseButtonDirective, { self: true });
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.9", type: NavSelectorPopoverItemComponent, isStandalone: true, selector: "ap-nav-selector-popover-item", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.selected": "selected()", "class.disabled": "disabled()" } }, hostDirectives: [{ directive: i1.BaseButtonDirective }], ngImport: i0, template: `
|
|
26
|
+
<button
|
|
27
|
+
#buttonElement
|
|
28
|
+
type="button"
|
|
29
|
+
role="button"
|
|
30
|
+
[disabled]="disabled()"
|
|
31
|
+
[name]="name()"
|
|
32
|
+
[attr.data-test]="baseButtonDirective.hostDataTest ?? name()"
|
|
33
|
+
[attr.id]="baseButtonDirective.hostId"
|
|
34
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
35
|
+
[attr.aria-disabled]="disabled()?.toString()">
|
|
36
|
+
<ng-content />
|
|
37
|
+
</button>
|
|
38
|
+
`, isInline: true, styles: [":host{width:100%;height:40px;display:flex;flex-wrap:wrap;align-content:center;gap:var(--ref-spacing-xxs);background:none;border:none;color:var(--ref-color-grey-100);overflow:hidden;text-overflow:ellipsis;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-sm)}:host button{all:unset;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);flex-grow:1}:host button:focus-visible{background-color:var(--ref-color-electric-blue-10)}:host:not(.disabled){cursor:pointer}:host:not(.disabled):hover{background-color:var(--ref-color-electric-blue-10)}:host:not(.disabled):active{background-color:var(--ref-color-electric-blue-20)}:host:not(.disabled).nav-selector-popover__item--active{background-color:var(--ref-color-electric-blue-10);color:var(--ref-color-electric-blue-100);font-weight:var(--ref-font-weight-bold)}:host:not(.disabled).selected{background:var(--ref-color-electric-blue-10)}:host.disabled{cursor:auto}\n"] });
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverItemComponent, decorators: [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{ selector: 'ap-nav-selector-popover-item', standalone: true, hostDirectives: [BaseButtonDirective], template: `
|
|
43
|
+
<button
|
|
44
|
+
#buttonElement
|
|
45
|
+
type="button"
|
|
46
|
+
role="button"
|
|
47
|
+
[disabled]="disabled()"
|
|
48
|
+
[name]="name()"
|
|
49
|
+
[attr.data-test]="baseButtonDirective.hostDataTest ?? name()"
|
|
50
|
+
[attr.id]="baseButtonDirective.hostId"
|
|
51
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
52
|
+
[attr.aria-disabled]="disabled()?.toString()">
|
|
53
|
+
<ng-content />
|
|
54
|
+
</button>
|
|
55
|
+
`, host: {
|
|
56
|
+
'[class.selected]': 'selected()',
|
|
57
|
+
'[class.disabled]': 'disabled()',
|
|
58
|
+
}, styles: [":host{width:100%;height:40px;display:flex;flex-wrap:wrap;align-content:center;gap:var(--ref-spacing-xxs);background:none;border:none;color:var(--ref-color-grey-100);overflow:hidden;text-overflow:ellipsis;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-sm)}:host button{all:unset;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);flex-grow:1}:host button:focus-visible{background-color:var(--ref-color-electric-blue-10)}:host:not(.disabled){cursor:pointer}:host:not(.disabled):hover{background-color:var(--ref-color-electric-blue-10)}:host:not(.disabled):active{background-color:var(--ref-color-electric-blue-20)}:host:not(.disabled).nav-selector-popover__item--active{background-color:var(--ref-color-electric-blue-10);color:var(--ref-color-electric-blue-100);font-weight:var(--ref-font-weight-bold)}:host:not(.disabled).selected{background:var(--ref-color-electric-blue-10)}:host.disabled{cursor:auto}\n"] }]
|
|
59
|
+
}] });
|
|
60
|
+
|
|
16
61
|
class TreeNodeAccessibilityDirective {
|
|
17
62
|
apTreeNodeAccessibility = input.required();
|
|
18
63
|
constructor(el, renderer) {
|
|
@@ -297,6 +342,305 @@ class NavSelectorAccessibility {
|
|
|
297
342
|
}
|
|
298
343
|
}
|
|
299
344
|
|
|
345
|
+
/**
|
|
346
|
+
* Create a Record of key/value pairs from an array of objects
|
|
347
|
+
* @param array
|
|
348
|
+
* @param key attribute of the object to use as key
|
|
349
|
+
*/
|
|
350
|
+
const associateBy = (array, key) => array.reduce((previousValue, currentValue) => {
|
|
351
|
+
previousValue[`${currentValue[key]}`] = currentValue;
|
|
352
|
+
return previousValue;
|
|
353
|
+
}, {});
|
|
354
|
+
const isInternalNavSelectorEntryALeafFocusable = (leaf, { parentFolded, multipleMode }) => {
|
|
355
|
+
if (parentFolded) {
|
|
356
|
+
return false;
|
|
357
|
+
}
|
|
358
|
+
if (multipleMode) {
|
|
359
|
+
return !leaf.disabled && !leaf.displayTokenInvalid && !leaf.displayFeatureLocked;
|
|
360
|
+
}
|
|
361
|
+
return !leaf.disabled;
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Class to handle the folding and unfolding of nav selector entries.
|
|
366
|
+
*/
|
|
367
|
+
class NavSelectorFolding {
|
|
368
|
+
/**
|
|
369
|
+
* Unfolds all parents of the entry with the given uid until the root.
|
|
370
|
+
* @param entries nav selector entries
|
|
371
|
+
* @param entryUid the entry uid to unfold parents for
|
|
372
|
+
* @param options options for folding operations
|
|
373
|
+
*/
|
|
374
|
+
static unfoldParents(entries, entryUid, options) {
|
|
375
|
+
return this.unfoldParentsOfEntry(entries, entryUid, options).entries;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Toggle the folding state of an entry.
|
|
379
|
+
*
|
|
380
|
+
* @see {@link NavSelectorFolding.fold} and {@link NavSelectorFolding.unfold} for more information on folding and unfolding.
|
|
381
|
+
*
|
|
382
|
+
* @param entries nav selector entries
|
|
383
|
+
* @param entryUid the entry uid to toggle
|
|
384
|
+
* @param options options for folding operations
|
|
385
|
+
*/
|
|
386
|
+
static toggleFolding(entries, entryUid, options) {
|
|
387
|
+
return this.toggleEntryFolding(entries, entryUid, options);
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Fold an entry.
|
|
391
|
+
*
|
|
392
|
+
* Set unfocusable on all children of the folded entry.
|
|
393
|
+
* Compute whenever the counter and token invalid should be displayed on groups and leaves.
|
|
394
|
+
*
|
|
395
|
+
* @param entries nav selector entries
|
|
396
|
+
* @param entryUid the entry uid to fold
|
|
397
|
+
* @param options options for folding operations
|
|
398
|
+
*/
|
|
399
|
+
static fold(entries, entryUid, options) {
|
|
400
|
+
return this.foldEntry(entries, entryUid, options);
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Unfold an entry.
|
|
404
|
+
*
|
|
405
|
+
* Set focusable on all children of the folded entry.
|
|
406
|
+
* Compute whenever the counter and token invalid should be displayed on groups and leaves.
|
|
407
|
+
*
|
|
408
|
+
* @param entries nav selector entries
|
|
409
|
+
* @param entryUid the entry uid to unfold
|
|
410
|
+
* @param options options for folding operations
|
|
411
|
+
*/
|
|
412
|
+
static unfold(entries, entryUid, options) {
|
|
413
|
+
return this.unfoldEntry(entries, entryUid, options);
|
|
414
|
+
}
|
|
415
|
+
static toggleEntryFolding(entries, entryUid, options, parentFolded = false) {
|
|
416
|
+
return entries.map(entry => {
|
|
417
|
+
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
418
|
+
if (entry.uid === entryUid) {
|
|
419
|
+
const folded = !entry.folded;
|
|
420
|
+
if (folded) {
|
|
421
|
+
return this.foldCategory(entry, options);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
return this.unfoldCategory(entry, options);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return {
|
|
428
|
+
...entry,
|
|
429
|
+
children: this.toggleEntryFolding(entry.children, entryUid, options, entry.folded),
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
433
|
+
if (entry.uid === entryUid) {
|
|
434
|
+
const folded = !entry.folded;
|
|
435
|
+
if (folded) {
|
|
436
|
+
return this.foldGroup(entry, options);
|
|
437
|
+
}
|
|
438
|
+
else {
|
|
439
|
+
return this.unfoldGroup(entry, options);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return {
|
|
443
|
+
...entry,
|
|
444
|
+
children: this.toggleEntryFolding(entry.children, entryUid, options, parentFolded || entry.folded),
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
if (isInternalNavSelectorEntryALeaf(entry)) {
|
|
448
|
+
if (entry.uid === entryUid) {
|
|
449
|
+
const folded = !entry.folded;
|
|
450
|
+
if (folded) {
|
|
451
|
+
return this.foldLeaf(entry, options.minified);
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
return this.unfoldLeaf(entry, options.minified);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
return {
|
|
458
|
+
...entry,
|
|
459
|
+
focusable: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded, multipleMode: options.multipleMode }),
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
return { ...entry, focusable: !parentFolded };
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
static foldEntry(entries, entryUid, options, parentFolded = false) {
|
|
466
|
+
return entries.map(entry => {
|
|
467
|
+
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
468
|
+
if (entry.uid === entryUid) {
|
|
469
|
+
return this.foldCategory(entry, options);
|
|
470
|
+
}
|
|
471
|
+
return {
|
|
472
|
+
...entry,
|
|
473
|
+
children: this.foldEntry(entry.children, entryUid, options, entry.folded),
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
477
|
+
if (entry.uid === entryUid) {
|
|
478
|
+
return this.foldGroup(entry, options);
|
|
479
|
+
}
|
|
480
|
+
return {
|
|
481
|
+
...entry,
|
|
482
|
+
focusable: !parentFolded,
|
|
483
|
+
children: this.foldEntry(entry.children, entryUid, options, parentFolded || entry.folded),
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
if (isInternalNavSelectorEntryALeaf(entry)) {
|
|
487
|
+
if (entry.uid === entryUid) {
|
|
488
|
+
return this.foldLeaf(entry, options.minified);
|
|
489
|
+
}
|
|
490
|
+
return {
|
|
491
|
+
...entry,
|
|
492
|
+
focusable: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded, multipleMode: options.multipleMode }),
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
return { ...entry, focusable: !parentFolded };
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
static unfoldEntry(entries, entryUid, options, parentFolded = false) {
|
|
499
|
+
return entries.map(entry => {
|
|
500
|
+
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
501
|
+
if (entry.uid === entryUid) {
|
|
502
|
+
return this.unfoldCategory(entry, options);
|
|
503
|
+
}
|
|
504
|
+
return {
|
|
505
|
+
...entry,
|
|
506
|
+
children: this.unfoldEntry(entry.children, entryUid, options, entry.folded),
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
510
|
+
if (entry.uid === entryUid) {
|
|
511
|
+
return this.unfoldGroup(entry, options);
|
|
512
|
+
}
|
|
513
|
+
return {
|
|
514
|
+
...entry,
|
|
515
|
+
children: this.unfoldEntry(entry.children, entryUid, options, parentFolded || entry.folded),
|
|
516
|
+
focusable: !parentFolded,
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
if (isInternalNavSelectorEntryALeaf(entry)) {
|
|
520
|
+
if (entry.uid === entryUid) {
|
|
521
|
+
return this.unfoldLeaf(entry, options.minified);
|
|
522
|
+
}
|
|
523
|
+
return {
|
|
524
|
+
...entry,
|
|
525
|
+
focusable: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded, multipleMode: options.multipleMode }),
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
return { ...entry, focusable: !parentFolded };
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
static foldCategory(category, options) {
|
|
532
|
+
return {
|
|
533
|
+
...category,
|
|
534
|
+
folded: true,
|
|
535
|
+
children: this.foldEntry(category.children, category.uid, options, true),
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
static unfoldCategory(category, options) {
|
|
539
|
+
return {
|
|
540
|
+
...category,
|
|
541
|
+
folded: false,
|
|
542
|
+
children: this.unfoldEntry(category.children, category.uid, options, false),
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
static foldGroup(group, options) {
|
|
546
|
+
return {
|
|
547
|
+
...group,
|
|
548
|
+
folded: true,
|
|
549
|
+
children: this.foldEntry(group.children, group.uid, options, true),
|
|
550
|
+
displayCounter: !!group.counter,
|
|
551
|
+
displayTokenInvalid: group.children.some(({ displayTokenInvalid }) => displayTokenInvalid),
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
static unfoldGroup(group, options) {
|
|
555
|
+
return {
|
|
556
|
+
...group,
|
|
557
|
+
folded: false,
|
|
558
|
+
children: this.unfoldEntry(group.children, group.uid, options, false),
|
|
559
|
+
displayCounter: false,
|
|
560
|
+
displayTokenInvalid: false,
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
static foldLeaf(leaf, minified) {
|
|
564
|
+
if (!leaf.foldable || minified) {
|
|
565
|
+
return leaf;
|
|
566
|
+
}
|
|
567
|
+
return {
|
|
568
|
+
...leaf,
|
|
569
|
+
displayCounter: leaf.counterDisplayable,
|
|
570
|
+
folded: true,
|
|
571
|
+
details: leaf.details.map(detail => ({ ...detail, focusable: false })),
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
static unfoldLeaf(leaf, minified) {
|
|
575
|
+
if (!leaf.foldable || minified) {
|
|
576
|
+
return leaf;
|
|
577
|
+
}
|
|
578
|
+
return {
|
|
579
|
+
...leaf,
|
|
580
|
+
displayCounter: false,
|
|
581
|
+
folded: false,
|
|
582
|
+
details: leaf.details.map((detail, idx) => ({
|
|
583
|
+
...detail,
|
|
584
|
+
focusable: idx < leaf.viewMoreDetailsDisplayedLimit && !detail.displayError,
|
|
585
|
+
})),
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Unfolds all parents of the entry with the given uid until the root.
|
|
590
|
+
* @param entries nav selector entries
|
|
591
|
+
* @param entryUid the entry uid to unfold parents for
|
|
592
|
+
* @param options options for folding operations
|
|
593
|
+
*/
|
|
594
|
+
static unfoldParentsOfEntry(entries, entryUid, options) {
|
|
595
|
+
let found = false;
|
|
596
|
+
const newEntries = entries.map(entry => {
|
|
597
|
+
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
598
|
+
const entryFound = entry.children.some(({ uid }) => uid === entryUid);
|
|
599
|
+
if (entryFound) {
|
|
600
|
+
found = true;
|
|
601
|
+
return this.unfoldCategory(entry, options);
|
|
602
|
+
}
|
|
603
|
+
const result = this.unfoldParentsOfEntry(entry.children, entryUid, options);
|
|
604
|
+
found ||= result.found;
|
|
605
|
+
if (found) {
|
|
606
|
+
return {
|
|
607
|
+
...entry,
|
|
608
|
+
children: result.entries,
|
|
609
|
+
folded: false,
|
|
610
|
+
focusable: true,
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
else if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
615
|
+
const entryFound = entry.children.some(({ uid }) => uid === entryUid);
|
|
616
|
+
if (entryFound) {
|
|
617
|
+
found = true;
|
|
618
|
+
return { ...this.unfoldGroup(entry, options), focusable: true };
|
|
619
|
+
}
|
|
620
|
+
const result = this.unfoldParentsOfEntry(entry.children, entryUid, options);
|
|
621
|
+
found ||= result.found;
|
|
622
|
+
if (found) {
|
|
623
|
+
return {
|
|
624
|
+
...entry,
|
|
625
|
+
children: result.entries,
|
|
626
|
+
folded: false,
|
|
627
|
+
focusable: true,
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
else if (isInternalNavSelectorEntryALeaf(entry)) {
|
|
632
|
+
const entryFound = entry.details.some(({ uid }) => uid === entryUid);
|
|
633
|
+
if (entryFound) {
|
|
634
|
+
found = true;
|
|
635
|
+
return { ...this.unfoldLeaf(entry, options.minified), focusable: true };
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
return entry;
|
|
639
|
+
});
|
|
640
|
+
return { found, entries: newEntries };
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
|
|
300
644
|
/**
|
|
301
645
|
* NavSelectorMultiSelect is a utility class that provides methods to select an entry in multiple mode.
|
|
302
646
|
*/
|
|
@@ -642,9 +986,10 @@ class NavSelectorBuilder {
|
|
|
642
986
|
*/
|
|
643
987
|
static build(entries, selectedEntryUid, detailsDisplayedLimit) {
|
|
644
988
|
this.structureChecker(entries);
|
|
645
|
-
|
|
989
|
+
let builtEntries = this.buildEntries(entries, false, 1, detailsDisplayedLimit);
|
|
646
990
|
if (selectedEntryUid) {
|
|
647
|
-
|
|
991
|
+
builtEntries = NavSelectorSingleSelect.select(builtEntries, selectedEntryUid);
|
|
992
|
+
builtEntries = NavSelectorFolding.unfoldParents(builtEntries, selectedEntryUid, { multipleMode: false, minified: false });
|
|
648
993
|
}
|
|
649
994
|
return builtEntries;
|
|
650
995
|
}
|
|
@@ -660,6 +1005,7 @@ class NavSelectorBuilder {
|
|
|
660
1005
|
if (selectedEntryUids) {
|
|
661
1006
|
for (const selectedEntryUid of selectedEntryUids) {
|
|
662
1007
|
builtEntries = NavSelectorMultiSelect.selectInMultipleMode(builtEntries, selectedEntryUid);
|
|
1008
|
+
builtEntries = NavSelectorFolding.unfoldParents(builtEntries, selectedEntryUid, { multipleMode: false, minified: false });
|
|
663
1009
|
}
|
|
664
1010
|
}
|
|
665
1011
|
return builtEntries;
|
|
@@ -878,25 +1224,6 @@ class NavSelectorBuilder {
|
|
|
878
1224
|
}
|
|
879
1225
|
}
|
|
880
1226
|
|
|
881
|
-
/**
|
|
882
|
-
* Create a Record of key/value pairs from an array of objects
|
|
883
|
-
* @param array
|
|
884
|
-
* @param key attribute of the object to use as key
|
|
885
|
-
*/
|
|
886
|
-
const associateBy = (array, key) => array.reduce((previousValue, currentValue) => {
|
|
887
|
-
previousValue[`${currentValue[key]}`] = currentValue;
|
|
888
|
-
return previousValue;
|
|
889
|
-
}, {});
|
|
890
|
-
const isInternalNavSelectorEntryALeafFocusable = (leaf, { parentFolded, multipleMode }) => {
|
|
891
|
-
if (parentFolded) {
|
|
892
|
-
return false;
|
|
893
|
-
}
|
|
894
|
-
if (multipleMode) {
|
|
895
|
-
return !leaf.disabled && !leaf.displayTokenInvalid && !leaf.displayFeatureLocked;
|
|
896
|
-
}
|
|
897
|
-
return !leaf.disabled;
|
|
898
|
-
};
|
|
899
|
-
|
|
900
1227
|
/**
|
|
901
1228
|
* NavSelectorFilter is a utility class that provides methods to filter entries
|
|
902
1229
|
*/
|
|
@@ -1034,226 +1361,6 @@ class NavSelectorFilter {
|
|
|
1034
1361
|
}
|
|
1035
1362
|
}
|
|
1036
1363
|
|
|
1037
|
-
/**
|
|
1038
|
-
* Class to handle the folding and unfolding of nav selector entries.
|
|
1039
|
-
*/
|
|
1040
|
-
class NavSelectorFolding {
|
|
1041
|
-
/**
|
|
1042
|
-
* Toggle the folding state of an entry.
|
|
1043
|
-
*
|
|
1044
|
-
* @see {@link NavSelectorFolding.fold} and {@link NavSelectorFolding.unfold} for more information on folding and unfolding.
|
|
1045
|
-
*
|
|
1046
|
-
* @param entries nav selector entries
|
|
1047
|
-
* @param entryUid the entry uid to toggle
|
|
1048
|
-
* @param multipleMode to update the focusable state of leaves and details correctly.
|
|
1049
|
-
* @param minified true if the nav selector is minified. Needed for leaf as they are not foldable in minified mode
|
|
1050
|
-
*/
|
|
1051
|
-
static toggleFolding(entries, entryUid, multipleMode, minified) {
|
|
1052
|
-
return this.toggleEntryFolding(entries, entryUid, multipleMode, minified);
|
|
1053
|
-
}
|
|
1054
|
-
/**
|
|
1055
|
-
* Fold an entry.
|
|
1056
|
-
*
|
|
1057
|
-
* Set unfocusable on all children of the folded entry.
|
|
1058
|
-
* Compute whenever the counter and token invalid should be displayed on groups and leaves.
|
|
1059
|
-
*
|
|
1060
|
-
* @param entries nav selector entries
|
|
1061
|
-
* @param entryUid the entry uid to fold
|
|
1062
|
-
* @param multipleMode to update the focusable state of leaves and details correctly.
|
|
1063
|
-
* @param minified true if the nav selector is minified. Needed for leaf as they are not foldable in minified mode
|
|
1064
|
-
*/
|
|
1065
|
-
static fold(entries, entryUid, multipleMode, minified) {
|
|
1066
|
-
return this.foldEntry(entries, entryUid, multipleMode, minified);
|
|
1067
|
-
}
|
|
1068
|
-
/**
|
|
1069
|
-
* Unfold an entry.
|
|
1070
|
-
*
|
|
1071
|
-
* Set focusable on all children of the folded entry.
|
|
1072
|
-
* Compute whenever the counter and token invalid should be displayed on groups and leaves.
|
|
1073
|
-
*
|
|
1074
|
-
* @param entries nav selector entries
|
|
1075
|
-
* @param entryUid the entry uid to unfold
|
|
1076
|
-
* @param multipleMode to update the focusable state of leaves and details correctly.
|
|
1077
|
-
* @param minified true if the nav selector is minified. Needed for leaf as they are not foldable in minified mode
|
|
1078
|
-
*/
|
|
1079
|
-
static unfold(entries, entryUid, multipleMode, minified) {
|
|
1080
|
-
return this.unfoldEntry(entries, entryUid, multipleMode, minified);
|
|
1081
|
-
}
|
|
1082
|
-
static toggleEntryFolding(entries, entryUid, multipleMode, minified, parentFolded = false) {
|
|
1083
|
-
return entries.map(entry => {
|
|
1084
|
-
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
1085
|
-
if (entry.uid === entryUid) {
|
|
1086
|
-
const folded = !entry.folded;
|
|
1087
|
-
if (folded) {
|
|
1088
|
-
return this.foldCategory(entry, minified);
|
|
1089
|
-
}
|
|
1090
|
-
else {
|
|
1091
|
-
return this.unfoldCategory(entry, minified);
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
return {
|
|
1095
|
-
...entry,
|
|
1096
|
-
children: this.toggleEntryFolding(entry.children, entryUid, minified, entry.folded),
|
|
1097
|
-
};
|
|
1098
|
-
}
|
|
1099
|
-
if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
1100
|
-
if (entry.uid === entryUid) {
|
|
1101
|
-
const folded = !entry.folded;
|
|
1102
|
-
if (folded) {
|
|
1103
|
-
return this.foldGroup(entry, multipleMode, minified);
|
|
1104
|
-
}
|
|
1105
|
-
else {
|
|
1106
|
-
return this.unfoldGroup(entry, multipleMode, minified);
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
return {
|
|
1110
|
-
...entry,
|
|
1111
|
-
children: this.toggleEntryFolding(entry.children, entryUid, multipleMode, minified, parentFolded || entry.folded),
|
|
1112
|
-
};
|
|
1113
|
-
}
|
|
1114
|
-
if (isInternalNavSelectorEntryALeaf(entry)) {
|
|
1115
|
-
if (entry.uid === entryUid) {
|
|
1116
|
-
const folded = !entry.folded;
|
|
1117
|
-
if (folded) {
|
|
1118
|
-
return this.foldLeaf(entry, minified);
|
|
1119
|
-
}
|
|
1120
|
-
else {
|
|
1121
|
-
return this.unfoldLeaf(entry, minified);
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
return {
|
|
1125
|
-
...entry,
|
|
1126
|
-
focusable: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded, multipleMode }),
|
|
1127
|
-
};
|
|
1128
|
-
}
|
|
1129
|
-
return { ...entry, focusable: !parentFolded };
|
|
1130
|
-
});
|
|
1131
|
-
}
|
|
1132
|
-
static foldEntry(entries, entryUid, multipleMode, minified, parentFolded = false) {
|
|
1133
|
-
return entries.map(entry => {
|
|
1134
|
-
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
1135
|
-
if (entry.uid === entryUid) {
|
|
1136
|
-
return this.foldCategory(entry, minified);
|
|
1137
|
-
}
|
|
1138
|
-
return {
|
|
1139
|
-
...entry,
|
|
1140
|
-
children: this.foldEntry(entry.children, entryUid, minified, entry.folded),
|
|
1141
|
-
};
|
|
1142
|
-
}
|
|
1143
|
-
if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
1144
|
-
if (entry.uid === entryUid) {
|
|
1145
|
-
return this.foldGroup(entry, multipleMode, minified);
|
|
1146
|
-
}
|
|
1147
|
-
return {
|
|
1148
|
-
...entry,
|
|
1149
|
-
focusable: !parentFolded,
|
|
1150
|
-
children: this.foldEntry(entry.children, entryUid, minified, parentFolded || entry.folded),
|
|
1151
|
-
};
|
|
1152
|
-
}
|
|
1153
|
-
if (isInternalNavSelectorEntryALeaf(entry)) {
|
|
1154
|
-
if (entry.uid === entryUid) {
|
|
1155
|
-
return this.foldLeaf(entry, minified);
|
|
1156
|
-
}
|
|
1157
|
-
return {
|
|
1158
|
-
...entry,
|
|
1159
|
-
focusable: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded, multipleMode }),
|
|
1160
|
-
};
|
|
1161
|
-
}
|
|
1162
|
-
return { ...entry, focusable: !parentFolded };
|
|
1163
|
-
});
|
|
1164
|
-
}
|
|
1165
|
-
static unfoldEntry(entries, entryUid, multipleMode, minified, parentFolded = false) {
|
|
1166
|
-
return entries.map(entry => {
|
|
1167
|
-
if (isInternalNavSelectorEntryACategory(entry)) {
|
|
1168
|
-
if (entry.uid === entryUid) {
|
|
1169
|
-
return this.unfoldCategory(entry, minified);
|
|
1170
|
-
}
|
|
1171
|
-
return {
|
|
1172
|
-
...entry,
|
|
1173
|
-
children: this.unfoldEntry(entry.children, entryUid, multipleMode, minified, entry.folded),
|
|
1174
|
-
};
|
|
1175
|
-
}
|
|
1176
|
-
if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
1177
|
-
if (entry.uid === entryUid) {
|
|
1178
|
-
return this.unfoldGroup(entry, multipleMode, minified);
|
|
1179
|
-
}
|
|
1180
|
-
return {
|
|
1181
|
-
...entry,
|
|
1182
|
-
children: this.unfoldEntry(entry.children, entryUid, multipleMode, minified, parentFolded || entry.folded),
|
|
1183
|
-
focusable: !parentFolded,
|
|
1184
|
-
};
|
|
1185
|
-
}
|
|
1186
|
-
if (isInternalNavSelectorEntryALeaf(entry)) {
|
|
1187
|
-
if (entry.uid === entryUid) {
|
|
1188
|
-
return this.unfoldLeaf(entry, minified);
|
|
1189
|
-
}
|
|
1190
|
-
return {
|
|
1191
|
-
...entry,
|
|
1192
|
-
focusable: isInternalNavSelectorEntryALeafFocusable(entry, { parentFolded, multipleMode }),
|
|
1193
|
-
};
|
|
1194
|
-
}
|
|
1195
|
-
return { ...entry, focusable: !parentFolded };
|
|
1196
|
-
});
|
|
1197
|
-
}
|
|
1198
|
-
static foldCategory(category, minified) {
|
|
1199
|
-
return {
|
|
1200
|
-
...category,
|
|
1201
|
-
folded: true,
|
|
1202
|
-
children: this.foldEntry(category.children, category.uid, minified, true),
|
|
1203
|
-
};
|
|
1204
|
-
}
|
|
1205
|
-
static unfoldCategory(category, minified) {
|
|
1206
|
-
return {
|
|
1207
|
-
...category,
|
|
1208
|
-
folded: false,
|
|
1209
|
-
children: this.unfoldEntry(category.children, category.uid, minified, false),
|
|
1210
|
-
};
|
|
1211
|
-
}
|
|
1212
|
-
static foldGroup(group, multipleMode, minified) {
|
|
1213
|
-
return {
|
|
1214
|
-
...group,
|
|
1215
|
-
folded: true,
|
|
1216
|
-
children: this.foldEntry(group.children, group.uid, multipleMode, minified, true),
|
|
1217
|
-
displayCounter: !!group.counter,
|
|
1218
|
-
displayTokenInvalid: group.children.some(({ displayTokenInvalid }) => displayTokenInvalid),
|
|
1219
|
-
};
|
|
1220
|
-
}
|
|
1221
|
-
static unfoldGroup(group, multipleMode, minified) {
|
|
1222
|
-
return {
|
|
1223
|
-
...group,
|
|
1224
|
-
folded: false,
|
|
1225
|
-
children: this.unfoldEntry(group.children, group.uid, multipleMode, minified, false),
|
|
1226
|
-
displayCounter: false,
|
|
1227
|
-
displayTokenInvalid: false,
|
|
1228
|
-
};
|
|
1229
|
-
}
|
|
1230
|
-
static foldLeaf(leaf, minified) {
|
|
1231
|
-
if (!leaf.foldable || minified) {
|
|
1232
|
-
return leaf;
|
|
1233
|
-
}
|
|
1234
|
-
return {
|
|
1235
|
-
...leaf,
|
|
1236
|
-
displayCounter: leaf.counterDisplayable,
|
|
1237
|
-
folded: true,
|
|
1238
|
-
details: leaf.details.map(detail => ({ ...detail, focusable: false })),
|
|
1239
|
-
};
|
|
1240
|
-
}
|
|
1241
|
-
static unfoldLeaf(leaf, minified) {
|
|
1242
|
-
if (!leaf.foldable || minified) {
|
|
1243
|
-
return leaf;
|
|
1244
|
-
}
|
|
1245
|
-
return {
|
|
1246
|
-
...leaf,
|
|
1247
|
-
displayCounter: false,
|
|
1248
|
-
folded: false,
|
|
1249
|
-
details: leaf.details.map((detail, idx) => ({
|
|
1250
|
-
...detail,
|
|
1251
|
-
focusable: idx < leaf.viewMoreDetailsDisplayedLimit,
|
|
1252
|
-
})),
|
|
1253
|
-
};
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
1364
|
/**
|
|
1258
1365
|
* NavSelectorMerger is a utility class that merges old entries into new entries.
|
|
1259
1366
|
* It is used to keep some previous properties of the previous state. Ex: folded, selected, focused, etc.
|
|
@@ -1361,7 +1468,11 @@ class NavSelectorMinifying {
|
|
|
1361
1468
|
static compute(entries, multipleMode, minified, parent = null) {
|
|
1362
1469
|
return entries.map(entry => {
|
|
1363
1470
|
if (isInternalNavSelectorEntryALeafDetails(entry)) {
|
|
1364
|
-
return {
|
|
1471
|
+
return {
|
|
1472
|
+
...entry,
|
|
1473
|
+
focusable: !minified,
|
|
1474
|
+
accessibility: { ...entry.accessibility, tabIndex: minified ? -1 : entry.accessibility.tabIndex },
|
|
1475
|
+
};
|
|
1365
1476
|
}
|
|
1366
1477
|
if (isInternalNavSelectorEntryANode(entry)) {
|
|
1367
1478
|
return {
|
|
@@ -1490,6 +1601,7 @@ class NavSelectorState {
|
|
|
1490
1601
|
title: '',
|
|
1491
1602
|
only: '',
|
|
1492
1603
|
tokenInvalid: '',
|
|
1604
|
+
groupTokenInvalid: '',
|
|
1493
1605
|
featureLocked: '',
|
|
1494
1606
|
searchPlaceholder: '',
|
|
1495
1607
|
noResults: '',
|
|
@@ -1546,7 +1658,7 @@ class NavSelectorState {
|
|
|
1546
1658
|
});
|
|
1547
1659
|
}
|
|
1548
1660
|
onGroupToggleFolding(group) {
|
|
1549
|
-
this.entries.update(entries => NavSelectorFolding.toggleFolding(entries, group.uid, this.
|
|
1661
|
+
this.entries.update(entries => NavSelectorFolding.toggleFolding(entries, group.uid, this.getFoldingOptions()));
|
|
1550
1662
|
}
|
|
1551
1663
|
onNodeSelect(node) {
|
|
1552
1664
|
this.entries.update(entries => NavSelectorMultiSelect.selectInMultipleMode(entries, node.uid));
|
|
@@ -1563,7 +1675,7 @@ class NavSelectorState {
|
|
|
1563
1675
|
}
|
|
1564
1676
|
}
|
|
1565
1677
|
onLeafToggleFolding(leaf) {
|
|
1566
|
-
this.entries.update(entries => NavSelectorFolding.toggleFolding(entries, leaf.uid, this.
|
|
1678
|
+
this.entries.update(entries => NavSelectorFolding.toggleFolding(entries, leaf.uid, this.getFoldingOptions()));
|
|
1567
1679
|
}
|
|
1568
1680
|
onLeafDetailClicked(leafDetail) {
|
|
1569
1681
|
this.entries.update(entries => NavSelectorSingleSelect.select(entries, leafDetail.uid));
|
|
@@ -1594,6 +1706,11 @@ class NavSelectorState {
|
|
|
1594
1706
|
this.toggleExpanded();
|
|
1595
1707
|
}
|
|
1596
1708
|
}
|
|
1709
|
+
forceMinify() {
|
|
1710
|
+
this.expanded.set(false);
|
|
1711
|
+
this.expandedAfterDelay.set(this.expanded());
|
|
1712
|
+
this.entries.update(entries => NavSelectorAccessibility.resetFocus(NavSelectorMinifying.minify(entries, this.multipleModeEnabled())));
|
|
1713
|
+
}
|
|
1597
1714
|
onSelectionChange(uids) {
|
|
1598
1715
|
// Avoid infinite loop if you put unexisting uids as select will generate the same entries but with different reference
|
|
1599
1716
|
if (JSON.stringify(uids) === JSON.stringify(this.lastSelectedUids())) {
|
|
@@ -1640,14 +1757,20 @@ class NavSelectorState {
|
|
|
1640
1757
|
return [];
|
|
1641
1758
|
});
|
|
1642
1759
|
}
|
|
1760
|
+
getFoldingOptions() {
|
|
1761
|
+
return {
|
|
1762
|
+
multipleMode: this.multipleModeEnabled(),
|
|
1763
|
+
minified: !this.expanded(),
|
|
1764
|
+
};
|
|
1765
|
+
}
|
|
1643
1766
|
updateLeafAction(leafActionProjection) {
|
|
1644
1767
|
this.leafActionProjection.set(leafActionProjection);
|
|
1645
1768
|
}
|
|
1646
1769
|
fold(entry) {
|
|
1647
|
-
this.entries.update(entries => NavSelectorFolding.fold(entries, entry.uid, this.
|
|
1770
|
+
this.entries.update(entries => NavSelectorFolding.fold(entries, entry.uid, this.getFoldingOptions()));
|
|
1648
1771
|
}
|
|
1649
1772
|
unfold(entry) {
|
|
1650
|
-
this.entries.update(entries => NavSelectorFolding.unfold(entries, entry.uid, this.
|
|
1773
|
+
this.entries.update(entries => NavSelectorFolding.unfold(entries, entry.uid, this.getFoldingOptions()));
|
|
1651
1774
|
}
|
|
1652
1775
|
updateDetailsDisplayedLimit(detailsDisplayedLimit) {
|
|
1653
1776
|
this.entries.update(entries => NavSelectorViewMore.changeViewMoreDetailsDisplayedLimit(entries, detailsDisplayedLimit));
|
|
@@ -1671,7 +1794,9 @@ class NavSelectorLeafDetailPresenter {
|
|
|
1671
1794
|
this.navSelectorState = navSelectorState;
|
|
1672
1795
|
}
|
|
1673
1796
|
onLeafDetailClicked(detail) {
|
|
1674
|
-
|
|
1797
|
+
if (!detail.displayError) {
|
|
1798
|
+
this.navSelectorState.onLeafDetailClicked(detail);
|
|
1799
|
+
}
|
|
1675
1800
|
}
|
|
1676
1801
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafDetailPresenter, deps: [{ token: NavSelectorState }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1677
1802
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafDetailPresenter });
|
|
@@ -1688,8 +1813,10 @@ class NavSelectorLeafDetailComponent {
|
|
|
1688
1813
|
this.navSelectorLeafDetailPresenter = navSelectorLeafDetailPresenter;
|
|
1689
1814
|
}
|
|
1690
1815
|
onClick(event) {
|
|
1691
|
-
|
|
1692
|
-
|
|
1816
|
+
if (!this.embedded()) {
|
|
1817
|
+
event.stopImmediatePropagation();
|
|
1818
|
+
this.navSelectorLeafDetailPresenter.onLeafDetailClicked(this.detail());
|
|
1819
|
+
}
|
|
1693
1820
|
}
|
|
1694
1821
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafDetailComponent, deps: [{ token: NavSelectorLeafDetailPresenter }], target: i0.ɵɵFactoryTarget.Component });
|
|
1695
1822
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorLeafDetailComponent, isStandalone: true, selector: "ap-nav-selector-leaf-detail", inputs: { detail: { classPropertyName: "detail", publicName: "detail", isSignal: true, isRequired: true, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "keydown.enter": "onClick($event)", "keydown.space": "onClick($event)" }, properties: { "class.selected": "detail().selected", "class.embedded": "embedded()", "class.disabled": "detail().displayError" } }, providers: [withSymbols(apErrorFill), NavSelectorLeafDetailPresenter], hostDirectives: [{ directive: TreeNodeAccessibilityDirective, inputs: ["apTreeNodeAccessibility", "detail"] }], ngImport: i0, template: "<span class=\"caption\">{{ detail().alias }}</span>\n\n@if (detail().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ detail().counter }}\n </ap-counter>\n}\n@if (detail().displayError) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"detail().errorReason\" />\n}\n", styles: [":host{display:flex;height:32px;padding:0 var(--ref-spacing-xxs);align-items:center;gap:var(--ref-spacing-xxs);align-self:stretch;flex-grow:1}:host.embedded{padding:0}:host.embedded .caption{font-size:var(--ref-font-size-sm)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host .caption{flex-grow:1;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;white-space:nowrap;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host:not(.disabled):not(.embedded){cursor:pointer}:host:not(.disabled):not(.embedded):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host:not(.disabled):not(.embedded):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host:not(.disabled):not(.embedded):focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host:not(.disabled):not(.embedded).selected{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host:not(.disabled):not(.embedded).selected .caption{overflow:hidden;color:var(--ref-color-electric-blue-150);text-overflow:ellipsis;white-space:nowrap;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host:not(.disabled):not(.embedded).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host.disabled .caption{opacity:.5}:host.embedded.selected .caption{color:var(--ref-color-electric-blue-150);font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm)}\n"], dependencies: [{ kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "background", "notif"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -1829,22 +1956,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1829
1956
|
], template: "@for (detail of firstDetails(); track detail.uid) {\n <div class=\"detail\">\n <div class=\"separator\">\n <div class=\"rectangle\"></div>\n </div>\n <ap-nav-selector-leaf-detail [detail]=\"detail\" />\n </div>\n}\n\n@if (leaf().viewMoreDisplayable) {\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (viewMoreDelay()) {\n @for (detail of lastDetails(); track detail.uid) {\n <div class=\"detail\">\n <div class=\"separator\">\n <div class=\"rectangle\"></div>\n </div>\n <ap-nav-selector-leaf-detail [detail]=\"detail\" />\n </div>\n }\n }\n </div>\n\n <div class=\"detail\">\n <div class=\"separator\">\n <div class=\"rectangle\"></div>\n </div>\n <a\n tabindex=\"0\"\n role=\"button\"\n class=\"standalone view-more\"\n (keydown.space)=\"onSpaceOrEnter($event)\"\n (keydown.enter)=\"onSpaceOrEnter($event)\"\n (click)=\"toggleViewMore()\">\n @if (leaf().viewMoreDisplayed) {\n {{ navSelectorLeafDetailsPresenter.viewMoreText() }}\n } @else {\n {{ navSelectorLeafDetailsPresenter.viewLessText() }}\n }\n </a>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}:host .detail{display:flex;align-self:stretch}:host .separator{display:flex;padding:0 11px 0 20px;align-items:center;align-self:stretch}:host .rectangle{width:1px;align-self:stretch;background:var(--ref-color-grey-10)}:host .view-more{display:flex;padding:8px;align-items:center;align-self:stretch}:host .details-container{display:flex;flex-direction:column;align-self:stretch}\n"] }]
|
|
1830
1957
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorLeafDetailsPresenter }] });
|
|
1831
1958
|
|
|
1832
|
-
class NavSelectorPopoverItemComponent {
|
|
1833
|
-
selected = input(false);
|
|
1834
|
-
classes = '';
|
|
1835
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1836
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.9", type: NavSelectorPopoverItemComponent, isStandalone: true, selector: "ap-nav-selector-popover-item", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.selected": "selected()", "class": "this.classes" } }, ngImport: i0, template: '<ng-content/>', isInline: true, styles: [":host{width:100%;height:40px;display:flex;flex-wrap:wrap;align-content:center;gap:var(--ref-spacing-xxs);padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);background:none;border:none;color:var(--ref-color-grey-100)}:host:not(.disabled){cursor:pointer}:host:not(.disabled):focus-visible{background-color:var(--ref-color-electric-blue-10)}:host:not(.disabled):hover{background-color:var(--ref-color-electric-blue-10)}:host:not(.disabled):active{background-color:var(--ref-color-electric-blue-20)}:host:not(.disabled).nav-selector-popover__item--active{background-color:var(--ref-color-electric-blue-10);color:var(--ref-color-electric-blue-100);font-weight:var(--ref-font-weight-bold)}:host:not(.disabled).selected{background:var(--ref-color-electric-blue-10)}:host.disabled{cursor:auto}\n"] });
|
|
1837
|
-
}
|
|
1838
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverItemComponent, decorators: [{
|
|
1839
|
-
type: Component,
|
|
1840
|
-
args: [{ selector: 'ap-nav-selector-popover-item', standalone: true, template: '<ng-content/>', host: {
|
|
1841
|
-
'[class.selected]': 'selected()',
|
|
1842
|
-
}, styles: [":host{width:100%;height:40px;display:flex;flex-wrap:wrap;align-content:center;gap:var(--ref-spacing-xxs);padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);background:none;border:none;color:var(--ref-color-grey-100)}:host:not(.disabled){cursor:pointer}:host:not(.disabled):focus-visible{background-color:var(--ref-color-electric-blue-10)}:host:not(.disabled):hover{background-color:var(--ref-color-electric-blue-10)}:host:not(.disabled):active{background-color:var(--ref-color-electric-blue-20)}:host:not(.disabled).nav-selector-popover__item--active{background-color:var(--ref-color-electric-blue-10);color:var(--ref-color-electric-blue-100);font-weight:var(--ref-font-weight-bold)}:host:not(.disabled).selected{background:var(--ref-color-electric-blue-10)}:host.disabled{cursor:auto}\n"] }]
|
|
1843
|
-
}], propDecorators: { classes: [{
|
|
1844
|
-
type: HostBinding,
|
|
1845
|
-
args: ['class']
|
|
1846
|
-
}] } });
|
|
1847
|
-
|
|
1848
1959
|
const NavSelectorPopoverPlacement = {
|
|
1849
1960
|
RIGHT: 'right',
|
|
1850
1961
|
BOTTOM_START: 'bottom_start',
|
|
@@ -1960,7 +2071,7 @@ class NavSelectorPopoverComponent {
|
|
|
1960
2071
|
}
|
|
1961
2072
|
}
|
|
1962
2073
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1963
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorPopoverComponent, isStandalone: true, selector: "ap-nav-selector-popover", inputs: { placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, popoverTitle: { classPropertyName: "popoverTitle", publicName: "popoverTitle", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "window:wheel": "onAnyScroll()", "window:focusin": "onFocusChanged($event)", "window:click": "onAnyClick($event)" }, properties: { "style.top.px": "position().top", "style.left.px": "position().left" } }, queries: [{ propertyName: "items", predicate: ["item"], isSignal: true }], ngImport: i0, template: "@if (displayed()) {\n <div class=\"nav-selector-popover\">\n @if (popoverTitle()) {\n <div (click)=\"onTitleCLicked($event)\" class=\"nav-selector-popover__title\">{{ popoverTitle() }}</div>\n }\n\n @let itemsNotNull = items();\n\n @if (itemsNotNull?.length) {\n @for (item of itemsNotNull; track item) {\n <
|
|
2074
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorPopoverComponent, isStandalone: true, selector: "ap-nav-selector-popover", inputs: { placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, popoverTitle: { classPropertyName: "popoverTitle", publicName: "popoverTitle", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "window:wheel": "onAnyScroll()", "window:focusin": "onFocusChanged($event)", "window:click": "onAnyClick($event)" }, properties: { "style.top.px": "position().top", "style.left.px": "position().left" } }, queries: [{ propertyName: "items", predicate: ["item"], isSignal: true }], ngImport: i0, template: "@if (displayed()) {\n <div class=\"nav-selector-popover\">\n @if (popoverTitle()) {\n <div (click)=\"onTitleCLicked($event)\" class=\"nav-selector-popover__title\">{{ popoverTitle() }}</div>\n }\n\n @let itemsNotNull = items();\n\n @if (itemsNotNull?.length) {\n @for (item of itemsNotNull; track item) {\n <ng-container [ngTemplateOutlet]=\"item\"/>\n }\n } @else {\n <ng-content select=\"[item]\"/>\n }\n </div>\n}\n", styles: [":host{position:fixed;z-index:1000}:host .nav-selector-popover{min-width:225px;padding:var(--ref-spacing-xxs) 0;background:var(--ref-color-white);border-radius:var(--ref-border-radius-sm);box-shadow:0 4px 25px -2px #34456326,0 4px 6px -2px #34456326}:host .nav-selector-popover__title{cursor:auto;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm) var(--ref-spacing-xxxs);text-align:left;color:var(--ref-color-grey-100);font-size:var(--ref-font-size-xs);font-weight:var(--ref-font-weight-bold)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1964
2075
|
}
|
|
1965
2076
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorPopoverComponent, decorators: [{
|
|
1966
2077
|
type: Component,
|
|
@@ -1971,7 +2082,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1971
2082
|
'(window:wheel)': 'onAnyScroll()',
|
|
1972
2083
|
'(window:focusin)': 'onFocusChanged($event)',
|
|
1973
2084
|
'(window:click)': 'onAnyClick($event)',
|
|
1974
|
-
}, imports: [NgTemplateOutlet
|
|
2085
|
+
}, imports: [NgTemplateOutlet], template: "@if (displayed()) {\n <div class=\"nav-selector-popover\">\n @if (popoverTitle()) {\n <div (click)=\"onTitleCLicked($event)\" class=\"nav-selector-popover__title\">{{ popoverTitle() }}</div>\n }\n\n @let itemsNotNull = items();\n\n @if (itemsNotNull?.length) {\n @for (item of itemsNotNull; track item) {\n <ng-container [ngTemplateOutlet]=\"item\"/>\n }\n } @else {\n <ng-content select=\"[item]\"/>\n }\n </div>\n}\n", styles: [":host{position:fixed;z-index:1000}:host .nav-selector-popover{min-width:225px;padding:var(--ref-spacing-xxs) 0;background:var(--ref-color-white);border-radius:var(--ref-border-radius-sm);box-shadow:0 4px 25px -2px #34456326,0 4px 6px -2px #34456326}:host .nav-selector-popover__title{cursor:auto;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm) var(--ref-spacing-xxxs);text-align:left;color:var(--ref-color-grey-100);font-size:var(--ref-font-size-xs);font-weight:var(--ref-font-weight-bold)}\n"] }]
|
|
1975
2086
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
1976
2087
|
|
|
1977
2088
|
class NavSelectorLeafPresenter {
|
|
@@ -1999,6 +2110,9 @@ class NavSelectorLeafPresenter {
|
|
|
1999
2110
|
unfold(leaf) {
|
|
2000
2111
|
this.navSelectorState.unfold(leaf);
|
|
2001
2112
|
}
|
|
2113
|
+
onLeafDetailClicked(detail) {
|
|
2114
|
+
this.navSelectorState.onLeafDetailClicked(detail);
|
|
2115
|
+
}
|
|
2002
2116
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafPresenter, deps: [{ token: NavSelectorState }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2003
2117
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafPresenter });
|
|
2004
2118
|
}
|
|
@@ -2030,13 +2144,11 @@ class NavSelectorLeafComponent {
|
|
|
2030
2144
|
if (disableReason) {
|
|
2031
2145
|
content.push(disableReason);
|
|
2032
2146
|
}
|
|
2033
|
-
if (this.
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
content.push(this.navSelectorLeafPresenter.texts().tokenInvalid);
|
|
2039
|
-
}
|
|
2147
|
+
if (this.leaf().displayFeatureLocked) {
|
|
2148
|
+
content.push(this.navSelectorLeafPresenter.texts().featureLocked);
|
|
2149
|
+
}
|
|
2150
|
+
if (this.leaf().displayTokenInvalid) {
|
|
2151
|
+
content.push(this.navSelectorLeafPresenter.texts().tokenInvalid);
|
|
2040
2152
|
}
|
|
2041
2153
|
return content.join('<br>');
|
|
2042
2154
|
});
|
|
@@ -2048,16 +2160,9 @@ class NavSelectorLeafComponent {
|
|
|
2048
2160
|
this.navSelectorLeafPresenter = navSelectorLeafPresenter;
|
|
2049
2161
|
afterNextRender(() => {
|
|
2050
2162
|
this.maxHeight.set(`${this.el.nativeElement.clientHeight * this.leaf().details.length}px`);
|
|
2051
|
-
|
|
2052
|
-
if (el) {
|
|
2053
|
-
this.aliasBoundedClientRect.set({
|
|
2054
|
-
offsetWidth: el.offsetWidth,
|
|
2055
|
-
offsetHeight: el.offsetHeight,
|
|
2056
|
-
scrollWidth: el.scrollWidth,
|
|
2057
|
-
scrollHeight: el.scrollHeight,
|
|
2058
|
-
});
|
|
2059
|
-
}
|
|
2163
|
+
this.updateAliasBoundedClientRect();
|
|
2060
2164
|
});
|
|
2165
|
+
afterRender(() => untracked(() => this.updateAliasBoundedClientRect()));
|
|
2061
2166
|
effect(() => {
|
|
2062
2167
|
const folded = this.leaf().folded;
|
|
2063
2168
|
untracked(() => {
|
|
@@ -2080,8 +2185,25 @@ class NavSelectorLeafComponent {
|
|
|
2080
2185
|
event.stopImmediatePropagation();
|
|
2081
2186
|
this.navSelectorLeafPresenter.onLeafToggleFolding(this.leaf());
|
|
2082
2187
|
}
|
|
2188
|
+
clickOnToggleFolding(event) {
|
|
2189
|
+
event.stopImmediatePropagation();
|
|
2190
|
+
// Remove the focus from the toggle folding so we do not have the :focus-within style on the leaf
|
|
2191
|
+
if (event.currentTarget && 'blur' in event.currentTarget && typeof event.currentTarget.blur === 'function') {
|
|
2192
|
+
event.currentTarget.blur();
|
|
2193
|
+
}
|
|
2194
|
+
this.navSelectorLeafPresenter.onLeafToggleFolding(this.leaf());
|
|
2195
|
+
}
|
|
2083
2196
|
selectOnly(event) {
|
|
2084
2197
|
event.stopImmediatePropagation();
|
|
2198
|
+
// (event.target as Element).blur();
|
|
2199
|
+
this.navSelectorLeafPresenter.selectOnlyLeaf(this.leaf());
|
|
2200
|
+
}
|
|
2201
|
+
clickOnSelectOnly(event) {
|
|
2202
|
+
event.stopImmediatePropagation();
|
|
2203
|
+
// Remove the focus from the select only so we do not have the :focus-within style on the leaf
|
|
2204
|
+
if (event.currentTarget && 'blur' in event.currentTarget && typeof event.currentTarget.blur === 'function') {
|
|
2205
|
+
event.currentTarget.blur();
|
|
2206
|
+
}
|
|
2085
2207
|
this.navSelectorLeafPresenter.selectOnlyLeaf(this.leaf());
|
|
2086
2208
|
}
|
|
2087
2209
|
/**
|
|
@@ -2112,8 +2234,26 @@ class NavSelectorLeafComponent {
|
|
|
2112
2234
|
event.stopImmediatePropagation();
|
|
2113
2235
|
this.navSelectorLeafPresenter.unfold(this.leaf());
|
|
2114
2236
|
}
|
|
2237
|
+
onDetailClicked(event, detail) {
|
|
2238
|
+
event.stopImmediatePropagation();
|
|
2239
|
+
this.navSelectorLeafPresenter.onLeafDetailClicked(detail);
|
|
2240
|
+
}
|
|
2241
|
+
updateAliasBoundedClientRect() {
|
|
2242
|
+
const el = this.aliasEl()?.nativeElement;
|
|
2243
|
+
if (el) {
|
|
2244
|
+
const boundedClientRect = {
|
|
2245
|
+
offsetWidth: el.offsetWidth,
|
|
2246
|
+
offsetHeight: el.offsetHeight,
|
|
2247
|
+
scrollWidth: el.scrollWidth,
|
|
2248
|
+
scrollHeight: el.scrollHeight,
|
|
2249
|
+
};
|
|
2250
|
+
if (JSON.stringify(this.aliasBoundedClientRect()) !== JSON.stringify(boundedClientRect)) {
|
|
2251
|
+
this.aliasBoundedClientRect.set(boundedClientRect);
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2115
2255
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorLeafComponent, deps: [{ token: i0.ElementRef }, { token: NavSelectorLeafPresenter }], target: i0.ɵɵFactoryTarget.Component });
|
|
2116
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorLeafComponent, isStandalone: true, selector: "ap-nav-selector-leaf", inputs: { leaf: { classPropertyName: "leaf", publicName: "leaf", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "treeitem" }, listeners: { "keydown.arrowLeft": "fold($event)", "keydown.arrowRight": "unfold($event)" }, properties: { "class.minified": "!navSelectorLeafPresenter.expanded()" } }, providers: [withSymbols(apErrorFill, apFeatureLock, apChevronDown, apChevronUp, apMore), NavSelectorLeafPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (navSelectorLeafPresenter.expandedAfterDelay()) {\n <div\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [attr.aria-selected]=\"leaf().selected\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [class.multiple-mode]=\"navSelectorLeafPresenter.isMultipleModeEnabled()\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [class.detail-selected]=\"leaf().detailSelected\"\n [class.actions-displayable]=\"leaf().actionsDisplayable && leaf().detailsDisplayable\"\n [class.details-displayable]=\"leaf().detailsDisplayable\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (focusin)=\"focused.set(true)\"\n (focusout)=\"focused.set(false)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [aria-label]=\"leaf().alias\"\n [disabled]=\"!leaf().selectable\"\n (click)=\"eventStopper($event)\"\n (change)=\"onCheckboxToggle()\" />\n }\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <span\n #alias\n class=\"caption\">\n {{ leaf().alias }}\n </span>\n\n <a\n class=\"standalone only-button\"\n role=\"button\"\n [attr.aria-label]=\"'Select only ' + leaf().alias\"\n [attr.tabindex]=\"leaf().accessibility.tabIndex\"\n (keydown.space)=\"selectOnly($event)\"\n (keydown.enter)=\"selectOnly($event)\"\n (click)=\"selectOnly($event)\">\n {{ navSelectorLeafPresenter.texts().only }}\n </a>\n\n @let actionProjection = navSelectorLeafPresenter.leafActionProjection();\n @if (actionProjection?.length) {\n <ap-symbol\n class=\"actions-menu\"\n size=\"sm\"\n symbolId=\"more\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Action menu ' + leaf().alias\"\n [apNavSelectorPopoverTrigger]=\"popover\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: true, keyboard: ['Space', 'Enter'] }\" />\n\n <ap-nav-selector-popover\n #popover\n placement=\"bottom_start\">\n @for (action of actionProjection; track action) {\n <ng-template #item>\n <ng-container\n [ngTemplateOutlet]=\"action\"\n [ngTemplateOutletContext]=\"{\n uid: leaf().uid\n }\" />\n </ng-template>\n }\n </ap-nav-selector-popover>\n }\n\n @if (leaf().foldable) {\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n role=\"button\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Toggle ' + leaf().alias\"\n [symbolId]=\"foldSymbol()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"toggleFolding($event)\"\n (keydown.enter)=\"toggleFolding($event)\" />\n }\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <ap-nav-selector-leaf-details\n [details]=\"leaf().details\"\n [leaf]=\"leaf()\" />\n }\n </div>\n} @else {\n <div\n #minified\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [apNavSelectorPopoverTrigger]=\"minifiedPopover\"\n [apNavSelectorPopoverDisabled]=\"!leaf().detailsDisplayable\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: false, hover: true }\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected || leaf().detailSelected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\" />\n }\n\n <div class=\"avatar-container\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <div class=\"status\">\n @if (leaf().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n </div>\n\n <ap-nav-selector-popover\n #minifiedPopover\n [popoverTitle]=\"leaf().alias\"\n [offset]=\"{ mainAxis: 0, crossAxis: -36.5 }\"\n placement=\"right\">\n @for (detail of leaf().details; track detail.uid) {\n <ap-nav-selector-popover-item item [selected]=\"detail.selected\" [class.disabled]=\"detail.displayError\">\n <ap-nav-selector-leaf-detail\n [embedded]=\"true\"\n [detail]=\"detail\" />\n </ap-nav-selector-popover-item>\n }\n </ap-nav-selector-popover>\n </div>\n}\n", styles: [":host{display:flex;flex-shrink:0;align-self:stretch;flex-direction:column}:host .details-container{align-self:stretch}:host .nav-selector-leaf{position:relative;display:flex;padding:0 var(--ref-spacing-xxs);height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch}:host .nav-selector-leaf ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=feature-lock]{color:var(--ref-color-purple-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button,:host .actions-menu{display:none;width:24px;height:24px;justify-content:center;align-items:center;flex-shrink:0}:host .folding-button:hover,:host .actions-menu:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .folding-button:active,:host .folding-button.nav-selector-popover-trigger--active,:host .actions-menu:active,:host .actions-menu.nav-selector-popover-trigger--active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host .folding-button:focus-visible,:host .actions-menu:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector-leaf.details-displayable{cursor:pointer}:host .nav-selector-leaf.details-displayable.detail-selected .caption{font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs);color:var(--ref-color-grey-100)}:host .nav-selector-leaf.details-displayable:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.details-displayable:focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable){cursor:pointer}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:not(.multiple-mode) .caption{color:var(--ref-color-electric-blue-150)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected.multiple-mode .caption{color:var(--ref-color-grey-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected .caption{overflow:hidden;text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:hover ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-within ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-visible ap-counter{display:none}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:hover .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-within .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-visible .only-button{display:flex}:host .nav-selector-leaf.feature-locked:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);outline:none}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):hover{background:var(--ref-color-purple-10)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):active{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):focus-visible{background:var(--ref-color-purple-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-purple-100)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected .caption{overflow:hidden;color:var(--ref-color-purple-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover ap-counter{display:none}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .folding-button{display:flex}:host .nav-selector-leaf.feature-locked.multiple-mode ap-avatar,:host .nav-selector-leaf.feature-locked.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.feature-locked.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.token-error.multiple-mode ap-avatar,:host .nav-selector-leaf.token-error.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.token-error.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled.multiple-mode ap-avatar,:host .nav-selector-leaf.disabled.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.disabled.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled ap-avatar,:host .nav-selector-leaf.disabled .caption{opacity:.5}:host .nav-selector-leaf.disabled .caption{color:var(--ref-color-grey-40)}:host .status{position:absolute;right:-4px;top:-6px;background-color:var(--ref-color-white);border-radius:100%}:host .avatar-container{position:relative}:host.minified .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .nav-selector-leaf{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);justify-content:center}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .only-button{display:none;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}::ng-deep .nav-selector-leaf-menu{position:absolute;left:55px;top:-20%;width:225px}::ng-deep .nav-selector-leaf-menu .not-displayable{display:none}::ng-deep .nav-selector-leaf-menu .caption-bold{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}\n"], dependencies: [{ kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }, { kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "background", "notif"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: NavSelectorLeafDetailsComponent, selector: "ap-nav-selector-leaf-details", inputs: ["leaf", "details"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "component", type: NavSelectorLeafDetailComponent, selector: "ap-nav-selector-leaf-detail", inputs: ["detail", "embedded"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }, { kind: "component", type: NavSelectorPopoverComponent, selector: "ap-nav-selector-popover", inputs: ["placement", "popoverTitle", "offset"] }, { kind: "directive", type: NavSelectorPopoverTriggerDirective, selector: "[apNavSelectorPopoverTrigger]", inputs: ["apNavSelectorPopoverTrigger", "apNavSelectorPopoverTriggerMode", "apNavSelectorPopoverDisabled"] }, { kind: "component", type: NavSelectorPopoverItemComponent, selector: "ap-nav-selector-popover-item", inputs: ["selected"] }], animations: [
|
|
2256
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorLeafComponent, isStandalone: true, selector: "ap-nav-selector-leaf", inputs: { leaf: { classPropertyName: "leaf", publicName: "leaf", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "treeitem" }, listeners: { "keydown.arrowLeft": "fold($event)", "keydown.arrowRight": "unfold($event)" }, properties: { "class.minified": "!navSelectorLeafPresenter.expanded()" } }, providers: [withSymbols(apErrorFill, apFeatureLock, apChevronDown, apChevronUp, apMore), NavSelectorLeafPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (navSelectorLeafPresenter.expandedAfterDelay()) {\n <div\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [attr.aria-selected]=\"leaf().selected\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [class.multiple-mode]=\"navSelectorLeafPresenter.isMultipleModeEnabled()\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [class.detail-selected]=\"leaf().detailSelected\"\n [class.actions-displayable]=\"leaf().actionsDisplayable && leaf().detailsDisplayable\"\n [class.details-displayable]=\"leaf().detailsDisplayable\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (focusin)=\"focused.set(true)\"\n (focusout)=\"focused.set(false)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [aria-label]=\"leaf().alias\"\n [disabled]=\"!leaf().selectable\"\n (click)=\"eventStopper($event)\"\n (change)=\"onCheckboxToggle()\" />\n }\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <span\n #alias\n class=\"caption\">\n {{ leaf().alias }}\n </span>\n\n <a\n class=\"standalone only-button\"\n role=\"button\"\n [attr.aria-label]=\"'Select only ' + leaf().alias\"\n [attr.tabindex]=\"leaf().accessibility.tabIndex\"\n (keydown.space)=\"selectOnly($event)\"\n (keydown.enter)=\"selectOnly($event)\"\n (click)=\"clickOnSelectOnly($event)\">\n {{ navSelectorLeafPresenter.texts().only }}\n </a>\n\n @let actionProjection = navSelectorLeafPresenter.leafActionProjection();\n @if (actionProjection?.length) {\n <ap-symbol\n class=\"actions-menu\"\n size=\"sm\"\n symbolId=\"more\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Action menu ' + leaf().alias\"\n [apNavSelectorPopoverTrigger]=\"popover\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: true, keyboard: ['Space', 'Enter'] }\" />\n\n <ap-nav-selector-popover\n #popover\n placement=\"bottom_start\">\n @for (action of actionProjection; track action) {\n <ng-template #item>\n <ng-container\n [ngTemplateOutlet]=\"action\"\n [ngTemplateOutletContext]=\"{\n uid: leaf().uid\n }\" />\n </ng-template>\n }\n </ap-nav-selector-popover>\n }\n\n @if (leaf().foldable) {\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n role=\"button\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Toggle ' + leaf().alias\"\n [symbolId]=\"foldSymbol()\"\n (click)=\"clickOnToggleFolding($event)\"\n (keydown.space)=\"toggleFolding($event)\"\n (keydown.enter)=\"toggleFolding($event)\" />\n }\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <ap-nav-selector-leaf-details\n [details]=\"leaf().details\"\n [leaf]=\"leaf()\" />\n }\n </div>\n} @else {\n <div\n #minified\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [apNavSelectorPopoverTrigger]=\"minifiedPopover\"\n [apNavSelectorPopoverDisabled]=\"!leaf().detailsDisplayable\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: false, hover: true }\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected || leaf().detailSelected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.multiple-mode]=\"navSelectorLeafPresenter.isMultipleModeEnabled()\"\n [class.disabled]=\"leaf().disabled\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\" />\n }\n\n <div class=\"avatar-container\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <div class=\"status\">\n @if (leaf().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n </div>\n\n <ap-nav-selector-popover\n #minifiedPopover\n placement=\"right\"\n [popoverTitle]=\"leaf().alias\"\n [offset]=\"{ mainAxis: 0, crossAxis: -36.5 }\">\n @for (detail of leaf().details; track detail.uid) {\n <ap-nav-selector-popover-item\n item\n [selected]=\"detail.selected\"\n [disabled]=\"detail.displayError\"\n [name]=\"detail.alias\"\n (click)=\"onDetailClicked($event, detail)\">\n <ap-nav-selector-leaf-detail\n [embedded]=\"true\"\n [detail]=\"detail\" />\n </ap-nav-selector-popover-item>\n }\n </ap-nav-selector-popover>\n </div>\n}\n", styles: [":host{display:flex;flex-shrink:0;align-self:stretch;flex-direction:column}:host .details-container{align-self:stretch}:host .nav-selector-leaf{position:relative;display:flex;padding:0 var(--ref-spacing-xxs);height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch}:host .nav-selector-leaf ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=feature-lock]{color:var(--ref-color-purple-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button,:host .actions-menu{display:none;width:24px;height:24px;justify-content:center;align-items:center;flex-shrink:0}:host .folding-button:hover,:host .actions-menu:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .folding-button:active,:host .folding-button.nav-selector-popover-trigger--active,:host .actions-menu:active,:host .actions-menu.nav-selector-popover-trigger--active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host .folding-button:focus-visible,:host .actions-menu:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector-leaf.details-displayable{cursor:pointer}:host .nav-selector-leaf.details-displayable.detail-selected .caption{font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs);color:var(--ref-color-grey-100)}:host .nav-selector-leaf.details-displayable:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.details-displayable:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf.details-displayable:focus-within:not(:host .nav-selector-leaf.details-displayable.detail-selected){border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable){cursor:pointer}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:not(.multiple-mode) .caption{color:var(--ref-color-electric-blue-150)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected.multiple-mode .caption{color:var(--ref-color-grey-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected .caption{overflow:hidden;text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:hover ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-within ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-visible ap-counter{display:none}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:hover .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-within .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-visible .only-button{display:flex}:host .nav-selector-leaf.feature-locked:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);outline:none;cursor:pointer}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):hover{background:var(--ref-color-purple-10)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):active{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):focus-visible{background:var(--ref-color-purple-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-purple-100)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected .caption{overflow:hidden;color:var(--ref-color-purple-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover ap-counter{display:none}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .folding-button{display:flex}:host .nav-selector-leaf.feature-locked.multiple-mode ap-avatar,:host .nav-selector-leaf.feature-locked.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.feature-locked.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.token-error.multiple-mode ap-avatar,:host .nav-selector-leaf.token-error.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.token-error.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled.multiple-mode ap-avatar,:host .nav-selector-leaf.disabled.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.disabled.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled ap-avatar,:host .nav-selector-leaf.disabled .caption{opacity:.5}:host .nav-selector-leaf.disabled .caption{color:var(--ref-color-grey-40)}:host .status{position:absolute;right:-4px;top:-6px;background-color:var(--ref-color-white);border-radius:100%}:host .avatar-container{position:relative}:host.minified .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .nav-selector-leaf{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs)}:host.minified .nav-selector-leaf:not(.multiple-mode){justify-content:center}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .only-button{display:none;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}::ng-deep .nav-selector-leaf-menu{position:absolute;left:55px;top:-20%;width:225px}::ng-deep .nav-selector-leaf-menu .not-displayable{display:none}::ng-deep .nav-selector-leaf-menu .caption-bold{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}\n"], dependencies: [{ kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }, { kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "background", "notif"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: NavSelectorLeafDetailsComponent, selector: "ap-nav-selector-leaf-details", inputs: ["leaf", "details"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "component", type: NavSelectorLeafDetailComponent, selector: "ap-nav-selector-leaf-detail", inputs: ["detail", "embedded"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }, { kind: "component", type: NavSelectorPopoverComponent, selector: "ap-nav-selector-popover", inputs: ["placement", "popoverTitle", "offset"] }, { kind: "directive", type: NavSelectorPopoverTriggerDirective, selector: "[apNavSelectorPopoverTrigger]", inputs: ["apNavSelectorPopoverTrigger", "apNavSelectorPopoverTriggerMode", "apNavSelectorPopoverDisabled"] }, { kind: "component", type: NavSelectorPopoverItemComponent, selector: "ap-nav-selector-popover-item", inputs: ["selected", "disabled", "name", "ariaLabel"] }], animations: [
|
|
2117
2257
|
/**
|
|
2118
2258
|
* Overflow hidden is put only during the animation and on the collapsed state because if it is put on the expanded state then children’s border will be cut (hover / focus)
|
|
2119
2259
|
*/
|
|
@@ -2174,7 +2314,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
2174
2314
|
animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ overflow: 'hidden', maxHeight: '{{maxHeight}}' }), style({ maxHeight: 0 })])),
|
|
2175
2315
|
]),
|
|
2176
2316
|
]),
|
|
2177
|
-
], template: "@if (navSelectorLeafPresenter.expandedAfterDelay()) {\n <div\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [attr.aria-selected]=\"leaf().selected\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [class.multiple-mode]=\"navSelectorLeafPresenter.isMultipleModeEnabled()\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [class.detail-selected]=\"leaf().detailSelected\"\n [class.actions-displayable]=\"leaf().actionsDisplayable && leaf().detailsDisplayable\"\n [class.details-displayable]=\"leaf().detailsDisplayable\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (focusin)=\"focused.set(true)\"\n (focusout)=\"focused.set(false)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [aria-label]=\"leaf().alias\"\n [disabled]=\"!leaf().selectable\"\n (click)=\"eventStopper($event)\"\n (change)=\"onCheckboxToggle()\" />\n }\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <span\n #alias\n class=\"caption\">\n {{ leaf().alias }}\n </span>\n\n <a\n class=\"standalone only-button\"\n role=\"button\"\n [attr.aria-label]=\"'Select only ' + leaf().alias\"\n [attr.tabindex]=\"leaf().accessibility.tabIndex\"\n (keydown.space)=\"selectOnly($event)\"\n (keydown.enter)=\"selectOnly($event)\"\n (click)=\"selectOnly($event)\">\n {{ navSelectorLeafPresenter.texts().only }}\n </a>\n\n @let actionProjection = navSelectorLeafPresenter.leafActionProjection();\n @if (actionProjection?.length) {\n <ap-symbol\n class=\"actions-menu\"\n size=\"sm\"\n symbolId=\"more\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Action menu ' + leaf().alias\"\n [apNavSelectorPopoverTrigger]=\"popover\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: true, keyboard: ['Space', 'Enter'] }\" />\n\n <ap-nav-selector-popover\n #popover\n placement=\"bottom_start\">\n @for (action of actionProjection; track action) {\n <ng-template #item>\n <ng-container\n [ngTemplateOutlet]=\"action\"\n [ngTemplateOutletContext]=\"{\n uid: leaf().uid\n }\" />\n </ng-template>\n }\n </ap-nav-selector-popover>\n }\n\n @if (leaf().foldable) {\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n role=\"button\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Toggle ' + leaf().alias\"\n [symbolId]=\"foldSymbol()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"toggleFolding($event)\"\n (keydown.enter)=\"toggleFolding($event)\" />\n }\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <ap-nav-selector-leaf-details\n [details]=\"leaf().details\"\n [leaf]=\"leaf()\" />\n }\n </div>\n} @else {\n <div\n #minified\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [apNavSelectorPopoverTrigger]=\"minifiedPopover\"\n [apNavSelectorPopoverDisabled]=\"!leaf().detailsDisplayable\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: false, hover: true }\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected || leaf().detailSelected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\" />\n }\n\n <div class=\"avatar-container\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <div class=\"status\">\n @if (leaf().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n </div>\n\n <ap-nav-selector-popover\n #minifiedPopover\n [popoverTitle]=\"leaf().alias\"\n [offset]=\"{ mainAxis: 0, crossAxis: -36.5 }\"\n placement=\"right\">\n @for (detail of leaf().details; track detail.uid) {\n <ap-nav-selector-popover-item item [selected]=\"detail.selected\" [class.disabled]=\"detail.displayError\">\n <ap-nav-selector-leaf-detail\n [embedded]=\"true\"\n [detail]=\"detail\" />\n </ap-nav-selector-popover-item>\n }\n </ap-nav-selector-popover>\n </div>\n}\n", styles: [":host{display:flex;flex-shrink:0;align-self:stretch;flex-direction:column}:host .details-container{align-self:stretch}:host .nav-selector-leaf{position:relative;display:flex;padding:0 var(--ref-spacing-xxs);height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch}:host .nav-selector-leaf ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=feature-lock]{color:var(--ref-color-purple-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button,:host .actions-menu{display:none;width:24px;height:24px;justify-content:center;align-items:center;flex-shrink:0}:host .folding-button:hover,:host .actions-menu:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .folding-button:active,:host .folding-button.nav-selector-popover-trigger--active,:host .actions-menu:active,:host .actions-menu.nav-selector-popover-trigger--active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host .folding-button:focus-visible,:host .actions-menu:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector-leaf.details-displayable{cursor:pointer}:host .nav-selector-leaf.details-displayable.detail-selected .caption{font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs);color:var(--ref-color-grey-100)}:host .nav-selector-leaf.details-displayable:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.details-displayable:focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable){cursor:pointer}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:not(.multiple-mode) .caption{color:var(--ref-color-electric-blue-150)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected.multiple-mode .caption{color:var(--ref-color-grey-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected .caption{overflow:hidden;text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:hover ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-within ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-visible ap-counter{display:none}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:hover .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-within .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-visible .only-button{display:flex}:host .nav-selector-leaf.feature-locked:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);outline:none}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):hover{background:var(--ref-color-purple-10)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):active{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):focus-visible{background:var(--ref-color-purple-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-purple-100)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected .caption{overflow:hidden;color:var(--ref-color-purple-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover ap-counter{display:none}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .folding-button{display:flex}:host .nav-selector-leaf.feature-locked.multiple-mode ap-avatar,:host .nav-selector-leaf.feature-locked.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.feature-locked.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.token-error.multiple-mode ap-avatar,:host .nav-selector-leaf.token-error.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.token-error.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled.multiple-mode ap-avatar,:host .nav-selector-leaf.disabled.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.disabled.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled ap-avatar,:host .nav-selector-leaf.disabled .caption{opacity:.5}:host .nav-selector-leaf.disabled .caption{color:var(--ref-color-grey-40)}:host .status{position:absolute;right:-4px;top:-6px;background-color:var(--ref-color-white);border-radius:100%}:host .avatar-container{position:relative}:host.minified .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .nav-selector-leaf{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);justify-content:center}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .only-button{display:none;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}::ng-deep .nav-selector-leaf-menu{position:absolute;left:55px;top:-20%;width:225px}::ng-deep .nav-selector-leaf-menu .not-displayable{display:none}::ng-deep .nav-selector-leaf-menu .caption-bold{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}\n"] }]
|
|
2317
|
+
], template: "@if (navSelectorLeafPresenter.expandedAfterDelay()) {\n <div\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [attr.aria-selected]=\"leaf().selected\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [class.multiple-mode]=\"navSelectorLeafPresenter.isMultipleModeEnabled()\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.disabled]=\"leaf().disabled\"\n [class.detail-selected]=\"leaf().detailSelected\"\n [class.actions-displayable]=\"leaf().actionsDisplayable && leaf().detailsDisplayable\"\n [class.details-displayable]=\"leaf().detailsDisplayable\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (focusin)=\"focused.set(true)\"\n (focusout)=\"focused.set(false)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [aria-label]=\"leaf().alias\"\n [disabled]=\"!leaf().selectable\"\n (click)=\"eventStopper($event)\"\n (change)=\"onCheckboxToggle()\" />\n }\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <span\n #alias\n class=\"caption\">\n {{ leaf().alias }}\n </span>\n\n <a\n class=\"standalone only-button\"\n role=\"button\"\n [attr.aria-label]=\"'Select only ' + leaf().alias\"\n [attr.tabindex]=\"leaf().accessibility.tabIndex\"\n (keydown.space)=\"selectOnly($event)\"\n (keydown.enter)=\"selectOnly($event)\"\n (click)=\"clickOnSelectOnly($event)\">\n {{ navSelectorLeafPresenter.texts().only }}\n </a>\n\n @let actionProjection = navSelectorLeafPresenter.leafActionProjection();\n @if (actionProjection?.length) {\n <ap-symbol\n class=\"actions-menu\"\n size=\"sm\"\n symbolId=\"more\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Action menu ' + leaf().alias\"\n [apNavSelectorPopoverTrigger]=\"popover\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: true, keyboard: ['Space', 'Enter'] }\" />\n\n <ap-nav-selector-popover\n #popover\n placement=\"bottom_start\">\n @for (action of actionProjection; track action) {\n <ng-template #item>\n <ng-container\n [ngTemplateOutlet]=\"action\"\n [ngTemplateOutletContext]=\"{\n uid: leaf().uid\n }\" />\n </ng-template>\n }\n </ap-nav-selector-popover>\n }\n\n @if (leaf().foldable) {\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n role=\"button\"\n [tabindex]=\"leaf().accessibility.tabIndex\"\n [attr.aria-label]=\"'Toggle ' + leaf().alias\"\n [symbolId]=\"foldSymbol()\"\n (click)=\"clickOnToggleFolding($event)\"\n (keydown.space)=\"toggleFolding($event)\"\n (keydown.enter)=\"toggleFolding($event)\" />\n }\n @if (leaf().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n\n <div\n class=\"details-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <ap-nav-selector-leaf-details\n [details]=\"leaf().details\"\n [leaf]=\"leaf()\" />\n }\n </div>\n} @else {\n <div\n #minified\n class=\"nav-selector-leaf\"\n apTooltipPosition=\"right\"\n [apNavSelectorPopoverTrigger]=\"minifiedPopover\"\n [apNavSelectorPopoverDisabled]=\"!leaf().detailsDisplayable\"\n [apNavSelectorPopoverTriggerMode]=\"{ click: false, hover: true }\"\n [class.feature-locked]=\"leaf().displayFeatureLocked\"\n [class.selected]=\"leaf().selected || leaf().detailSelected\"\n [class.token-error]=\"leaf().displayTokenInvalid\"\n [class.multiple-mode]=\"navSelectorLeafPresenter.isMultipleModeEnabled()\"\n [class.disabled]=\"leaf().disabled\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"leaf()\"\n (keydown.space)=\"onSpaceOrEnterPressed($event)\"\n (keydown.enter)=\"onSpaceOrEnterPressed($event)\"\n (click)=\"onClick($event)\">\n @if (navSelectorLeafPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"leaf().uid\"\n [checked]=\"leaf().selected\"\n [disabled]=\"!leaf().selectable\" />\n }\n\n <div class=\"avatar-container\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"leaf().pictureUrl ?? undefined\"\n [network]=\"$any(leaf().network)\"\n [showInitials]=\"initial()\" />\n\n <div class=\"status\">\n @if (leaf().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ leaf().counter }}\n </ap-counter>\n }\n @if (leaf().displayTokenInvalid) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"error_fill\" />\n }\n @if (leaf().displayFeatureLocked) {\n <ap-symbol\n size=\"sm\"\n symbolId=\"feature-lock\" />\n }\n </div>\n </div>\n\n <ap-nav-selector-popover\n #minifiedPopover\n placement=\"right\"\n [popoverTitle]=\"leaf().alias\"\n [offset]=\"{ mainAxis: 0, crossAxis: -36.5 }\">\n @for (detail of leaf().details; track detail.uid) {\n <ap-nav-selector-popover-item\n item\n [selected]=\"detail.selected\"\n [disabled]=\"detail.displayError\"\n [name]=\"detail.alias\"\n (click)=\"onDetailClicked($event, detail)\">\n <ap-nav-selector-leaf-detail\n [embedded]=\"true\"\n [detail]=\"detail\" />\n </ap-nav-selector-popover-item>\n }\n </ap-nav-selector-popover>\n </div>\n}\n", styles: [":host{display:flex;flex-shrink:0;align-self:stretch;flex-direction:column}:host .details-container{align-self:stretch}:host .nav-selector-leaf{position:relative;display:flex;padding:0 var(--ref-spacing-xxs);height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch}:host .nav-selector-leaf ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=feature-lock]{color:var(--ref-color-purple-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button,:host .actions-menu{display:none;width:24px;height:24px;justify-content:center;align-items:center;flex-shrink:0}:host .folding-button:hover,:host .actions-menu:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .folding-button:active,:host .folding-button.nav-selector-popover-trigger--active,:host .actions-menu:active,:host .actions-menu.nav-selector-popover-trigger--active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-40)}:host .folding-button:focus-visible,:host .actions-menu:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector-leaf.details-displayable{cursor:pointer}:host .nav-selector-leaf.details-displayable.detail-selected .caption{font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs);color:var(--ref-color-grey-100)}:host .nav-selector-leaf.details-displayable:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.details-displayable:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf.details-displayable:focus-within:not(:host .nav-selector-leaf.details-displayable.detail-selected){border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable){cursor:pointer}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable):focus-within{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:not(.multiple-mode) .caption{color:var(--ref-color-electric-blue-150)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected.multiple-mode .caption{color:var(--ref-color-grey-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected .caption{overflow:hidden;text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:hover ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-within ap-counter,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-visible ap-counter{display:none}:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:hover .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-within .only-button,:host .nav-selector-leaf:not(.disabled):not(.feature-locked):not(.multiple-mode.token-error):not(.details-displayable).multiple-mode:focus-visible .only-button{display:flex}:host .nav-selector-leaf.feature-locked:not(.multiple-mode){border-radius:var(--ref-border-radius-sm);outline:none;cursor:pointer}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):hover{background:var(--ref-color-purple-10)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):active{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode):focus-visible{background:var(--ref-color-purple-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-purple-100)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected{background:var(--ref-color-purple-20)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected .caption{overflow:hidden;color:var(--ref-color-purple-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .nav-selector-leaf.feature-locked:not(.multiple-mode).selected:focus-visible{box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within ap-counter,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover ap-counter{display:none}:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-visible .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):focus-within .folding-button,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .actions-menu,:host .nav-selector-leaf.actions-displayable:not(.feature-locked):not(.disabled):not(.token-error):hover .folding-button{display:flex}:host .nav-selector-leaf.feature-locked.multiple-mode ap-avatar,:host .nav-selector-leaf.feature-locked.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.feature-locked.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.token-error.multiple-mode ap-avatar,:host .nav-selector-leaf.token-error.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.token-error.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled.multiple-mode ap-avatar,:host .nav-selector-leaf.disabled.multiple-mode .caption{opacity:.5}:host .nav-selector-leaf.disabled.multiple-mode .caption{color:var(--ref-color-grey-40)}:host .nav-selector-leaf.disabled ap-avatar,:host .nav-selector-leaf.disabled .caption{opacity:.5}:host .nav-selector-leaf.disabled .caption{color:var(--ref-color-grey-40)}:host .status{position:absolute;right:-4px;top:-6px;background-color:var(--ref-color-white);border-radius:100%}:host .avatar-container{position:relative}:host.minified .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .nav-selector-leaf{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs)}:host.minified .nav-selector-leaf:not(.multiple-mode){justify-content:center}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .only-button{display:none;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}::ng-deep .nav-selector-leaf-menu{position:absolute;left:55px;top:-20%;width:225px}::ng-deep .nav-selector-leaf-menu .not-displayable{display:none}::ng-deep .nav-selector-leaf-menu .caption-bold{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}\n"] }]
|
|
2178
2318
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorLeafPresenter }] });
|
|
2179
2319
|
|
|
2180
2320
|
class NavSelectorGroupPresenter {
|
|
@@ -2224,7 +2364,7 @@ class NavSelectorGroupComponent {
|
|
|
2224
2364
|
content.push(this.group().alias);
|
|
2225
2365
|
}
|
|
2226
2366
|
if (this.group().displayTokenInvalid) {
|
|
2227
|
-
content.push(this.navSelectorGroupPresenter.texts().
|
|
2367
|
+
content.push(this.navSelectorGroupPresenter.texts().groupTokenInvalid);
|
|
2228
2368
|
}
|
|
2229
2369
|
return content.join('<br>');
|
|
2230
2370
|
});
|
|
@@ -2236,16 +2376,9 @@ class NavSelectorGroupComponent {
|
|
|
2236
2376
|
this.navSelectorGroupPresenter = navSelectorGroupPresenter;
|
|
2237
2377
|
afterNextRender(() => {
|
|
2238
2378
|
this.maxHeight.set(`${this.el.nativeElement.clientHeight * this.group().children.length}px`);
|
|
2239
|
-
|
|
2240
|
-
if (el) {
|
|
2241
|
-
this.aliasBoundedClientRect.set({
|
|
2242
|
-
offsetWidth: el.offsetWidth,
|
|
2243
|
-
offsetHeight: el.offsetHeight,
|
|
2244
|
-
scrollWidth: el.scrollWidth,
|
|
2245
|
-
scrollHeight: el.scrollHeight,
|
|
2246
|
-
});
|
|
2247
|
-
}
|
|
2379
|
+
this.updateAliasBoundedClientRect();
|
|
2248
2380
|
});
|
|
2381
|
+
afterRender(() => untracked(() => this.updateAliasBoundedClientRect()));
|
|
2249
2382
|
effect(() => {
|
|
2250
2383
|
const folded = this.group().folded;
|
|
2251
2384
|
untracked(() => {
|
|
@@ -2290,8 +2423,22 @@ class NavSelectorGroupComponent {
|
|
|
2290
2423
|
event.stopImmediatePropagation();
|
|
2291
2424
|
this.navSelectorGroupPresenter.unfold(this.group());
|
|
2292
2425
|
}
|
|
2426
|
+
updateAliasBoundedClientRect() {
|
|
2427
|
+
const el = this.aliasEl()?.nativeElement;
|
|
2428
|
+
if (el) {
|
|
2429
|
+
const boundedClientRect = {
|
|
2430
|
+
offsetWidth: el.offsetWidth,
|
|
2431
|
+
offsetHeight: el.offsetHeight,
|
|
2432
|
+
scrollWidth: el.scrollWidth,
|
|
2433
|
+
scrollHeight: el.scrollHeight,
|
|
2434
|
+
};
|
|
2435
|
+
if (JSON.stringify(this.aliasBoundedClientRect()) !== JSON.stringify(boundedClientRect)) {
|
|
2436
|
+
this.aliasBoundedClientRect.set(boundedClientRect);
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2293
2440
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorGroupComponent, deps: [{ token: i0.ElementRef }, { token: NavSelectorGroupPresenter }], target: i0.ɵɵFactoryTarget.Component });
|
|
2294
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorGroupComponent, isStandalone: true, selector: "ap-nav-selector-group", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.arrowLeft": "fold($event)", "keydown.arrowRight": "unfold($event)" }, properties: { "class.minified": "!navSelectorGroupPresenter.expanded()" } }, providers: [withSymbols(apFolder, apErrorFill, apChevronDown, apChevronUp), NavSelectorGroupPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (navSelectorGroupPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\"\n (click)=\"toggleFolding($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (click)=\"eventStopper($event)\"\n (change)=\"onGroupSelected()\" />\n }\n\n <ap-symbol\n symbolId=\"folder\"\n size=\"sm\" />\n\n <span\n #alias\n class=\"caption\">\n {{ group().alias }}\n </span>\n\n @if (group().displayTokenInvalid) {\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n }\n\n @if (group().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ group().counter }}\n </ap-counter>\n }\n\n <ap-symbol\n size=\"sm\"\n class=\"folding-button\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [class.token-invalid]=\"group().displayTokenInvalid\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (click)=\"eventStopper($event)\"\n (change)=\"onGroupSelected()\" />\n }\n\n <div class=\"picture-url-sample-container\">\n <div class=\"picture-url-sample\">\n @for (pictureUrlSample of group().childrenPictureUrlSample; track pictureUrlSample) {\n <ap-avatar\n class=\"avatar-sample\"\n [size]=\"16\"\n [profilePicture]=\"pictureUrlSample.url ?? undefined\"\n [showInitials]=\"pictureUrlSample.initial\" />\n }\n\n <div class=\"status\">\n @if (group().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ group().counter }}\n </ap-counter>\n }\n </div>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=folder]{color:var(--ref-color-grey-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .picture-url-sample-container{position:relative;width:26px}:host .picture-url-sample{display:flex;width:26px;align-items:center;align-content:center;gap:2px;flex-wrap:wrap}:host .avatar-sample{width:12px;height:12px;min-width:12px;max-width:12px;min-height:12px;max-height:12px;--ap-avatar-online-icon-size: 6px;--ap-avatar-symbol-size: 8px;--ap-avatar-network-size: 8px;--ap-avatar-size: 12px;border:.75px solid var(--ref-color-grey-10);box-shadow:none}:host .avatar-sample ::ng-deep img{height:12px;width:12px}:host.minified .content{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);position:relative
|
|
2441
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorGroupComponent, isStandalone: true, selector: "ap-nav-selector-group", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.arrowLeft": "fold($event)", "keydown.arrowRight": "unfold($event)" }, properties: { "class.minified": "!navSelectorGroupPresenter.expanded()" } }, providers: [withSymbols(apFolder, apErrorFill, apChevronDown, apChevronUp), NavSelectorGroupPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (navSelectorGroupPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\"\n (click)=\"toggleFolding($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (click)=\"eventStopper($event)\"\n (change)=\"onGroupSelected()\" />\n }\n\n <ap-symbol\n symbolId=\"folder\"\n size=\"sm\" />\n\n <span\n #alias\n class=\"caption\">\n {{ group().alias }}\n </span>\n\n @if (group().displayTokenInvalid) {\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n }\n\n @if (group().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ group().counter }}\n </ap-counter>\n }\n\n <ap-symbol\n size=\"sm\"\n class=\"folding-button\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [class.token-invalid]=\"group().displayTokenInvalid\"\n [class.multiple-mode]=\"navSelectorGroupPresenter.isMultipleModeEnabled()\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (click)=\"eventStopper($event)\"\n (change)=\"onGroupSelected()\" />\n }\n\n <div class=\"picture-url-sample-container\">\n <div class=\"picture-url-sample\">\n @for (pictureUrlSample of group().childrenPictureUrlSample; track pictureUrlSample) {\n <ap-avatar\n class=\"avatar-sample\"\n [size]=\"16\"\n [profilePicture]=\"pictureUrlSample.url ?? undefined\"\n [showInitials]=\"pictureUrlSample.initial\" />\n }\n\n <div class=\"status\">\n @if (group().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ group().counter }}\n </ap-counter>\n }\n </div>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=folder]{color:var(--ref-color-grey-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .picture-url-sample-container{position:relative;width:26px}:host .picture-url-sample{display:flex;width:26px;align-items:center;align-content:center;gap:2px;flex-wrap:wrap}:host .avatar-sample{width:12px;height:12px;min-width:12px;max-width:12px;min-height:12px;max-height:12px;--ap-avatar-online-icon-size: 6px;--ap-avatar-symbol-size: 8px;--ap-avatar-network-size: 8px;--ap-avatar-size: 12px;border:.75px solid var(--ref-color-grey-10);box-shadow:none}:host .avatar-sample ::ng-deep img{height:12px;width:12px}:host.minified .content{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);position:relative}:host.minified .content:not(.multiple-mode){justify-content:center}:host.minified .content .toggle{display:none}:host.minified .content .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{width:26px;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .picture-url-sample,:host.minified .content:focus-visible .picture-url-sample{display:none}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host.minified .status{position:absolute;right:-12px;top:-2px;background-color:var(--ref-color-white);border-radius:100%}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "background", "notif"] }, { kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }], animations: [
|
|
2295
2442
|
/**
|
|
2296
2443
|
* Overflow hidden is put only during the animation and on the collapsed state because if it is put on the expanded state then children’s border will be cut (hover / focus)
|
|
2297
2444
|
*/
|
|
@@ -2345,7 +2492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
2345
2492
|
animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ maxHeight: '{{maxHeight}}', overflow: 'hidden' }), style({ maxHeight: 0, overflow: 'hidden' })])),
|
|
2346
2493
|
]),
|
|
2347
2494
|
]),
|
|
2348
|
-
], template: "@if (navSelectorGroupPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\"\n (click)=\"toggleFolding($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (click)=\"eventStopper($event)\"\n (change)=\"onGroupSelected()\" />\n }\n\n <ap-symbol\n symbolId=\"folder\"\n size=\"sm\" />\n\n <span\n #alias\n class=\"caption\">\n {{ group().alias }}\n </span>\n\n @if (group().displayTokenInvalid) {\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n }\n\n @if (group().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ group().counter }}\n </ap-counter>\n }\n\n <ap-symbol\n size=\"sm\"\n class=\"folding-button\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [class.token-invalid]=\"group().displayTokenInvalid\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (click)=\"eventStopper($event)\"\n (change)=\"onGroupSelected()\" />\n }\n\n <div class=\"picture-url-sample-container\">\n <div class=\"picture-url-sample\">\n @for (pictureUrlSample of group().childrenPictureUrlSample; track pictureUrlSample) {\n <ap-avatar\n class=\"avatar-sample\"\n [size]=\"16\"\n [profilePicture]=\"pictureUrlSample.url ?? undefined\"\n [showInitials]=\"pictureUrlSample.initial\" />\n }\n\n <div class=\"status\">\n @if (group().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ group().counter }}\n </ap-counter>\n }\n </div>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=folder]{color:var(--ref-color-grey-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .picture-url-sample-container{position:relative;width:26px}:host .picture-url-sample{display:flex;width:26px;align-items:center;align-content:center;gap:2px;flex-wrap:wrap}:host .avatar-sample{width:12px;height:12px;min-width:12px;max-width:12px;min-height:12px;max-height:12px;--ap-avatar-online-icon-size: 6px;--ap-avatar-symbol-size: 8px;--ap-avatar-network-size: 8px;--ap-avatar-size: 12px;border:.75px solid var(--ref-color-grey-10);box-shadow:none}:host .avatar-sample ::ng-deep img{height:12px;width:12px}:host.minified .content{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);position:relative
|
|
2495
|
+
], template: "@if (navSelectorGroupPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\"\n (click)=\"toggleFolding($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (click)=\"eventStopper($event)\"\n (change)=\"onGroupSelected()\" />\n }\n\n <ap-symbol\n symbolId=\"folder\"\n size=\"sm\" />\n\n <span\n #alias\n class=\"caption\">\n {{ group().alias }}\n </span>\n\n @if (group().displayTokenInvalid) {\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n }\n\n @if (group().displayCounter) {\n <ap-counter\n color=\"orange\"\n size=\"normal\"\n [background]=\"false\">\n {{ group().counter }}\n </ap-counter>\n }\n\n <ap-symbol\n size=\"sm\"\n class=\"folding-button\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [class.token-invalid]=\"group().displayTokenInvalid\"\n [class.multiple-mode]=\"navSelectorGroupPresenter.isMultipleModeEnabled()\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"group()\"\n (click)=\"toggleFolding($event)\"\n (keydown.space)=\"onKeydownSpaceOrEnter($event)\"\n (keydown.enter)=\"onKeydownSpaceOrEnter($event)\">\n @if (navSelectorGroupPresenter.isMultipleModeEnabled()) {\n <ap-checkbox\n [name]=\"group().uid\"\n [checked]=\"group().selected\"\n [disabled]=\"!group().selectable\"\n [indeterminate]=\"group().undeterminedSelection\"\n (click)=\"eventStopper($event)\"\n (change)=\"onGroupSelected()\" />\n }\n\n <div class=\"picture-url-sample-container\">\n <div class=\"picture-url-sample\">\n @for (pictureUrlSample of group().childrenPictureUrlSample; track pictureUrlSample) {\n <ap-avatar\n class=\"avatar-sample\"\n [size]=\"16\"\n [profilePicture]=\"pictureUrlSample.url ?? undefined\"\n [showInitials]=\"pictureUrlSample.initial\" />\n }\n\n <div class=\"status\">\n @if (group().displayCounter) {\n <ap-counter\n class=\"counter-override\"\n color=\"orange\"\n size=\"normal\"\n [notif]=\"true\"\n [background]=\"true\">\n {{ group().counter }}\n </ap-counter>\n }\n </div>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of group().children; track child.uid) {\n @if (!child.hidden) {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=error_fill]{color:var(--ref-color-red-100)}:host ap-symbol[symbol-id=folder]{color:var(--ref-color-grey-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-xs)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .picture-url-sample-container{position:relative;width:26px}:host .picture-url-sample{display:flex;width:26px;align-items:center;align-content:center;gap:2px;flex-wrap:wrap}:host .avatar-sample{width:12px;height:12px;min-width:12px;max-width:12px;min-height:12px;max-height:12px;--ap-avatar-online-icon-size: 6px;--ap-avatar-symbol-size: 8px;--ap-avatar-network-size: 8px;--ap-avatar-size: 12px;border:.75px solid var(--ref-color-grey-10);box-shadow:none}:host .avatar-sample ::ng-deep img{height:12px;width:12px}:host.minified .content{gap:var(--ref-spacing-xxxs);padding:var(--ref-spacing-xxxs);position:relative}:host.minified .content:not(.multiple-mode){justify-content:center}:host.minified .content .toggle{display:none}:host.minified .content .counter-override{background-color:var(--ref-color-orange-150)}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{width:26px;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .picture-url-sample,:host.minified .content:focus-visible .picture-url-sample{display:none}:host.minified ::ng-deep ap-checkbox .checkbox .checkbox-container{padding:0}:host.minified .status{position:absolute;right:-12px;top:-2px;background-color:var(--ref-color-white);border-radius:100%}\n"] }]
|
|
2349
2496
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorGroupPresenter }] });
|
|
2350
2497
|
|
|
2351
2498
|
class NavSelectorCategoryPresenter {
|
|
@@ -2381,10 +2528,29 @@ class NavSelectorCategoryComponent {
|
|
|
2381
2528
|
foldSymbol = computed(() => (this.category().folded ? 'chevron-down' : 'chevron-up'));
|
|
2382
2529
|
foldedWithDelay = signal(false);
|
|
2383
2530
|
animationState = computed(() => (this.category().folded ? 'collapsed' : 'expanded'));
|
|
2531
|
+
aliasEl = viewChild('alias');
|
|
2532
|
+
aliasBoundedClientRect = signal({
|
|
2533
|
+
offsetWidth: 0,
|
|
2534
|
+
offsetHeight: 0,
|
|
2535
|
+
scrollWidth: 0,
|
|
2536
|
+
scrollHeight: 0,
|
|
2537
|
+
});
|
|
2538
|
+
tooltipContent = computed(() => {
|
|
2539
|
+
const el = this.aliasBoundedClientRect();
|
|
2540
|
+
if (!this.navSelectorCategoryPresenter.expanded() || el.offsetWidth < el.scrollWidth || el.offsetHeight < el.scrollHeight) {
|
|
2541
|
+
return this.category().alias;
|
|
2542
|
+
}
|
|
2543
|
+
return '';
|
|
2544
|
+
});
|
|
2545
|
+
tooltipDisabled = computed(() => !this.tooltipContent().length);
|
|
2384
2546
|
constructor(el, navSelectorCategoryPresenter) {
|
|
2385
2547
|
this.el = el;
|
|
2386
2548
|
this.navSelectorCategoryPresenter = navSelectorCategoryPresenter;
|
|
2387
|
-
afterNextRender(() =>
|
|
2549
|
+
afterNextRender(() => {
|
|
2550
|
+
this.maxHeight.set(`${this.el.nativeElement.clientHeight * this.category().children.length}px`);
|
|
2551
|
+
this.updateAliasBoundedClientRect();
|
|
2552
|
+
});
|
|
2553
|
+
afterRender(() => untracked(() => this.updateAliasBoundedClientRect()));
|
|
2388
2554
|
effect(() => {
|
|
2389
2555
|
const folded = this.category().folded;
|
|
2390
2556
|
untracked(() => {
|
|
@@ -2398,8 +2564,22 @@ class NavSelectorCategoryComponent {
|
|
|
2398
2564
|
});
|
|
2399
2565
|
}
|
|
2400
2566
|
maxHeight = signal('0px');
|
|
2567
|
+
updateAliasBoundedClientRect() {
|
|
2568
|
+
const el = this.aliasEl()?.nativeElement;
|
|
2569
|
+
if (el) {
|
|
2570
|
+
const boundedClientRect = {
|
|
2571
|
+
offsetWidth: el.offsetWidth,
|
|
2572
|
+
offsetHeight: el.offsetHeight,
|
|
2573
|
+
scrollWidth: el.scrollWidth,
|
|
2574
|
+
scrollHeight: el.scrollHeight,
|
|
2575
|
+
};
|
|
2576
|
+
if (JSON.stringify(this.aliasBoundedClientRect()) !== JSON.stringify(boundedClientRect)) {
|
|
2577
|
+
this.aliasBoundedClientRect.set(boundedClientRect);
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2401
2581
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorCategoryComponent, deps: [{ token: i0.ElementRef }, { token: NavSelectorCategoryPresenter }], target: i0.ɵɵFactoryTarget.Component });
|
|
2402
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorCategoryComponent, isStandalone: true, selector: "ap-nav-selector-category", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.arrowLeft": "navSelectorCategoryPresenter.fold($event, this.category())", "keydown.arrowRight": "navSelectorCategoryPresenter.unfold($event, this.category())" }, properties: { "class.minified": "!navSelectorCategoryPresenter.expanded()" } }, providers: [withSymbols(apChevronDown, apChevronUp), NavSelectorCategoryPresenter], ngImport: i0, template: "@if (navSelectorCategoryPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <span
|
|
2582
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorCategoryComponent, isStandalone: true, selector: "ap-nav-selector-category", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.arrowLeft": "navSelectorCategoryPresenter.fold($event, this.category())", "keydown.arrowRight": "navSelectorCategoryPresenter.unfold($event, this.category())" }, properties: { "class.minified": "!navSelectorCategoryPresenter.expanded()" } }, providers: [withSymbols(apChevronDown, apChevronUp), NavSelectorCategoryPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (navSelectorCategoryPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <span\n #alias\n class=\"caption\">\n {{ category().alias }}\n </span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"child\" />\n }\n </div>\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTreeNodeAccessibility]=\"category()\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <div class=\"name-container\">\n <span class=\"caption\">{{ category().alias }}</span>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"child\" />\n }\n </div>\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--sys-text-style-h4-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .children .entry{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;margin-left:calc(-1 * var(--ref-spacing-xxs));margin-right:calc(-1 * var(--ref-spacing-xxs))}:host .children .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .children .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .children .entry.folder:first-child{padding-top:0}:host .children .entry.folder:last-child{border-bottom:none;padding-bottom:0}:host .children .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):first-child:not(:last-child){padding-top:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):last-child:not(:first-child){padding-bottom:var(--ref-spacing-xxs);border-bottom:none}:host .children .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .children .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host.minified .name-container{overflow:hidden;display:flex}:host.minified .name-container span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block}:host.minified .caption{white-space:nowrap}:host.minified .content{position:relative}:host.minified .content .toggle{position:absolute;display:none}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{inset:0;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .name-container,:host.minified .content:focus-visible .name-container{display:none}\n"], dependencies: [{ kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: NavSelectorGroupComponent, selector: "ap-nav-selector-group", inputs: ["group"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }], animations: [
|
|
2403
2583
|
/**
|
|
2404
2584
|
* Overflow hidden is put only during the animation and on the collapsed state because if it is put on the expanded state then children’s border will be cut (hover / focus)
|
|
2405
2585
|
*/
|
|
@@ -2422,7 +2602,7 @@ class NavSelectorCategoryComponent {
|
|
|
2422
2602
|
}
|
|
2423
2603
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorCategoryComponent, decorators: [{
|
|
2424
2604
|
type: Component,
|
|
2425
|
-
args: [{ selector: 'ap-nav-selector-category', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NavSelectorLeafComponent, SymbolComponent, NavSelectorGroupComponent, TreeNodeAccessibilityDirective], providers: [withSymbols(apChevronDown, apChevronUp), NavSelectorCategoryPresenter], host: {
|
|
2605
|
+
args: [{ selector: 'ap-nav-selector-category', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NavSelectorLeafComponent, SymbolComponent, NavSelectorGroupComponent, TreeNodeAccessibilityDirective, TooltipDirective], providers: [withSymbols(apChevronDown, apChevronUp), NavSelectorCategoryPresenter], host: {
|
|
2426
2606
|
'[class.minified]': '!navSelectorCategoryPresenter.expanded()',
|
|
2427
2607
|
'(keydown.arrowLeft)': 'navSelectorCategoryPresenter.fold($event, this.category())',
|
|
2428
2608
|
'(keydown.arrowRight)': 'navSelectorCategoryPresenter.unfold($event, this.category())',
|
|
@@ -2445,7 +2625,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
2445
2625
|
animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ maxHeight: '{{maxHeight}}' }), style({ overflow: 'hidden', maxHeight: 0 })])),
|
|
2446
2626
|
]),
|
|
2447
2627
|
]),
|
|
2448
|
-
], template: "@if (navSelectorCategoryPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <span
|
|
2628
|
+
], template: "@if (navSelectorCategoryPresenter.expandedAfterDelay()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <span\n #alias\n class=\"caption\">\n {{ category().alias }}\n </span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"child\" />\n }\n </div>\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTreeNodeAccessibility]=\"category()\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, this.category())\">\n <div class=\"name-container\">\n <span class=\"caption\">{{ category().alias }}</span>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight()\n }\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"child\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"child\" />\n }\n </div>\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--sys-text-style-h4-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .children .entry{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;margin-left:calc(-1 * var(--ref-spacing-xxs));margin-right:calc(-1 * var(--ref-spacing-xxs))}:host .children .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .children .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .children .entry.folder:first-child{padding-top:0}:host .children .entry.folder:last-child{border-bottom:none;padding-bottom:0}:host .children .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):first-child:not(:last-child){padding-top:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):last-child:not(:first-child){padding-bottom:var(--ref-spacing-xxs);border-bottom:none}:host .children .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .children .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host.minified .name-container{overflow:hidden;display:flex}:host.minified .name-container span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block}:host.minified .caption{white-space:nowrap}:host.minified .content{position:relative}:host.minified .content .toggle{position:absolute;display:none}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{inset:0;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .name-container,:host.minified .content:focus-visible .name-container{display:none}\n"] }]
|
|
2449
2629
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorCategoryPresenter }] });
|
|
2450
2630
|
|
|
2451
2631
|
let nextUniqueId = 0;
|
|
@@ -2469,6 +2649,7 @@ class NavSelectorComponent {
|
|
|
2469
2649
|
expansionState = computed(() => (this.navSelectorState.expanded() ? 'expanded' : 'minified'));
|
|
2470
2650
|
onExpansionStateChange = output();
|
|
2471
2651
|
componentUid = `nav-selector-${nextUniqueId++}`;
|
|
2652
|
+
ready = signal(false);
|
|
2472
2653
|
constructor(navSelectorState, el) {
|
|
2473
2654
|
this.navSelectorState = navSelectorState;
|
|
2474
2655
|
this.el = el;
|
|
@@ -2479,13 +2660,25 @@ class NavSelectorComponent {
|
|
|
2479
2660
|
}
|
|
2480
2661
|
});
|
|
2481
2662
|
afterNextRender(() => {
|
|
2482
|
-
|
|
2483
|
-
this.navSelectorState.toggleExpanded();
|
|
2484
|
-
}
|
|
2663
|
+
this.ready.set(true);
|
|
2485
2664
|
});
|
|
2486
2665
|
effect(() => {
|
|
2487
2666
|
this.onExpansionStateChange.emit({ expanded: this.navSelectorState.expanded() });
|
|
2488
2667
|
});
|
|
2668
|
+
const minifyOnStartEffect = effect(() => {
|
|
2669
|
+
const ready = this.ready();
|
|
2670
|
+
const embedded = this.embedded();
|
|
2671
|
+
const forceExpanded = this.forceExpanded();
|
|
2672
|
+
const entries = this.navSelectorState.entries();
|
|
2673
|
+
untracked(() => {
|
|
2674
|
+
if (ready && entries.length) {
|
|
2675
|
+
if (!embedded && !forceExpanded && document.body.clientWidth < 1200) {
|
|
2676
|
+
this.navSelectorState.forceMinify();
|
|
2677
|
+
}
|
|
2678
|
+
minifyOnStartEffect.destroy();
|
|
2679
|
+
}
|
|
2680
|
+
});
|
|
2681
|
+
}, { manualCleanup: true });
|
|
2489
2682
|
effect(() => {
|
|
2490
2683
|
const multipleModeEnabled = this.multipleModeEnabled();
|
|
2491
2684
|
const newEntries = this.navSelectorEntries();
|
|
@@ -2568,7 +2761,7 @@ class NavSelectorComponent {
|
|
|
2568
2761
|
}
|
|
2569
2762
|
}
|
|
2570
2763
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: NavSelectorComponent, deps: [{ token: NavSelectorState }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2571
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorComponent, isStandalone: true, selector: "ap-nav-selector", inputs: { navSelectorEntries: { classPropertyName: "navSelectorEntries", publicName: "navSelectorEntries", isSignal: true, isRequired: true, transformFunction: null }, translatedTexts: { classPropertyName: "translatedTexts", publicName: "translatedTexts", isSignal: true, isRequired: true, transformFunction: null }, multipleModeEnabled: { classPropertyName: "multipleModeEnabled", publicName: "multipleModeEnabled", isSignal: true, isRequired: false, transformFunction: null }, detailsDisplayedLimit: { classPropertyName: "detailsDisplayedLimit", publicName: "detailsDisplayedLimit", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, forceExpanded: { classPropertyName: "forceExpanded", publicName: "forceExpanded", isSignal: true, isRequired: false, transformFunction: null }, selectedEntryUids: { classPropertyName: "selectedEntryUids", publicName: "selectedEntryUids", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedEntryUids: "selectedEntryUidsChange", onExpansionStateChange: "onExpansionStateChange" }, host: { attributes: { "role": "tree" }, listeners: { "keydown.arrowDown": "onArrowDown($event)", "keydown.arrowUp": "onArrowUp($event)", "window:resize": "onWindowResize()" }, properties: { "class.minified": "!navSelectorState.expanded()", "class.embedded": "embedded()" } }, providers: [NavSelectorState, withSymbols(apArrowExpand, apArrowReduce, apSearch)], queries: [{ propertyName: "headerProjection", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerProjection", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "leafActionProjection", predicate: ["leafAction"], isSignal: true }], ngImport: i0, template: "<nav [@expand]=\"expansionState()\" [class.embedded]=\"embedded()\">\n @let headerProjectionNotNull = headerProjection();\n @let footerProjectionNotNull = footerProjection();\n\n @if (navSelectorState.expandedAfterDelay()) {\n <div class=\"nav-selector__header\">\n @if (!embedded()) {\n <span class=\"h3\">{{ translatedTexts().title }}</span>\n\n <button\n type=\"button\"\n class=\"expand-button expanded\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-reduce\" />\n </button>\n }\n\n\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-input-search\n [id]=\"componentUid + '_search'\"\n class=\"nav-selector-search\"\n [placeholder]=\"translatedTexts().searchPlaceholder\"\n [ngModel]=\"navSelectorState.search()\"\n (ngModelChange)=\"navSelectorState.search.set($event ?? '')\" />\n </div>\n\n <div\n class=\"nav-selector__content\"\n [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\"\n role=\"tree\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\" [class.folder]=\"entry.type === 'GROUP' || entry.type === 'CATEGORY'\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"$any(entry)\" />\n }\n </div>\n }\n }\n @if (navSelectorState.noResults()) {\n <div class=\"no-result\">{{ translatedTexts().noResults }}</div>\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n } @else {\n <div class=\"nav-selector__header\">\n <button\n type=\"button\"\n class=\"expand-button\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-expand\" />\n </button>\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-icon-button (onClick)=\"onMinifiedSearchClicked()\" type=\"stroked\" role=\"search\">\n <ap-symbol symbolId=\"search\" />\n </ap-icon-button>\n </div>\n\n <div class=\"nav-selector__content\" role=\"tree\" [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\" [class.folder]=\"entry.type === 'GROUP' || entry.type === 'CATEGORY'\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"entry\" />\n }\n </div>\n }\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n }\n</nav>\n", styles: [":host{display:flex;flex-direction:column;align-items:flex-start;flex-shrink:0;flex-grow:1;width:100%;max-width:224px;min-width:224px}@media only screen and (min-width: 1400px){:host:not(.embedded){max-width:250px;min-width:250px}}:host :hover .expand-button.expanded{animation-name:translateExpandButton}:host nav{display:flex;height:100%;width:100%;flex-grow:1;flex-direction:column;align-items:flex-start;flex-shrink:0;overflow:hidden;background:var(--ref-color-white)}:host nav:not(.embedded){border-right:1px solid var(--ref-color-grey-10)}:host .nav-selector__header{position:relative;display:flex;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;gap:8px;align-self:stretch;border-bottom:1px solid var(--ref-color-grey-10);background:var(--ref-color-white)}:host .nav-selector__header .h3{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--sys-text-style-h3-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-lg)}:host .nav-selector__header .expand-button-container{position:absolute;right:0;top:var(--ref-spacing-xs)}:host .nav-selector__header .expand-button{animation-duration:70ms;animation-timing-function:cubic-bezier(0,0,.2,1);animation-fill-mode:forwards;animation-name:translateHideButton;display:flex;width:24px;height:24px;justify-content:center;align-items:center;background:var(--ref-color-grey-bg);border-top:1px solid var(--ref-color-grey-20);border-right:none;border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm);cursor:pointer}@keyframes translateHideButton{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes translateExpandButton{0%{transform:translate(100%)}to{transform:translate(0)}}:host .nav-selector__header .expand-button.expanded{position:absolute;right:0;top:12px;transform:translate(100%)}:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-reduce],:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-expand]{color:var(--ref-color-grey-80)}:host .nav-selector__header .expand-button:focus{border-radius:var(--ref-border-radius-sm) 0px 0px var(--ref-border-radius-sm);border-top:1px solid var(--ref-color-grey-20);border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-10);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector__header .expand-button:focus.expanded{animation-name:translateExpandButton}:host .nav-selector__header .expand-button:hover{background-color:var(--ref-color-grey-10)}:host .nav-selector__header .expand-button:active{background-color:var(--ref-color-grey-20)}:host .nav-selector__header .nav-selector-search{width:100%}:host .nav-selector__content{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;overflow:auto}:host .nav-selector__content .entry{align-self:stretch;display:flex;flex-direction:column}:host .nav-selector__content .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .nav-selector__content .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):first-child{padding-top:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):last-child{padding-bottom:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host .nav-selector__content .no-result{display:flex;padding:var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;color:var(--ref-color-grey-80);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:italic;font-weight:400;line-height:var(--ref-font-line-height-sm)}:host .nav-selector__footer{display:flex;padding:var(--ref-spacing-xs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs);align-self:stretch;border-top:1px solid var(--sys-border-color-default);background:var(--ref-color-white)}:host.minified nav{width:64px}:host.minified nav .nav-selector__header{align-items:center}:host.minified nav .nav-selector__header .expand-button{animation-name:none;border-radius:var(--ref-border-radius-sm);border:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-bg)}:host.minified nav .nav-selector__content .entry{padding:var(--ref-spacing-xxxs)}:host.minified nav .nav-selector__footer{padding:var(--ref-spacing-xs) var(--ref-spacing-xxxs) var(--ref-spacing-xs) var(--ref-spacing-xxxs)}\n"], dependencies: [{ kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"] }, { kind: "component", type: NavSelectorGroupComponent, selector: "ap-nav-selector-group", inputs: ["group"] }, { kind: "component", type: NavSelectorCategoryComponent, selector: "ap-nav-selector-category", inputs: ["category"] }, { kind: "component", type: InputSearchComponent, selector: "ap-input-search", inputs: ["id", "placeholder", "clearable"], outputs: ["focus", "blur", "keyup"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: IconButtonComponent, selector: "ap-icon-button", inputs: ["ariaLabel", "name", "color", "disabled", "menuTrigger", "symbolId", "locked", "loading", "type"], outputs: ["onClick", "onFocus", "onBlur", "menuOpened", "menuClosed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
|
|
2764
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: NavSelectorComponent, isStandalone: true, selector: "ap-nav-selector", inputs: { navSelectorEntries: { classPropertyName: "navSelectorEntries", publicName: "navSelectorEntries", isSignal: true, isRequired: true, transformFunction: null }, translatedTexts: { classPropertyName: "translatedTexts", publicName: "translatedTexts", isSignal: true, isRequired: true, transformFunction: null }, multipleModeEnabled: { classPropertyName: "multipleModeEnabled", publicName: "multipleModeEnabled", isSignal: true, isRequired: false, transformFunction: null }, detailsDisplayedLimit: { classPropertyName: "detailsDisplayedLimit", publicName: "detailsDisplayedLimit", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, forceExpanded: { classPropertyName: "forceExpanded", publicName: "forceExpanded", isSignal: true, isRequired: false, transformFunction: null }, selectedEntryUids: { classPropertyName: "selectedEntryUids", publicName: "selectedEntryUids", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedEntryUids: "selectedEntryUidsChange", onExpansionStateChange: "onExpansionStateChange" }, host: { attributes: { "role": "tree" }, listeners: { "keydown.arrowDown": "onArrowDown($event)", "keydown.arrowUp": "onArrowUp($event)", "window:resize": "onWindowResize()" }, properties: { "class.minified": "!navSelectorState.expanded()", "class.embedded": "embedded()" } }, providers: [NavSelectorState, withSymbols(apArrowExpand, apArrowReduce, apSearch)], queries: [{ propertyName: "headerProjection", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerProjection", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "leafActionProjection", predicate: ["leafAction"], isSignal: true }], ngImport: i0, template: "<nav [@expand]=\"expansionState()\" [class.embedded]=\"embedded()\">\n @let headerProjectionNotNull = headerProjection();\n @let footerProjectionNotNull = footerProjection();\n\n @if (navSelectorState.expandedAfterDelay()) {\n <div class=\"nav-selector__header\">\n @if (!embedded()) {\n <span class=\"h3\">{{ translatedTexts().title }}</span>\n\n <button\n type=\"button\"\n class=\"expand-button expanded\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-reduce\" />\n </button>\n }\n\n\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-input-search\n [id]=\"componentUid + '_search'\"\n class=\"nav-selector-search\"\n [placeholder]=\"translatedTexts().searchPlaceholder\"\n [ngModel]=\"navSelectorState.search()\"\n (ngModelChange)=\"navSelectorState.search.set($event ?? '')\" />\n </div>\n\n <div\n class=\"nav-selector__content\"\n [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\"\n role=\"tree\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\" [class.folder]=\"entry.type === 'GROUP' || entry.type === 'CATEGORY'\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"$any(entry)\" />\n }\n </div>\n }\n }\n @if (navSelectorState.noResults()) {\n <div class=\"no-result\">{{ translatedTexts().noResults }}</div>\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n } @else {\n <div class=\"nav-selector__header\">\n <button\n type=\"button\"\n class=\"expand-button\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-expand\" />\n </button>\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-icon-button (onClick)=\"onMinifiedSearchClicked()\" type=\"stroked\" role=\"search\">\n <ap-symbol symbolId=\"search\" />\n </ap-icon-button>\n </div>\n\n <div class=\"nav-selector__content\" role=\"tree\" [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\" [class.folder]=\"entry.type === 'GROUP' || entry.type === 'CATEGORY'\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"entry\" />\n }\n </div>\n }\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n }\n</nav>\n", styles: [":host{display:flex;flex-direction:column;align-items:flex-start;flex-shrink:0;flex-grow:1;width:100%;max-width:224px;min-width:224px}@media only screen and (min-width: 1400px){:host:not(.embedded){max-width:250px;min-width:250px}}:host :hover .expand-button.expanded{animation-name:translateExpandButton}:host nav{display:flex;height:100%;width:100%;flex-grow:1;flex-direction:column;align-items:flex-start;flex-shrink:0;overflow:hidden;background:var(--ref-color-white)}:host nav:not(.embedded){border-right:1px solid var(--ref-color-grey-10)}:host .nav-selector__header{position:relative;display:flex;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;gap:8px;align-self:stretch;border-bottom:1px solid var(--ref-color-grey-10);background:var(--ref-color-white)}:host .nav-selector__header .h3{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--sys-text-style-h3-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-lg)}:host .nav-selector__header .expand-button-container{position:absolute;right:0;top:var(--ref-spacing-xs)}:host .nav-selector__header .expand-button{animation-duration:70ms;animation-timing-function:cubic-bezier(0,0,.2,1);animation-fill-mode:forwards;animation-name:translateHideButton;display:flex;width:24px;height:24px;justify-content:center;align-items:center;background:var(--ref-color-grey-bg);border-top:1px solid var(--ref-color-grey-20);border-right:none;border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm);cursor:pointer}@keyframes translateHideButton{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes translateExpandButton{0%{transform:translate(100%)}to{transform:translate(0)}}:host .nav-selector__header .expand-button.expanded{position:absolute;right:0;top:12px;transform:translate(100%)}:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-reduce],:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-expand]{color:var(--ref-color-grey-80)}:host .nav-selector__header .expand-button:focus{border-radius:var(--ref-border-radius-sm) 0px 0px var(--ref-border-radius-sm);border-top:1px solid var(--ref-color-grey-20);border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-10);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector__header .expand-button:focus.expanded{animation-name:translateExpandButton}:host .nav-selector__header .expand-button:hover{background-color:var(--ref-color-grey-10)}:host .nav-selector__header .expand-button:active{background-color:var(--ref-color-grey-20)}:host .nav-selector__header .nav-selector-search{width:100%}:host .nav-selector__content{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;overflow:auto;scrollbar-gutter:stable both-edges}:host .nav-selector__content .entry{align-self:stretch;display:flex;flex-direction:column}:host .nav-selector__content .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .nav-selector__content .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):first-child{padding-top:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):last-child{padding-bottom:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host .nav-selector__content .no-result{display:flex;padding:var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;color:var(--ref-color-grey-80);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:italic;font-weight:400;line-height:var(--ref-font-line-height-sm)}:host .nav-selector__footer{display:flex;padding:var(--ref-spacing-xs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs);align-self:stretch;border-top:1px solid var(--sys-border-color-default);background:var(--ref-color-white)}:host.minified nav{width:64px}:host.minified nav .nav-selector__header{align-items:center}:host.minified nav .nav-selector__header .expand-button{animation-name:none;border-radius:var(--ref-border-radius-sm);border:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-bg)}:host.minified nav .nav-selector__content .entry{padding:var(--ref-spacing-xxxs)}:host.minified nav .nav-selector__footer{padding:var(--ref-spacing-xs) var(--ref-spacing-xxxs) var(--ref-spacing-xs) var(--ref-spacing-xxxs)}\n"], dependencies: [{ kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"] }, { kind: "component", type: NavSelectorGroupComponent, selector: "ap-nav-selector-group", inputs: ["group"] }, { kind: "component", type: NavSelectorCategoryComponent, selector: "ap-nav-selector-category", inputs: ["category"] }, { kind: "component", type: InputSearchComponent, selector: "ap-input-search", inputs: ["id", "placeholder", "clearable"], outputs: ["focus", "blur", "keyup"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: IconButtonComponent, selector: "ap-icon-button", inputs: ["ariaLabel", "name", "color", "disabled", "menuTrigger", "symbolId", "locked", "loading", "type"], outputs: ["onClick", "onFocus", "onBlur", "menuOpened", "menuClosed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
|
|
2572
2765
|
trigger('expand', [
|
|
2573
2766
|
state('expanded', style({ width: '100%' })),
|
|
2574
2767
|
state('minified', style({ width: '64px' })),
|
|
@@ -2606,12 +2799,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
2606
2799
|
// Force animation to do not be with 100% instantly
|
|
2607
2800
|
keyframes([style({ width: '64px' }), style({ width: '50%' }), style({ width: '100%' })]))),
|
|
2608
2801
|
]),
|
|
2609
|
-
], template: "<nav [@expand]=\"expansionState()\" [class.embedded]=\"embedded()\">\n @let headerProjectionNotNull = headerProjection();\n @let footerProjectionNotNull = footerProjection();\n\n @if (navSelectorState.expandedAfterDelay()) {\n <div class=\"nav-selector__header\">\n @if (!embedded()) {\n <span class=\"h3\">{{ translatedTexts().title }}</span>\n\n <button\n type=\"button\"\n class=\"expand-button expanded\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-reduce\" />\n </button>\n }\n\n\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-input-search\n [id]=\"componentUid + '_search'\"\n class=\"nav-selector-search\"\n [placeholder]=\"translatedTexts().searchPlaceholder\"\n [ngModel]=\"navSelectorState.search()\"\n (ngModelChange)=\"navSelectorState.search.set($event ?? '')\" />\n </div>\n\n <div\n class=\"nav-selector__content\"\n [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\"\n role=\"tree\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\" [class.folder]=\"entry.type === 'GROUP' || entry.type === 'CATEGORY'\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"$any(entry)\" />\n }\n </div>\n }\n }\n @if (navSelectorState.noResults()) {\n <div class=\"no-result\">{{ translatedTexts().noResults }}</div>\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n } @else {\n <div class=\"nav-selector__header\">\n <button\n type=\"button\"\n class=\"expand-button\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-expand\" />\n </button>\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-icon-button (onClick)=\"onMinifiedSearchClicked()\" type=\"stroked\" role=\"search\">\n <ap-symbol symbolId=\"search\" />\n </ap-icon-button>\n </div>\n\n <div class=\"nav-selector__content\" role=\"tree\" [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\" [class.folder]=\"entry.type === 'GROUP' || entry.type === 'CATEGORY'\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"entry\" />\n }\n </div>\n }\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n }\n</nav>\n", styles: [":host{display:flex;flex-direction:column;align-items:flex-start;flex-shrink:0;flex-grow:1;width:100%;max-width:224px;min-width:224px}@media only screen and (min-width: 1400px){:host:not(.embedded){max-width:250px;min-width:250px}}:host :hover .expand-button.expanded{animation-name:translateExpandButton}:host nav{display:flex;height:100%;width:100%;flex-grow:1;flex-direction:column;align-items:flex-start;flex-shrink:0;overflow:hidden;background:var(--ref-color-white)}:host nav:not(.embedded){border-right:1px solid var(--ref-color-grey-10)}:host .nav-selector__header{position:relative;display:flex;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;gap:8px;align-self:stretch;border-bottom:1px solid var(--ref-color-grey-10);background:var(--ref-color-white)}:host .nav-selector__header .h3{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--sys-text-style-h3-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-lg)}:host .nav-selector__header .expand-button-container{position:absolute;right:0;top:var(--ref-spacing-xs)}:host .nav-selector__header .expand-button{animation-duration:70ms;animation-timing-function:cubic-bezier(0,0,.2,1);animation-fill-mode:forwards;animation-name:translateHideButton;display:flex;width:24px;height:24px;justify-content:center;align-items:center;background:var(--ref-color-grey-bg);border-top:1px solid var(--ref-color-grey-20);border-right:none;border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm);cursor:pointer}@keyframes translateHideButton{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes translateExpandButton{0%{transform:translate(100%)}to{transform:translate(0)}}:host .nav-selector__header .expand-button.expanded{position:absolute;right:0;top:12px;transform:translate(100%)}:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-reduce],:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-expand]{color:var(--ref-color-grey-80)}:host .nav-selector__header .expand-button:focus{border-radius:var(--ref-border-radius-sm) 0px 0px var(--ref-border-radius-sm);border-top:1px solid var(--ref-color-grey-20);border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-10);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector__header .expand-button:focus.expanded{animation-name:translateExpandButton}:host .nav-selector__header .expand-button:hover{background-color:var(--ref-color-grey-10)}:host .nav-selector__header .expand-button:active{background-color:var(--ref-color-grey-20)}:host .nav-selector__header .nav-selector-search{width:100%}:host .nav-selector__content{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;overflow:auto}:host .nav-selector__content .entry{align-self:stretch;display:flex;flex-direction:column}:host .nav-selector__content .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .nav-selector__content .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):first-child{padding-top:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):last-child{padding-bottom:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host .nav-selector__content .no-result{display:flex;padding:var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;color:var(--ref-color-grey-80);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:italic;font-weight:400;line-height:var(--ref-font-line-height-sm)}:host .nav-selector__footer{display:flex;padding:var(--ref-spacing-xs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs);align-self:stretch;border-top:1px solid var(--sys-border-color-default);background:var(--ref-color-white)}:host.minified nav{width:64px}:host.minified nav .nav-selector__header{align-items:center}:host.minified nav .nav-selector__header .expand-button{animation-name:none;border-radius:var(--ref-border-radius-sm);border:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-bg)}:host.minified nav .nav-selector__content .entry{padding:var(--ref-spacing-xxxs)}:host.minified nav .nav-selector__footer{padding:var(--ref-spacing-xs) var(--ref-spacing-xxxs) var(--ref-spacing-xs) var(--ref-spacing-xxxs)}\n"] }]
|
|
2802
|
+
], template: "<nav [@expand]=\"expansionState()\" [class.embedded]=\"embedded()\">\n @let headerProjectionNotNull = headerProjection();\n @let footerProjectionNotNull = footerProjection();\n\n @if (navSelectorState.expandedAfterDelay()) {\n <div class=\"nav-selector__header\">\n @if (!embedded()) {\n <span class=\"h3\">{{ translatedTexts().title }}</span>\n\n <button\n type=\"button\"\n class=\"expand-button expanded\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-reduce\" />\n </button>\n }\n\n\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-input-search\n [id]=\"componentUid + '_search'\"\n class=\"nav-selector-search\"\n [placeholder]=\"translatedTexts().searchPlaceholder\"\n [ngModel]=\"navSelectorState.search()\"\n (ngModelChange)=\"navSelectorState.search.set($event ?? '')\" />\n </div>\n\n <div\n class=\"nav-selector__content\"\n [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\"\n role=\"tree\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\" [class.folder]=\"entry.type === 'GROUP' || entry.type === 'CATEGORY'\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"$any(entry)\" />\n }\n </div>\n }\n }\n @if (navSelectorState.noResults()) {\n <div class=\"no-result\">{{ translatedTexts().noResults }}</div>\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n } @else {\n <div class=\"nav-selector__header\">\n <button\n type=\"button\"\n class=\"expand-button\"\n (click)=\"navSelectorState.toggleExpanded()\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"arrow-expand\" />\n </button>\n @if (headerProjectionNotNull) {\n <ng-container\n [ngTemplateOutlet]=\"headerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n }\n\n <ap-icon-button (onClick)=\"onMinifiedSearchClicked()\" type=\"stroked\" role=\"search\">\n <ap-symbol symbolId=\"search\" />\n </ap-icon-button>\n </div>\n\n <div class=\"nav-selector__content\" role=\"tree\" [attr.aria-multiselectable]=\"navSelectorState.isMultipleModeEnabled()\">\n @for (entry of navSelectorState.entries(); track entry.uid) {\n @if (!entry.hidden) {\n <div class=\"entry\" [class.folder]=\"entry.type === 'GROUP' || entry.type === 'CATEGORY'\">\n @if (entry.type === 'LEAF') {\n <ap-nav-selector-leaf [leaf]=\"entry\" />\n } @else if (entry.type === 'GROUP') {\n <ap-nav-selector-group [group]=\"entry\" />\n } @else if (entry.type === 'CATEGORY') {\n <ap-nav-selector-category [category]=\"entry\" />\n }\n </div>\n }\n }\n </div>\n\n @if (displayFooter() && footerProjectionNotNull) {\n <div class=\"nav-selector__footer\">\n <ng-container\n [ngTemplateOutlet]=\"footerProjectionNotNull\"\n [ngTemplateOutletContext]=\"{\n expanded: navSelectorState.expanded()\n }\" />\n </div>\n }\n }\n</nav>\n", styles: [":host{display:flex;flex-direction:column;align-items:flex-start;flex-shrink:0;flex-grow:1;width:100%;max-width:224px;min-width:224px}@media only screen and (min-width: 1400px){:host:not(.embedded){max-width:250px;min-width:250px}}:host :hover .expand-button.expanded{animation-name:translateExpandButton}:host nav{display:flex;height:100%;width:100%;flex-grow:1;flex-direction:column;align-items:flex-start;flex-shrink:0;overflow:hidden;background:var(--ref-color-white)}:host nav:not(.embedded){border-right:1px solid var(--ref-color-grey-10)}:host .nav-selector__header{position:relative;display:flex;padding:var(--ref-spacing-xs) var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;gap:8px;align-self:stretch;border-bottom:1px solid var(--ref-color-grey-10);background:var(--ref-color-white)}:host .nav-selector__header .h3{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--sys-text-style-h3-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-lg)}:host .nav-selector__header .expand-button-container{position:absolute;right:0;top:var(--ref-spacing-xs)}:host .nav-selector__header .expand-button{animation-duration:70ms;animation-timing-function:cubic-bezier(0,0,.2,1);animation-fill-mode:forwards;animation-name:translateHideButton;display:flex;width:24px;height:24px;justify-content:center;align-items:center;background:var(--ref-color-grey-bg);border-top:1px solid var(--ref-color-grey-20);border-right:none;border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm);cursor:pointer}@keyframes translateHideButton{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes translateExpandButton{0%{transform:translate(100%)}to{transform:translate(0)}}:host .nav-selector__header .expand-button.expanded{position:absolute;right:0;top:12px;transform:translate(100%)}:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-reduce],:host .nav-selector__header .expand-button ap-symbol[symbol-id=arrow-expand]{color:var(--ref-color-grey-80)}:host .nav-selector__header .expand-button:focus{border-radius:var(--ref-border-radius-sm) 0px 0px var(--ref-border-radius-sm);border-top:1px solid var(--ref-color-grey-20);border-bottom:1px solid var(--ref-color-grey-20);border-left:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-10);box-shadow:0 0 0 1px #fff,0 0 0 3px #178dfe}:host .nav-selector__header .expand-button:focus.expanded{animation-name:translateExpandButton}:host .nav-selector__header .expand-button:hover{background-color:var(--ref-color-grey-10)}:host .nav-selector__header .expand-button:active{background-color:var(--ref-color-grey-20)}:host .nav-selector__header .nav-selector-search{width:100%}:host .nav-selector__content{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;overflow:auto;scrollbar-gutter:stable both-edges}:host .nav-selector__content .entry{align-self:stretch;display:flex;flex-direction:column}:host .nav-selector__content .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .nav-selector__content .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):first-child{padding-top:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):last-child{padding-bottom:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .nav-selector__content .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host .nav-selector__content .no-result{display:flex;padding:var(--ref-spacing-sm);flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;color:var(--ref-color-grey-80);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:italic;font-weight:400;line-height:var(--ref-font-line-height-sm)}:host .nav-selector__footer{display:flex;padding:var(--ref-spacing-xs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs);align-self:stretch;border-top:1px solid var(--sys-border-color-default);background:var(--ref-color-white)}:host.minified nav{width:64px}:host.minified nav .nav-selector__header{align-items:center}:host.minified nav .nav-selector__header .expand-button{animation-name:none;border-radius:var(--ref-border-radius-sm);border:1px solid var(--ref-color-grey-20);background:var(--ref-color-grey-bg)}:host.minified nav .nav-selector__content .entry{padding:var(--ref-spacing-xxxs)}:host.minified nav .nav-selector__footer{padding:var(--ref-spacing-xs) var(--ref-spacing-xxxs) var(--ref-spacing-xs) var(--ref-spacing-xxxs)}\n"] }]
|
|
2610
2803
|
}], ctorParameters: () => [{ type: NavSelectorState }, { type: i0.ElementRef }] });
|
|
2611
2804
|
|
|
2612
2805
|
/**
|
|
2613
2806
|
* Generated bundle index. Do not edit.
|
|
2614
2807
|
*/
|
|
2615
2808
|
|
|
2616
|
-
export { NavSelectorComponent };
|
|
2809
|
+
export { NavSelectorComponent, NavSelectorPopoverItemComponent };
|
|
2617
2810
|
//# sourceMappingURL=agorapulse-ui-components-nav-selector.mjs.map
|