@agorapulse/ui-components 22.10.4-beta.1 → 22.10.6
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-22.10.6.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +25 -19
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-select.mjs +13 -6
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/package.json +1 -1
- package/agorapulse-ui-components-22.10.4-beta.1.tgz +0 -0
|
Binary file
|
|
@@ -2,7 +2,7 @@ import * as i1 from '@agorapulse/ui-components/directives';
|
|
|
2
2
|
import { BaseButtonDirective } from '@agorapulse/ui-components/directives';
|
|
3
3
|
import { SymbolComponent, withSymbols, apFeatureLock, apErrorFill, SymbolRegistry, apChevronDown, apChevronUp, apFolder, apArrowExpand, apArrowReduce, apSearch } from '@agorapulse/ui-symbol';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { input, inject, ChangeDetectionStrategy, Component,
|
|
5
|
+
import { input, inject, ChangeDetectionStrategy, Component, computed, Directive, effect, untracked, signal, Injectable, contentChildren, ElementRef, DestroyRef, output, viewChild, model, contentChild, afterNextRender } from '@angular/core';
|
|
6
6
|
import { IconButtonComponent } from '@agorapulse/ui-components/icon-button';
|
|
7
7
|
import { InputSearchComponent } from '@agorapulse/ui-components/input-search';
|
|
8
8
|
import { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';
|
|
@@ -104,31 +104,33 @@ const isInternalNavSelectorEntryALeafDetails = (entry) => entry.type === 'LEAF_D
|
|
|
104
104
|
class TreeNodeAccessibilityDirective {
|
|
105
105
|
apTreeNodeAccessibility = input.required(/* @ts-ignore */
|
|
106
106
|
...(ngDevMode ? [{ debugName: "apTreeNodeAccessibility" }] : /* istanbul ignore next */ []));
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
renderer.setAttribute(nativeEl, 'aria-expanded', `${entry.folded}`);
|
|
118
|
-
}
|
|
119
|
-
renderer.setAttribute(nativeEl, 'role', 'treeitem');
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TreeNodeAccessibilityDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
123
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TreeNodeAccessibilityDirective, isStandalone: true, selector: "[apTreeNodeAccessibility]", inputs: { apTreeNodeAccessibility: { classPropertyName: "apTreeNodeAccessibility", publicName: "apTreeNodeAccessibility", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
107
|
+
ariaExpanded = computed(() => {
|
|
108
|
+
const entry = this.apTreeNodeAccessibility();
|
|
109
|
+
if (!('folded' in entry) || (isInternalNavSelectorEntryALeaf(entry) && !entry.foldable)) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
return !entry.folded;
|
|
113
|
+
}, /* @ts-ignore */
|
|
114
|
+
...(ngDevMode ? [{ debugName: "ariaExpanded" }] : /* istanbul ignore next */ []));
|
|
115
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TreeNodeAccessibilityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
116
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TreeNodeAccessibilityDirective, isStandalone: true, selector: "[apTreeNodeAccessibility]", inputs: { apTreeNodeAccessibility: { classPropertyName: "apTreeNodeAccessibility", publicName: "apTreeNodeAccessibility", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "treeitem" }, properties: { "attr.aria-level": "apTreeNodeAccessibility().accessibility.ariaLevel", "attr.aria-setsize": "apTreeNodeAccessibility().accessibility.ariaSetsize", "attr.aria-posinset": "apTreeNodeAccessibility().accessibility.ariaPosinset", "attr.tabindex": "apTreeNodeAccessibility().accessibility.tabIndex", "attr.aria-label": "apTreeNodeAccessibility().alias", "attr.aria-expanded": "ariaExpanded()" } }, ngImport: i0 });
|
|
124
117
|
}
|
|
125
118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TreeNodeAccessibilityDirective, decorators: [{
|
|
126
119
|
type: Directive,
|
|
127
120
|
args: [{
|
|
128
121
|
selector: '[apTreeNodeAccessibility]',
|
|
129
122
|
standalone: true,
|
|
123
|
+
host: {
|
|
124
|
+
role: 'treeitem',
|
|
125
|
+
'[attr.aria-level]': 'apTreeNodeAccessibility().accessibility.ariaLevel',
|
|
126
|
+
'[attr.aria-setsize]': 'apTreeNodeAccessibility().accessibility.ariaSetsize',
|
|
127
|
+
'[attr.aria-posinset]': 'apTreeNodeAccessibility().accessibility.ariaPosinset',
|
|
128
|
+
'[attr.tabindex]': 'apTreeNodeAccessibility().accessibility.tabIndex',
|
|
129
|
+
'[attr.aria-label]': 'apTreeNodeAccessibility().alias',
|
|
130
|
+
'[attr.aria-expanded]': 'ariaExpanded()',
|
|
131
|
+
},
|
|
130
132
|
}]
|
|
131
|
-
}],
|
|
133
|
+
}], propDecorators: { apTreeNodeAccessibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "apTreeNodeAccessibility", required: true }] }] } });
|
|
132
134
|
|
|
133
135
|
class NavSelectorPopoverTriggerDirective {
|
|
134
136
|
el;
|
|
@@ -2481,11 +2483,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2481
2483
|
|
|
2482
2484
|
/**
|
|
2483
2485
|
* Height of the host element, fed by a ResizeObserver so reading it never forces a synchronous layout.
|
|
2486
|
+
* Stays at 0 where ResizeObserver does not exist (jsdom, server rendering).
|
|
2484
2487
|
* Must be called in an injection context.
|
|
2485
2488
|
*/
|
|
2486
2489
|
const injectHostHeight = () => {
|
|
2487
2490
|
const height = signal(0, /* @ts-ignore */
|
|
2488
2491
|
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
2492
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
2493
|
+
return height.asReadonly();
|
|
2494
|
+
}
|
|
2489
2495
|
const observer = new ResizeObserver(([entry]) => height.set(entry.contentRect.height));
|
|
2490
2496
|
observer.observe(inject(ElementRef).nativeElement);
|
|
2491
2497
|
inject(DestroyRef).onDestroy(() => observer.disconnect());
|