@odx/angular 12.14.2 → 12.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +9 -10
  3. package/components/anchor-navigation/README.md +3 -0
  4. package/components/anchor-navigation/anchor-navigation.component.d.ts +31 -0
  5. package/components/anchor-navigation/anchor-navigation.module.d.ts +8 -0
  6. package/components/anchor-navigation/anchor-navigation.service.d.ts +43 -0
  7. package/components/anchor-navigation/components/anchor-navigation-item.component.d.ts +10 -0
  8. package/components/anchor-navigation/components/index.d.ts +1 -0
  9. package/components/anchor-navigation/index.d.ts +4 -0
  10. package/esm2022/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +15 -15
  11. package/esm2022/components/anchor-navigation/anchor-navigation.component.mjs +60 -0
  12. package/esm2022/components/anchor-navigation/anchor-navigation.module.mjs +18 -0
  13. package/esm2022/components/anchor-navigation/anchor-navigation.service.mjs +119 -0
  14. package/esm2022/components/anchor-navigation/components/anchor-navigation-item.component.mjs +32 -0
  15. package/esm2022/components/anchor-navigation/components/index.mjs +2 -0
  16. package/esm2022/components/anchor-navigation/index.mjs +5 -0
  17. package/esm2022/components/anchor-navigation/odx-angular-components-anchor-navigation.mjs +5 -0
  18. package/fesm2022/odx-angular-components-accordion.mjs +14 -14
  19. package/fesm2022/odx-angular-components-accordion.mjs.map +1 -1
  20. package/fesm2022/odx-angular-components-anchor-navigation.mjs +220 -0
  21. package/fesm2022/odx-angular-components-anchor-navigation.mjs.map +1 -0
  22. package/package.json +7 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @odx/angular
2
2
 
3
+ ## 12.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0265299: fix: expand/collapse animations are changed to css animations from angular
8
+
9
+ ## 12.15.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 16a5991: New component: Anchor Navigation
14
+
15
+ ### Patch Changes
16
+
17
+ - b20f2f7: fix: update active anchor link handling and improve styles for anchor navigation
18
+
3
19
  ## 12.14.2
4
20
 
5
21
  ### Patch Changes
@@ -1,4 +1,3 @@
1
- import { EventEmitter } from '@angular/core';
2
1
  import { ExpandableItemDirective } from '@odx/angular/cdk/expandable';
3
2
  import * as i0 from "@angular/core";
4
3
  import * as i1 from "@odx/angular/cdk/expandable";
@@ -15,17 +14,17 @@ export declare class AccordionItemComponent {
15
14
  protected readonly expandableItem: ExpandableItemDirective;
16
15
  readonly element: import("@angular/core").ElementRef<HTMLElement>;
17
16
  /**
18
- * The title of the accordion item.
19
- *
20
- * @type {string | null}
17
+ * The title for the accordion item. This is an `InputSignal`.
18
+ * @default null
21
19
  */
22
- title?: string | null;
20
+ title: import("@angular/core").InputSignal<string | null>;
23
21
  /**
24
- * Event emitter for the expanded state change of the accordion item.
22
+ * Emits when the expanded state of the accordion item changes.
23
+ * This is an `OutputEmitterRef`.
25
24
  *
26
- * @emits {boolean} The expanded state of the accordion item.
25
+ * The emitted value is the new expanded state.
27
26
  */
28
- expandedChange: EventEmitter<boolean>;
27
+ expandedChange: import("@angular/core").OutputEmitterRef<boolean>;
29
28
  /**
30
29
  * Gets a value indicating whether the accordion item is disabled.
31
30
  *
@@ -52,7 +51,7 @@ export declare class AccordionItemComponent {
52
51
  * @returns {string} The slot ID.
53
52
  */
54
53
  get slotId(): string;
55
- protected onAnimationEnd(): void;
54
+ protected onTransitionEnd(): void;
56
55
  static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
57
- static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemComponent, "odx-accordion-item", never, { "title": { "alias": "title"; "required": false; }; }, { "expandedChange": "expandedChange"; }, never, ["odx-accordion-item-title", "*"], true, [{ directive: typeof i1.ExpandableItemDirective; inputs: { "expanded": "expanded"; "id": "id"; }; outputs: {}; }]>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemComponent, "odx-accordion-item", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; }, { "expandedChange": "expandedChange"; }, never, ["odx-accordion-item-title", "*"], true, [{ directive: typeof i1.ExpandableItemDirective; inputs: { "expanded": "expanded"; "id": "id"; }; outputs: {}; }]>;
58
57
  }
@@ -0,0 +1,3 @@
1
+ # @odx/angular/components/anchor-navigation
2
+
3
+ Secondary entry point of `@odx/angular`. It can be used by importing from `@odx/angular/components/anchor-navigation`.
@@ -0,0 +1,31 @@
1
+ import { AnchorNavigationItemComponent } from './components';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AnchorNavigationComponent {
4
+ private readonly service;
5
+ readonly element: import("@angular/core").ElementRef<HTMLElement>;
6
+ /**
7
+ * A Signal with list of `AnchorLinkDirective` instances projected into this component.
8
+ * These are the anchor links that this navigation component will manage.
9
+ */
10
+ readonly projectedAnchorLinks: import("@angular/core").Signal<readonly AnchorNavigationItemComponent[]>;
11
+ /**
12
+ * Input to determine if the anchor navigation should be displayed vertically.
13
+ * Defaults to `false` (horizontal).
14
+ */
15
+ vertical: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
16
+ /**
17
+ * Input to specify the scrollable container element or document whose scroll position
18
+ * is used to determine the active anchor link. If not provided, defaults to the
19
+ * `document` of the current window.
20
+ */
21
+ scrollableContainer: import("@angular/core").InputSignal<HTMLElement | Document | undefined>;
22
+ readonly activeAnchorLink: import("@angular/core").WritableSignal<AnchorNavigationItemComponent | null>;
23
+ constructor();
24
+ /**
25
+ * Scrolls the view to the section associated with the given `AnchorLinkDirective`.
26
+ * @param anchor The `AnchorLinkDirective` instance representing the target anchor/section.
27
+ */
28
+ scrollToAnchor(anchor: AnchorNavigationItemComponent): void;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnchorNavigationComponent, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnchorNavigationComponent, "odx-anchor-navigation", never, { "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "scrollableContainer": { "alias": "root"; "required": false; "isSignal": true; }; }, {}, ["projectedAnchorLinks"], ["odx-anchor-navigation-item"], true, never>;
31
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./anchor-navigation.component";
3
+ import * as i2 from "./components/anchor-navigation-item.component";
4
+ export declare class AnchorNavigationModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnchorNavigationModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AnchorNavigationModule, never, [typeof i1.AnchorNavigationComponent, typeof i2.AnchorNavigationItemComponent], [typeof i1.AnchorNavigationComponent, typeof i2.AnchorNavigationItemComponent]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<AnchorNavigationModule>;
8
+ }
@@ -0,0 +1,43 @@
1
+ import { OnDestroy, WritableSignal } from '@angular/core';
2
+ import { AnchorNavigationItemComponent } from './components/anchor-navigation-item.component';
3
+ import * as i0 from "@angular/core";
4
+ export declare class AnchorNavigationService implements OnDestroy {
5
+ private readonly windowRef;
6
+ private intersectionObserver?;
7
+ private readonly intersectionStates;
8
+ private readonly targetScrollSections;
9
+ /**
10
+ * A WritableSignal holding the scrollable container element or document.
11
+ * This is set by the AnchorNavigationComponent.
12
+ * Defaults to the window's document.
13
+ */
14
+ scrollableContainer: WritableSignal<HTMLElement | Document>;
15
+ /**
16
+ * A WritableSignal holding an array of `AnchorLinkDirective` instances.
17
+ * These are the links managed by the service, typically set by the `AnchorNavigationComponent`
18
+ * based on its projected content.
19
+ */
20
+ projectedAnchorLinks: WritableSignal<readonly AnchorNavigationItemComponent[]>;
21
+ /**
22
+ * A readonly Signal indicating the currently active AnchorLinkDirective.
23
+ * This is updated by the service based on scroll position and intersection.
24
+ */
25
+ readonly activeAnchorLink: WritableSignal<AnchorNavigationItemComponent | null>;
26
+ constructor();
27
+ ngOnDestroy(): void;
28
+ /**
29
+ * Scrolls the view to the section associated with the given `AnchorLinkDirective`
30
+ * and sets it as the active link.
31
+ *
32
+ * @param anchor The `AnchorLinkDirective` instance representing the target anchor/section.
33
+ * If null or if the anchor's ID is not found, a warning is logged and the method returns.
34
+ */
35
+ scrollToAnchor(anchor: AnchorNavigationItemComponent | null): void;
36
+ private initIntersectionObserver;
37
+ private updateObservedElements;
38
+ private onIntersectionUpdate;
39
+ private findTargetScrollSections;
40
+ private disconnectObserver;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnchorNavigationService, never>;
42
+ static ɵprov: i0.ɵɵInjectableDeclaration<AnchorNavigationService>;
43
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AnchorNavigationItemComponent {
3
+ private readonly navigationService;
4
+ readonly element: import("@angular/core").ElementRef<HTMLElement>;
5
+ href: import("@angular/core").InputSignal<string>;
6
+ isActive: import("@angular/core").Signal<boolean>;
7
+ protected handleClick(e: Event): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnchorNavigationItemComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnchorNavigationItemComponent, "odx-anchor-navigation-item", never, { "href": { "alias": "href"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
10
+ }
@@ -0,0 +1 @@
1
+ export * from './anchor-navigation-item.component';
@@ -0,0 +1,4 @@
1
+ export * from './anchor-navigation.component';
2
+ export * from './anchor-navigation.module';
3
+ export * from './anchor-navigation.service';
4
+ export * from './components';
@@ -1,8 +1,6 @@
1
1
  import { __decorate } from "tslib";
2
- import { transition, trigger, useAnimation } from '@angular/animations';
3
- import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation, inject } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject, input, output } from '@angular/core';
4
3
  import { CoreModule, DisabledController } from '@odx/angular';
5
- import { collapse, expand } from '@odx/angular/animations';
6
4
  import { A11yModule } from '@odx/angular/cdk/a11y';
7
5
  import { ExpandableItemDirective } from '@odx/angular/cdk/expandable';
8
6
  import { IconComponent } from '@odx/angular/components/icon';
@@ -25,11 +23,17 @@ let AccordionItemComponent = class AccordionItemComponent {
25
23
  this.expandableItem = inject(ExpandableItemDirective, { self: true });
26
24
  this.element = injectElement();
27
25
  /**
28
- * Event emitter for the expanded state change of the accordion item.
26
+ * The title for the accordion item. This is an `InputSignal`.
27
+ * @default null
28
+ */
29
+ this.title = input(null);
30
+ /**
31
+ * Emits when the expanded state of the accordion item changes.
32
+ * This is an `OutputEmitterRef`.
29
33
  *
30
- * @emits {boolean} The expanded state of the accordion item.
34
+ * The emitted value is the new expanded state.
31
35
  */
32
- this.expandedChange = new EventEmitter();
36
+ this.expandedChange = output();
33
37
  }
34
38
  /**
35
39
  * Gets a value indicating whether the accordion item is disabled.
@@ -65,11 +69,11 @@ let AccordionItemComponent = class AccordionItemComponent {
65
69
  get slotId() {
66
70
  return `${this.expandableItem.id}-slot`;
67
71
  }
68
- onAnimationEnd() {
72
+ onTransitionEnd() {
69
73
  this.expandedChange.emit(this.expandableItem.expanded);
70
74
  }
71
75
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
72
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: AccordionItemComponent, isStandalone: true, selector: "odx-accordion-item", inputs: { title: "title" }, outputs: { expandedChange: "expandedChange" }, host: { properties: { "class.is-disabled": "isDisabled", "class.odx-accordion-item--expanded": "isExpanded", "attr.id": "expandableItem.id", "attr.title": "null" } }, providers: [DisabledController.connect()], hostDirectives: [{ directive: i1.ExpandableItemDirective, inputs: ["expanded", "expanded", "id", "id"] }], ngImport: i0, template: "<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title) {\n <div>{{ title }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n@if (isExpanded) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" @expandSlotAnimation (@expandSlotAnimation.done)=\"onAnimationEnd()\">\n <ng-content />\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.InteractiveDirective, selector: "[odxCdkInteractive]", outputs: ["odxCdkInteractive"] }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }], animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
76
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: AccordionItemComponent, isStandalone: true, selector: "odx-accordion-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedChange: "expandedChange" }, host: { properties: { "class.is-disabled": "isDisabled", "class.odx-accordion-item--expanded": "isExpanded", "attr.id": "expandableItem.id", "attr.title": "null" } }, providers: [DisabledController.connect()], hostDirectives: [{ directive: i1.ExpandableItemDirective, inputs: ["expanded", "expanded", "id", "id"] }], ngImport: i0, template: "<div\n #button\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title()) {\n <div>{{ title() }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n\n@defer (on viewport(button)) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd()\">\n <div class=\"odx-accordion-item__slot-content\">\n <ng-content />\n </div>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.InteractiveDirective, selector: "[odxCdkInteractive]", outputs: ["odxCdkInteractive"] }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
73
77
  };
74
78
  AccordionItemComponent = __decorate([
75
79
  CSSComponent('accordion-item')
@@ -82,10 +86,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
82
86
  '[class.odx-accordion-item--expanded]': 'isExpanded',
83
87
  '[attr.id]': 'expandableItem.id',
84
88
  '[attr.title]': 'null',
85
- }, animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], template: "<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title) {\n <div>{{ title }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n@if (isExpanded) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" @expandSlotAnimation (@expandSlotAnimation.done)=\"onAnimationEnd()\">\n <ng-content />\n </div>\n}\n" }]
86
- }], propDecorators: { title: [{
87
- type: Input
88
- }], expandedChange: [{
89
- type: Output
90
- }] } });
91
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lbGVjdD1cIm9keC1hY2NvcmRpb24taXRlbS10aXRsZVwiIC8+XG4gIH1cblxuICA8b2R4LWljb24gY2xhc3M9XCJvZHgtYWNjb3JkaW9uLWl0ZW1fX2ljb25cIiBuYW1lPVwiY2hldnJvbi1kb3duXCIgaWNvblNldD1cImNvcmVcIiAvPlxuPC9kaXY+XG5AaWYgKGlzRXhwYW5kZWQpIHtcbiAgPGRpdiBjbGFzcz1cIm9keC1hY2NvcmRpb24taXRlbV9fc2xvdFwiIFthdHRyLmlkXT1cInNsb3RJZFwiIFthdHRyLmFyaWEtbGFiZWxsZWRieV09XCJ0aXRsZUlkXCIgQGV4cGFuZFNsb3RBbmltYXRpb24gKEBleHBhbmRTbG90QW5pbWF0aW9uLmRvbmUpPVwib25BbmltYXRpb25FbmQoKVwiPlxuICAgIDxuZy1jb250ZW50IC8+XG4gIDwvZGl2PlxufVxuIl19
89
+ }, template: "<div\n #button\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title()) {\n <div>{{ title() }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n\n@defer (on viewport(button)) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd()\">\n <div class=\"odx-accordion-item__slot-content\">\n <ng-content />\n </div>\n </div>\n}\n" }]
90
+ }] });
91
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbm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pY29uXCIgbmFtZT1cImNoZXZyb24tZG93blwiIGljb25TZXQ9XCJjb3JlXCIgLz5cbjwvZGl2PlxuXG5AZGVmZXIgKG9uIHZpZXdwb3J0KGJ1dHRvbikpIHtcbiAgPGRpdiBjbGFzcz1cIm9keC1hY2NvcmRpb24taXRlbV9fc2xvdFwiIFthdHRyLmlkXT1cInNsb3RJZFwiIFthdHRyLmFyaWEtbGFiZWxsZWRieV09XCJ0aXRsZUlkXCIgKHRyYW5zaXRpb25lbmQpPVwib25UcmFuc2l0aW9uRW5kKClcIj5cbiAgICA8ZGl2IGNsYXNzPVwib2R4LWFjY29yZGlvbi1pdGVtX19zbG90LWNvbnRlbnRcIj5cbiAgICAgIDxuZy1jb250ZW50IC8+XG4gICAgPC9kaXY+XG4gIDwvZGl2PlxufVxuIl19
@@ -0,0 +1,60 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { booleanAttribute, ChangeDetectionStrategy, Component, contentChildren, effect, inject, input, ViewEncapsulation } from '@angular/core';
3
+ import { CSSComponent } from '@odx/angular/internal';
4
+ import { injectElement } from '@odx/angular/utils';
5
+ import { AnchorNavigationService } from './anchor-navigation.service';
6
+ import { AnchorNavigationItemComponent } from './components';
7
+ import * as i0 from "@angular/core";
8
+ let AnchorNavigationComponent = class AnchorNavigationComponent {
9
+ constructor() {
10
+ this.service = inject(AnchorNavigationService);
11
+ this.element = injectElement();
12
+ /**
13
+ * A Signal with list of `AnchorLinkDirective` instances projected into this component.
14
+ * These are the anchor links that this navigation component will manage.
15
+ */
16
+ this.projectedAnchorLinks = contentChildren(AnchorNavigationItemComponent);
17
+ /**
18
+ * Input to determine if the anchor navigation should be displayed vertically.
19
+ * Defaults to `false` (horizontal).
20
+ */
21
+ this.vertical = input(false, { transform: booleanAttribute });
22
+ /**
23
+ * Input to specify the scrollable container element or document whose scroll position
24
+ * is used to determine the active anchor link. If not provided, defaults to the
25
+ * `document` of the current window.
26
+ */
27
+ // eslint-disable-next-line @angular-eslint/no-input-rename
28
+ this.scrollableContainer = input(undefined, { alias: 'root' });
29
+ this.activeAnchorLink = this.service.activeAnchorLink;
30
+ effect(() => {
31
+ this.service.projectedAnchorLinks.set(this.projectedAnchorLinks());
32
+ const rcInput = this.scrollableContainer();
33
+ if (rcInput !== undefined) {
34
+ this.service.scrollableContainer.set(rcInput);
35
+ }
36
+ }, { allowSignalWrites: true });
37
+ }
38
+ /**
39
+ * Scrolls the view to the section associated with the given `AnchorLinkDirective`.
40
+ * @param anchor The `AnchorLinkDirective` instance representing the target anchor/section.
41
+ */
42
+ scrollToAnchor(anchor) {
43
+ this.service.scrollToAnchor(anchor);
44
+ }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: AnchorNavigationComponent, isStandalone: true, selector: "odx-anchor-navigation", inputs: { vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, scrollableContainer: { classPropertyName: "scrollableContainer", publicName: "root", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.odx-anchor-navigation--vertical": "vertical()", "attr.role": "\"navigation\"" } }, providers: [AnchorNavigationService], queries: [{ propertyName: "projectedAnchorLinks", predicate: AnchorNavigationItemComponent, isSignal: true }], ngImport: i0, template: "<ng-content select=\"odx-anchor-navigation-item\" />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
47
+ };
48
+ AnchorNavigationComponent = __decorate([
49
+ CSSComponent('anchor-navigation'),
50
+ __metadata("design:paramtypes", [])
51
+ ], AnchorNavigationComponent);
52
+ export { AnchorNavigationComponent };
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationComponent, decorators: [{
54
+ type: Component,
55
+ args: [{ selector: 'odx-anchor-navigation', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, encapsulation: ViewEncapsulation.None, providers: [AnchorNavigationService], host: {
56
+ '[class.odx-anchor-navigation--vertical]': 'vertical()',
57
+ '[attr.role]': '"navigation"',
58
+ }, template: "<ng-content select=\"odx-anchor-navigation-item\" />\n" }]
59
+ }], ctorParameters: () => [] });
60
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jaG9yLW5hdmlnYXRpb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyL2NvbXBvbmVudHMvYW5jaG9yLW5hdmlnYXRpb24vc3JjL2FuY2hvci1uYXZpZ2F0aW9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci9jb21wb25lbnRzL2FuY2hvci1uYXZpZ2F0aW9uL3NyYy9hbmNob3ItbmF2aWdhdGlvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLGdCQUFnQixFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxlQUFlLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDaEosT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ3JELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNuRCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUN0RSxPQUFPLEVBQUUsNkJBQTZCLEVBQUUsTUFBTSxjQUFjLENBQUM7O0FBZXRELElBQU0seUJBQXlCLEdBQS9CL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7XG4gICAgICAgIGNvbnN0IHJjSW5wdXQgPSB0aGlzLnNjcm9sbGFibGVDb250YWluZXIoKTtcblxuICAgICAgICBpZiAocmNJbnB1dCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgdGhpcy5zZXJ2aWNlLnNjcm9sbGFibGVDb250YWluZXIuc2V0KHJjSW5wdXQpO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgeyBhbGxvd1NpZ25hbFdyaXRlczogdHJ1ZSB9LFxuICAgICk7XG4gIH1cblxuICAvKipcbiAgICogU2Nyb2xscyB0aGUgdmlldyB0byB0aGUgc2VjdGlvbiBhc3NvY2lhdGVkIHdpdGggdGhlIGdpdmVuIGBBbmNob3JMaW5rRGlyZWN0aXZlYC5cbiAgICogQHBhcmFtIGFuY2hvciBUaGUgYEFuY2hvckxpbmtEaXJlY3RpdmVgIGluc3RhbmNlIHJlcHJlc2VudGluZyB0aGUgdGFyZ2V0IGFuY2hvci9zZWN0aW9uLlxuICAgKi9cbiAgcHVibGljIHNjcm9sbFRvQW5jaG9yKGFuY2hvcjogQW5jaG9yTmF2aWdhdGlvbkl0ZW1Db21wb25lbnQpOiB2b2lkIHtcbiAgICB0aGlzLnNlcnZpY2Uuc2Nyb2xsVG9BbmNob3IoYW5jaG9yKTtcbiAgfVxufVxuIiwiPG5nLWNvbnRlbnQgc2VsZWN0PVwib2R4LWFuY2hvci1uYXZpZ2F0aW9uLWl0ZW1cIiAvPlxuIl19
@@ -0,0 +1,18 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { AnchorNavigationComponent } from './anchor-navigation.component';
3
+ import { AnchorNavigationItemComponent } from './components';
4
+ import * as i0 from "@angular/core";
5
+ const modules = [AnchorNavigationComponent, AnchorNavigationItemComponent];
6
+ export class AnchorNavigationModule {
7
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
8
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationModule, imports: [AnchorNavigationComponent, AnchorNavigationItemComponent], exports: [AnchorNavigationComponent, AnchorNavigationItemComponent] }); }
9
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationModule }); }
10
+ }
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationModule, decorators: [{
12
+ type: NgModule,
13
+ args: [{
14
+ imports: modules,
15
+ exports: modules,
16
+ }]
17
+ }] });
18
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jaG9yLW5hdmlnYXRpb24ubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyL2NvbXBvbmVudHMvYW5jaG9yLW5hdmlnYXRpb24vc3JjL2FuY2hvci1uYXZpZ2F0aW9uLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQzFFLE9BQU8sRUFBRSw2QkFBNkIsRUFBRSxNQUFNLGNBQWMsQ0FBQzs7QUFFN0QsTUFBTSxPQUFPLEdBQUcsQ0FBQyx5QkFBeUIsRUFBRSw2QkFBNkIsQ0FBQyxDQUFDO0FBTTNFLE1BQU0sT0FBTyxzQkFBc0I7K0dBQXRCLHNCQUFzQjtnSEFBdEIsc0JBQXNCLFlBTmxCLHlCQUF5QixFQUFFLDZCQUE2QixhQUF4RCx5QkFBeUIsRUFBRSw2QkFBNkI7Z0hBTTVELHNCQUFzQjs7NEZBQXRCLHNCQUFzQjtrQkFKbEMsUUFBUTttQkFBQztvQkFDUixPQUFPLEVBQUUsT0FBTztvQkFDaEIsT0FBTyxFQUFFLE9BQU87aUJBQ2pCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IEFuY2hvck5hdmlnYXRpb25Db21wb25lbnQgfSBmcm9tICcuL2FuY2hvci1uYXZpZ2F0aW9uLmNvbXBvbmVudCc7XG5pbXBvcnQgeyBBbmNob3JOYXZpZ2F0aW9uSXRlbUNvbXBvbmVudCB9IGZyb20gJy4vY29tcG9uZW50cyc7XG5cbmNvbnN0IG1vZHVsZXMgPSBbQW5jaG9yTmF2aWdhdGlvbkNvbXBvbmVudCwgQW5jaG9yTmF2aWdhdGlvbkl0ZW1Db21wb25lbnRdO1xuXG5ATmdNb2R1bGUoe1xuICBpbXBvcnRzOiBtb2R1bGVzLFxuICBleHBvcnRzOiBtb2R1bGVzLFxufSlcbmV4cG9ydCBjbGFzcyBBbmNob3JOYXZpZ2F0aW9uTW9kdWxlIHt9XG4iXX0=
@@ -0,0 +1,119 @@
1
+ import { computed, effect, inject, Injectable, signal } from '@angular/core';
2
+ import { WindowRef } from '@odx/angular';
3
+ import * as i0 from "@angular/core";
4
+ export class AnchorNavigationService {
5
+ constructor() {
6
+ this.windowRef = inject(WindowRef);
7
+ this.intersectionStates = new Map();
8
+ this.targetScrollSections = computed(() => this.findTargetScrollSections());
9
+ /**
10
+ * A WritableSignal holding the scrollable container element or document.
11
+ * This is set by the AnchorNavigationComponent.
12
+ * Defaults to the window's document.
13
+ */
14
+ this.scrollableContainer = signal(this.windowRef.document);
15
+ /**
16
+ * A WritableSignal holding an array of `AnchorLinkDirective` instances.
17
+ * These are the links managed by the service, typically set by the `AnchorNavigationComponent`
18
+ * based on its projected content.
19
+ */
20
+ this.projectedAnchorLinks = signal([]);
21
+ /**
22
+ * A readonly Signal indicating the currently active AnchorLinkDirective.
23
+ * This is updated by the service based on scroll position and intersection.
24
+ */
25
+ this.activeAnchorLink = signal(null);
26
+ effect((onCleanup) => {
27
+ const currentRoot = this.scrollableContainer();
28
+ const currentLinks = this.projectedAnchorLinks();
29
+ if (!currentLinks.length) {
30
+ this.disconnectObserver();
31
+ return;
32
+ }
33
+ this.initIntersectionObserver(currentRoot);
34
+ this.updateObservedElements();
35
+ onCleanup(() => {
36
+ this.disconnectObserver();
37
+ });
38
+ });
39
+ }
40
+ ngOnDestroy() {
41
+ this.disconnectObserver();
42
+ }
43
+ /**
44
+ * Scrolls the view to the section associated with the given `AnchorLinkDirective`
45
+ * and sets it as the active link.
46
+ *
47
+ * @param anchor The `AnchorLinkDirective` instance representing the target anchor/section.
48
+ * If null or if the anchor's ID is not found, a warning is logged and the method returns.
49
+ */
50
+ scrollToAnchor(anchor) {
51
+ const anchorId = anchor?.href();
52
+ if (!anchorId) {
53
+ console.warn(`[AnchorNavigationService] Attempted to scroll to an anchor without an ID.`);
54
+ return;
55
+ }
56
+ const anchorElement = this.scrollableContainer().querySelector(`#${CSS.escape(anchorId)}`);
57
+ if (!anchorElement) {
58
+ console.warn(`[AnchorNavigationService] Anchor with ID "${anchorId}" not found in the root container.`);
59
+ return;
60
+ }
61
+ anchorElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
62
+ }
63
+ initIntersectionObserver(root) {
64
+ if (this.intersectionObserver) {
65
+ this.intersectionObserver.disconnect();
66
+ }
67
+ this.intersectionObserver = new IntersectionObserver((entries) => this.onIntersectionUpdate(entries), {
68
+ root: root === this.windowRef.document ? null : root,
69
+ threshold: 0.1,
70
+ });
71
+ }
72
+ updateObservedElements() {
73
+ if (!this.intersectionObserver)
74
+ return;
75
+ this.intersectionObserver.disconnect();
76
+ this.intersectionStates.clear();
77
+ const sections = this.targetScrollSections();
78
+ sections.forEach((section) => {
79
+ if (section) {
80
+ this.intersectionStates.set(section, false);
81
+ this.intersectionObserver.observe(section);
82
+ }
83
+ });
84
+ }
85
+ onIntersectionUpdate(entries) {
86
+ entries.forEach((entry) => this.intersectionStates.set(entry.target, entry.isIntersecting));
87
+ let newActiveCandidate = null;
88
+ const currentSections = this.targetScrollSections();
89
+ for (const section of currentSections) {
90
+ if (this.intersectionStates.get(section) === true) {
91
+ newActiveCandidate = this.projectedAnchorLinks().find((link) => link.href() === section.id) || null;
92
+ break;
93
+ }
94
+ }
95
+ if (this.activeAnchorLink() !== newActiveCandidate)
96
+ this.activeAnchorLink.set(newActiveCandidate);
97
+ }
98
+ findTargetScrollSections() {
99
+ const currentLinks = this.projectedAnchorLinks();
100
+ if (!currentLinks.length)
101
+ return [];
102
+ const selectors = currentLinks
103
+ .map((link) => link.href())
104
+ .filter(Boolean)
105
+ .map((id) => `#${CSS.escape(id)}`)
106
+ .join(',');
107
+ return selectors ? Array.from(this.scrollableContainer().querySelectorAll(selectors)) : [];
108
+ }
109
+ disconnectObserver() {
110
+ this.intersectionObserver?.disconnect();
111
+ this.intersectionObserver = undefined;
112
+ }
113
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
114
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationService }); }
115
+ }
116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationService, decorators: [{
117
+ type: Injectable
118
+ }], ctorParameters: () => [] });
119
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jaG9yLW5hdmlnYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci9jb21wb25lbnRzL2FuY2hvci1uYXZp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Nob3JMaW5rKCkgIT09IG5ld0FjdGl2ZUNhbmRpZGF0ZSkgdGhpcy5hY3RpdmVBbmNob3JMaW5rLnNldChuZXdBY3RpdmVDYW5kaWRhdGUpO1xuICB9XG5cbiAgcHJpdmF0ZSBmaW5kVGFyZ2V0U2Nyb2xsU2VjdGlvbnMoKTogSFRNTEVsZW1lbnRbXSB7XG4gICAgY29uc3QgY3VycmVudExpbmtzID0gdGhpcy5wcm9qZWN0ZWRBbmNob3JMaW5rcygpO1xuICAgIGlmICghY3VycmVudExpbmtzLmxlbmd0aCkgcmV0dXJuIFtdO1xuXG4gICAgY29uc3Qgc2VsZWN0b3JzID0gY3VycmVudExpbmtzXG4gICAgICAubWFwKChsaW5rKSA9PiBsaW5rLmhyZWYoKSlcbiAgICAgIC5maWx0ZXIoQm9vbGVhbilcbiAgICAgIC5tYXAoKGlkKSA9PiBgIyR7Q1NTLmVzY2FwZShpZCl9YClcbiAgICAgIC5qb2luKCcsJyk7XG4gICAgcmV0dXJuIHNlbGVjdG9ycyA/IEFycmF5LmZyb20odGhpcy5zY3JvbGxhYmxlQ29udGFpbmVyKCkucXVlcnlTZWxlY3RvckFsbDxIVE1MRWxlbWVudD4oc2VsZWN0b3JzKSkgOiBbXTtcbiAgfVxuXG4gIHByaXZhdGUgZGlzY29ubmVjdE9ic2VydmVyKCk6IHZvaWQge1xuICAgIHRoaXMuaW50ZXJzZWN0aW9uT2JzZXJ2ZXI/LmRpc2Nvbm5lY3QoKTtcbiAgICB0aGlzLmludGVyc2VjdGlvbk9ic2VydmVyID0gdW5kZWZpbmVkO1xuICB9XG59XG4iXX0=
@@ -0,0 +1,32 @@
1
+ import { __decorate } from "tslib";
2
+ import { ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation } from '@angular/core';
3
+ import { LinkDirective } from '@odx/angular/components/link';
4
+ import { CSSComponent } from '@odx/angular/internal';
5
+ import { injectElement } from '@odx/angular/utils';
6
+ import { AnchorNavigationService } from '../anchor-navigation.service';
7
+ import * as i0 from "@angular/core";
8
+ let AnchorNavigationItemComponent = class AnchorNavigationItemComponent {
9
+ constructor() {
10
+ this.navigationService = inject(AnchorNavigationService);
11
+ this.element = injectElement();
12
+ this.href = input.required();
13
+ this.isActive = computed(() => this.navigationService.activeAnchorLink() === this);
14
+ }
15
+ handleClick(e) {
16
+ e.preventDefault();
17
+ this.navigationService.scrollToAnchor(this);
18
+ }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: AnchorNavigationItemComponent, isStandalone: true, selector: "odx-anchor-navigation-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.is-active": "isActive()" } }, ngImport: i0, template: "<a odxLink [href]=\"'#' + href()\" (click)=\"handleClick($event)\" (keydown.space)=\"handleClick($event)\" [attr.aria-current]=\"isActive() ? 'page' : null\">\n <ng-content />\n</a>\n", dependencies: [{ kind: "directive", type: LinkDirective, selector: "a[odxLink]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
21
+ };
22
+ AnchorNavigationItemComponent = __decorate([
23
+ CSSComponent('anchor-navigation-item')
24
+ ], AnchorNavigationItemComponent);
25
+ export { AnchorNavigationItemComponent };
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationItemComponent, decorators: [{
27
+ type: Component,
28
+ args: [{ selector: 'odx-anchor-navigation-item', standalone: true, imports: [LinkDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
29
+ '[class.is-active]': 'isActive()',
30
+ }, template: "<a odxLink [href]=\"'#' + href()\" (click)=\"handleClick($event)\" (keydown.space)=\"handleClick($event)\" [attr.aria-current]=\"isActive() ? 'page' : null\">\n <ng-content />\n</a>\n" }]
31
+ }] });
32
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jaG9yLW5hdmlnYXRpb24taXRlbS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXIvY29tcG9uZW50cy9hbmNob3ItbmF2aWdhdGlvbi9zcmMvY29tcG9uZW50cy9hbmNob3ItbmF2aWdhdGlvbi1pdGVtLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci9jb21wb25lbnRzL2FuY2hvci1uYXZpZ2F0aW9uL3NyYy9jb21wb25lbnRzL2FuY2hvci1uYXZpZ2F0aW9uLWl0ZW0uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDL0csT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQzdELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUNyRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDbkQsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sOEJBQThCLENBQUM7O0FBY2hFLElBQU0sNkJBQTZCLEdBQW5DLE1BQU0sNkJBQTZCO0lBQW5DO1FBQ1ksc0JBQWlCLEdBQUcsTUFBTSxDQUFDLHVCQUF1QixDQUFDLENBQUM7UUFDckQsWUFBTyxHQUFHLGFBQWEsRUFBRSxDQUFD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GljayhlOiBFdmVudCk6IHZvaWQge1xuICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICB0aGlzLm5hdmlnYXRpb25TZXJ2aWNlLnNjcm9sbFRvQW5jaG9yKHRoaXMpO1xuICB9XG59XG4iLCI8YSBvZHhMaW5rIFtocmVmXT1cIicjJyArIGhyZWYoKVwiIChjbGljayk9XCJoYW5kbGVDbGljaygkZXZlbnQpXCIgKGtleWRvd24uc3BhY2UpPVwiaGFuZGxlQ2xpY2soJGV2ZW50KVwiIFthdHRyLmFyaWEtY3VycmVudF09XCJpc0FjdGl2ZSgpID8gJ3BhZ2UnIDogbnVsbFwiPlxuICA8bmctY29udGVudCAvPlxuPC9hPlxuIl19
@@ -0,0 +1,2 @@
1
+ export * from './anchor-navigation-item.component';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXIvY29tcG9uZW50cy9hbmNob3ItbmF2aWdhdGlvbi9zcmMvY29tcG9uZW50cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9DQUFvQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9hbmNob3ItbmF2aWdhdGlvbi1pdGVtLmNvbXBvbmVudCc7XG4iXX0=
@@ -0,0 +1,5 @@
1
+ export * from './anchor-navigation.component';
2
+ export * from './anchor-navigation.module';
3
+ export * from './anchor-navigation.service';
4
+ export * from './components';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXIvY29tcG9uZW50cy9hbmNob3ItbmF2aWdhdGlvbi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywrQkFBK0IsQ0FBQztBQUM5QyxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2FuY2hvci1uYXZpZ2F0aW9uLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2FuY2hvci1uYXZpZ2F0aW9uLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2FuY2hvci1uYXZpZ2F0aW9uLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9jb21wb25lbnRzJztcbiJdfQ==
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2R4LWFuZ3VsYXItY29tcG9uZW50cy1hbmNob3ItbmF2aWdhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci9jb21wb25lbnRzL2FuY2hvci1uYXZpZ2F0aW9uL3NyYy9vZHgtYW5ndWxhci1jb21wb25lbnRzLWFuY2hvci1uYXZpZ2F0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -1,13 +1,11 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { Component, ChangeDetectionStrategy, ViewEncapsulation, inject, EventEmitter, Input, Output, Directive, NgModule } from '@angular/core';
3
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, inject, input, output, Directive, NgModule } from '@angular/core';
4
4
  import * as i1 from '@odx/angular/cdk/expandable';
5
5
  import { ExpandableContainerDirective, ExpandableItemDirective } from '@odx/angular/cdk/expandable';
6
6
  import { CSSComponent } from '@odx/angular/internal';
7
7
  import { injectElement } from '@odx/angular/utils';
8
8
  import { DisabledController, CoreModule } from '@odx/angular';
9
- import { trigger, transition, useAnimation } from '@angular/animations';
10
- import { expand, collapse } from '@odx/angular/animations';
11
9
  import * as i2 from '@odx/angular/cdk/a11y';
12
10
  import { A11yModule } from '@odx/angular/cdk/a11y';
13
11
  import { IconComponent } from '@odx/angular/components/icon';
@@ -49,11 +47,17 @@ let AccordionItemComponent = class AccordionItemComponent {
49
47
  this.expandableItem = inject(ExpandableItemDirective, { self: true });
50
48
  this.element = injectElement();
51
49
  /**
52
- * Event emitter for the expanded state change of the accordion item.
50
+ * The title for the accordion item. This is an `InputSignal`.
51
+ * @default null
52
+ */
53
+ this.title = input(null);
54
+ /**
55
+ * Emits when the expanded state of the accordion item changes.
56
+ * This is an `OutputEmitterRef`.
53
57
  *
54
- * @emits {boolean} The expanded state of the accordion item.
58
+ * The emitted value is the new expanded state.
55
59
  */
56
- this.expandedChange = new EventEmitter();
60
+ this.expandedChange = output();
57
61
  }
58
62
  /**
59
63
  * Gets a value indicating whether the accordion item is disabled.
@@ -89,11 +93,11 @@ let AccordionItemComponent = class AccordionItemComponent {
89
93
  get slotId() {
90
94
  return `${this.expandableItem.id}-slot`;
91
95
  }
92
- onAnimationEnd() {
96
+ onTransitionEnd() {
93
97
  this.expandedChange.emit(this.expandableItem.expanded);
94
98
  }
95
99
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
96
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: AccordionItemComponent, isStandalone: true, selector: "odx-accordion-item", inputs: { title: "title" }, outputs: { expandedChange: "expandedChange" }, host: { properties: { "class.is-disabled": "isDisabled", "class.odx-accordion-item--expanded": "isExpanded", "attr.id": "expandableItem.id", "attr.title": "null" } }, providers: [DisabledController.connect()], hostDirectives: [{ directive: i1.ExpandableItemDirective, inputs: ["expanded", "expanded", "id", "id"] }], ngImport: i0, template: "<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title) {\n <div>{{ title }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n@if (isExpanded) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" @expandSlotAnimation (@expandSlotAnimation.done)=\"onAnimationEnd()\">\n <ng-content />\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.InteractiveDirective, selector: "[odxCdkInteractive]", outputs: ["odxCdkInteractive"] }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }], animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
100
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: AccordionItemComponent, isStandalone: true, selector: "odx-accordion-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedChange: "expandedChange" }, host: { properties: { "class.is-disabled": "isDisabled", "class.odx-accordion-item--expanded": "isExpanded", "attr.id": "expandableItem.id", "attr.title": "null" } }, providers: [DisabledController.connect()], hostDirectives: [{ directive: i1.ExpandableItemDirective, inputs: ["expanded", "expanded", "id", "id"] }], ngImport: i0, template: "<div\n #button\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title()) {\n <div>{{ title() }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n\n@defer (on viewport(button)) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd()\">\n <div class=\"odx-accordion-item__slot-content\">\n <ng-content />\n </div>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.InteractiveDirective, selector: "[odxCdkInteractive]", outputs: ["odxCdkInteractive"] }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
97
101
  };
98
102
  AccordionItemComponent = __decorate([
99
103
  CSSComponent('accordion-item')
@@ -105,12 +109,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
105
109
  '[class.odx-accordion-item--expanded]': 'isExpanded',
106
110
  '[attr.id]': 'expandableItem.id',
107
111
  '[attr.title]': 'null',
108
- }, animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], template: "<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title) {\n <div>{{ title }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n@if (isExpanded) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" @expandSlotAnimation (@expandSlotAnimation.done)=\"onAnimationEnd()\">\n <ng-content />\n </div>\n}\n" }]
109
- }], propDecorators: { title: [{
110
- type: Input
111
- }], expandedChange: [{
112
- type: Output
113
- }] } });
112
+ }, template: "<div\n #button\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title()) {\n <div>{{ title() }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n\n@defer (on viewport(button)) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd()\">\n <div class=\"odx-accordion-item__slot-content\">\n <ng-content />\n </div>\n </div>\n}\n" }]
113
+ }] });
114
114
 
115
115
  /**
116
116
  * Directive for the title of an accordion item.
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-components-accordion.mjs","sources":["../../../../libs/angular/components/accordion/src/lib/accordion.component.ts","../../../../libs/angular/components/accordion/src/lib/accordion.component.html","../../../../libs/angular/components/accordion/src/lib/components/accordion-item/accordion-item.component.ts","../../../../libs/angular/components/accordion/src/lib/components/accordion-item/accordion-item.component.html","../../../../libs/angular/components/accordion/src/lib/directives/accordion-item-title.ts","../../../../libs/angular/components/accordion/src/lib/accordion.module.ts","../../../../libs/angular/components/accordion/src/odx-angular-components-accordion.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ExpandableContainerDirective } from '@odx/angular/cdk/expandable';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an accordion component.\n * Has host directive ExpandableContainerDirective\n *\n * @see {ExpandableContainerDirective}\n *\n * You can manage the expansion state of the accordion items by using the `ExpandableContainerDirective` methods.\n */\n@CSSComponent('accordion')\n@Component({\n selector: 'odx-accordion',\n templateUrl: './accordion.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }],\n})\nexport class AccordionComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-accordion-item\" />\n","import { transition, trigger, useAnimation } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { collapse, expand } from '@odx/angular/animations';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { ExpandableItemDirective } from '@odx/angular/cdk/expandable';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an item in an accordion component.\n * Has host directive ExpandableItemDirective\n *\n * @see {ExpandableItemDirective}\n *\n * You can control the accordion item's expansion state through the ExpandableItemDirective methods.\n */\n@CSSComponent('accordion-item')\n@Component({\n selector: 'odx-accordion-item',\n templateUrl: './accordion-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, CoreModule, IconComponent],\n providers: [DisabledController.connect()],\n hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }],\n host: {\n '[class.is-disabled]': 'isDisabled',\n '[class.odx-accordion-item--expanded]': 'isExpanded',\n '[attr.id]': 'expandableItem.id',\n '[attr.title]': 'null',\n },\n animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])],\n})\nexport class AccordionItemComponent {\n private readonly disabledController = DisabledController.inject();\n protected readonly expandableItem = inject(ExpandableItemDirective, { self: true });\n public readonly element = injectElement();\n\n /**\n * The title of the accordion item.\n *\n * @type {string | null}\n */\n @Input()\n public title?: string | null;\n\n /**\n * Event emitter for the expanded state change of the accordion item.\n *\n * @emits {boolean} The expanded state of the accordion item.\n */\n @Output()\n public expandedChange: EventEmitter<boolean> = new EventEmitter();\n\n /**\n * Gets a value indicating whether the accordion item is disabled.\n *\n * @returns {boolean} True if the accordion item is disabled, false otherwise.\n */\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Gets a value indicating whether the accordion item is expanded.\n *\n * @returns {boolean} True if the accordion item is expanded, false otherwise.\n */\n public get isExpanded(): boolean {\n return !this.isDisabled && this.expandableItem.expanded;\n }\n\n /**\n * Gets the ID of the title element for accessibility purposes.\n * The ID is generated by appending \"-title\" to the ID of the expandable item.\n *\n * @returns {string} The ID of the title element.\n */\n public get titleId(): string {\n return `${this.expandableItem.id}-title`;\n }\n\n /**\n * Gets the slot ID for the accordion item.\n * The slot ID is generated by appending \"-slot\" to the ID of the expandable item.\n *\n * @returns {string} The slot ID.\n */\n public get slotId(): string {\n return `${this.expandableItem.id}-slot`;\n }\n\n protected onAnimationEnd(): void {\n this.expandedChange.emit(this.expandableItem.expanded);\n }\n}\n","<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title) {\n <div>{{ title }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n@if (isExpanded) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" @expandSlotAnimation (@expandSlotAnimation.done)=\"onAnimationEnd()\">\n <ng-content />\n </div>\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Directive for the title of an accordion item.\n */\n@Directive({\n standalone: true,\n selector: 'odx-accordion-item-title',\n})\nexport class AccordionItemTitleDirective {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AccordionComponent } from './accordion.component';\nimport { AccordionItemComponent } from './components';\nimport { AccordionItemTitleDirective } from './directives';\n\nconst modules = [AccordionComponent, AccordionItemComponent, AccordionItemTitleDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class AccordionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAKA;;;;;;;AAOG;AAUU,IAAA,kBAAkB,GAAxB,MAAM,kBAAkB,CAAA;AAAxB,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAC3C,KAAA;+GAFY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,6KCtB/B,gDACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;ADqBa,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;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-components-accordion.mjs","sources":["../../../../libs/angular/components/accordion/src/lib/accordion.component.ts","../../../../libs/angular/components/accordion/src/lib/accordion.component.html","../../../../libs/angular/components/accordion/src/lib/components/accordion-item/accordion-item.component.ts","../../../../libs/angular/components/accordion/src/lib/components/accordion-item/accordion-item.component.html","../../../../libs/angular/components/accordion/src/lib/directives/accordion-item-title.ts","../../../../libs/angular/components/accordion/src/lib/accordion.module.ts","../../../../libs/angular/components/accordion/src/odx-angular-components-accordion.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ExpandableContainerDirective } from '@odx/angular/cdk/expandable';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an accordion component.\n * Has host directive ExpandableContainerDirective\n *\n * @see {ExpandableContainerDirective}\n *\n * You can manage the expansion state of the accordion items by using the `ExpandableContainerDirective` methods.\n */\n@CSSComponent('accordion')\n@Component({\n selector: 'odx-accordion',\n templateUrl: './accordion.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }],\n})\nexport class AccordionComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-accordion-item\" />\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject, input, output } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { ExpandableItemDirective } from '@odx/angular/cdk/expandable';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an item in an accordion component.\n * Has host directive ExpandableItemDirective\n *\n * @see {ExpandableItemDirective}\n *\n * You can control the accordion item's expansion state through the ExpandableItemDirective methods.\n */\n@CSSComponent('accordion-item')\n@Component({\n selector: 'odx-accordion-item',\n templateUrl: './accordion-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, CoreModule, IconComponent],\n providers: [DisabledController.connect()],\n hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }],\n host: {\n '[class.is-disabled]': 'isDisabled',\n '[class.odx-accordion-item--expanded]': 'isExpanded',\n '[attr.id]': 'expandableItem.id',\n '[attr.title]': 'null',\n },\n})\nexport class AccordionItemComponent {\n private readonly disabledController = DisabledController.inject();\n protected readonly expandableItem = inject(ExpandableItemDirective, { self: true });\n public readonly element = injectElement();\n\n /**\n * The title for the accordion item. This is an `InputSignal`.\n * @default null\n */\n public title = input<string | null>(null);\n\n /**\n * Emits when the expanded state of the accordion item changes.\n * This is an `OutputEmitterRef`.\n *\n * The emitted value is the new expanded state.\n */\n public expandedChange = output<boolean>();\n\n /**\n * Gets a value indicating whether the accordion item is disabled.\n *\n * @returns {boolean} True if the accordion item is disabled, false otherwise.\n */\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Gets a value indicating whether the accordion item is expanded.\n *\n * @returns {boolean} True if the accordion item is expanded, false otherwise.\n */\n public get isExpanded(): boolean {\n return !this.isDisabled && this.expandableItem.expanded;\n }\n\n /**\n * Gets the ID of the title element for accessibility purposes.\n * The ID is generated by appending \"-title\" to the ID of the expandable item.\n *\n * @returns {string} The ID of the title element.\n */\n public get titleId(): string {\n return `${this.expandableItem.id}-title`;\n }\n\n /**\n * Gets the slot ID for the accordion item.\n * The slot ID is generated by appending \"-slot\" to the ID of the expandable item.\n *\n * @returns {string} The slot ID.\n */\n public get slotId(): string {\n return `${this.expandableItem.id}-slot`;\n }\n\n protected onTransitionEnd(): void {\n this.expandedChange.emit(this.expandableItem.expanded);\n }\n}\n","<div\n #button\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title()) {\n <div>{{ title() }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n\n@defer (on viewport(button)) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd()\">\n <div class=\"odx-accordion-item__slot-content\">\n <ng-content />\n </div>\n </div>\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Directive for the title of an accordion item.\n */\n@Directive({\n standalone: true,\n selector: 'odx-accordion-item-title',\n})\nexport class AccordionItemTitleDirective {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AccordionComponent } from './accordion.component';\nimport { AccordionItemComponent } from './components';\nimport { AccordionItemTitleDirective } from './directives';\n\nconst modules = [AccordionComponent, AccordionItemComponent, AccordionItemTitleDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class AccordionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAKA;;;;;;;AAOG;AAUU,IAAA,kBAAkB,GAAxB,MAAM,kBAAkB,CAAA;AAAxB,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAC3C,KAAA;+GAFY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,6KCtB/B,gDACA,EAA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R,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -0,0 +1,220 @@
1
+ import { __decorate, __metadata } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, computed, signal, effect, Injectable, input, Component, ViewEncapsulation, ChangeDetectionStrategy, contentChildren, booleanAttribute, NgModule } from '@angular/core';
4
+ import { CSSComponent } from '@odx/angular/internal';
5
+ import { injectElement } from '@odx/angular/utils';
6
+ import { WindowRef } from '@odx/angular';
7
+ import { LinkDirective } from '@odx/angular/components/link';
8
+
9
+ class AnchorNavigationService {
10
+ constructor() {
11
+ this.windowRef = inject(WindowRef);
12
+ this.intersectionStates = new Map();
13
+ this.targetScrollSections = computed(() => this.findTargetScrollSections());
14
+ /**
15
+ * A WritableSignal holding the scrollable container element or document.
16
+ * This is set by the AnchorNavigationComponent.
17
+ * Defaults to the window's document.
18
+ */
19
+ this.scrollableContainer = signal(this.windowRef.document);
20
+ /**
21
+ * A WritableSignal holding an array of `AnchorLinkDirective` instances.
22
+ * These are the links managed by the service, typically set by the `AnchorNavigationComponent`
23
+ * based on its projected content.
24
+ */
25
+ this.projectedAnchorLinks = signal([]);
26
+ /**
27
+ * A readonly Signal indicating the currently active AnchorLinkDirective.
28
+ * This is updated by the service based on scroll position and intersection.
29
+ */
30
+ this.activeAnchorLink = signal(null);
31
+ effect((onCleanup) => {
32
+ const currentRoot = this.scrollableContainer();
33
+ const currentLinks = this.projectedAnchorLinks();
34
+ if (!currentLinks.length) {
35
+ this.disconnectObserver();
36
+ return;
37
+ }
38
+ this.initIntersectionObserver(currentRoot);
39
+ this.updateObservedElements();
40
+ onCleanup(() => {
41
+ this.disconnectObserver();
42
+ });
43
+ });
44
+ }
45
+ ngOnDestroy() {
46
+ this.disconnectObserver();
47
+ }
48
+ /**
49
+ * Scrolls the view to the section associated with the given `AnchorLinkDirective`
50
+ * and sets it as the active link.
51
+ *
52
+ * @param anchor The `AnchorLinkDirective` instance representing the target anchor/section.
53
+ * If null or if the anchor's ID is not found, a warning is logged and the method returns.
54
+ */
55
+ scrollToAnchor(anchor) {
56
+ const anchorId = anchor?.href();
57
+ if (!anchorId) {
58
+ console.warn(`[AnchorNavigationService] Attempted to scroll to an anchor without an ID.`);
59
+ return;
60
+ }
61
+ const anchorElement = this.scrollableContainer().querySelector(`#${CSS.escape(anchorId)}`);
62
+ if (!anchorElement) {
63
+ console.warn(`[AnchorNavigationService] Anchor with ID "${anchorId}" not found in the root container.`);
64
+ return;
65
+ }
66
+ anchorElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
67
+ }
68
+ initIntersectionObserver(root) {
69
+ if (this.intersectionObserver) {
70
+ this.intersectionObserver.disconnect();
71
+ }
72
+ this.intersectionObserver = new IntersectionObserver((entries) => this.onIntersectionUpdate(entries), {
73
+ root: root === this.windowRef.document ? null : root,
74
+ threshold: 0.1,
75
+ });
76
+ }
77
+ updateObservedElements() {
78
+ if (!this.intersectionObserver)
79
+ return;
80
+ this.intersectionObserver.disconnect();
81
+ this.intersectionStates.clear();
82
+ const sections = this.targetScrollSections();
83
+ sections.forEach((section) => {
84
+ if (section) {
85
+ this.intersectionStates.set(section, false);
86
+ this.intersectionObserver.observe(section);
87
+ }
88
+ });
89
+ }
90
+ onIntersectionUpdate(entries) {
91
+ entries.forEach((entry) => this.intersectionStates.set(entry.target, entry.isIntersecting));
92
+ let newActiveCandidate = null;
93
+ const currentSections = this.targetScrollSections();
94
+ for (const section of currentSections) {
95
+ if (this.intersectionStates.get(section) === true) {
96
+ newActiveCandidate = this.projectedAnchorLinks().find((link) => link.href() === section.id) || null;
97
+ break;
98
+ }
99
+ }
100
+ if (this.activeAnchorLink() !== newActiveCandidate)
101
+ this.activeAnchorLink.set(newActiveCandidate);
102
+ }
103
+ findTargetScrollSections() {
104
+ const currentLinks = this.projectedAnchorLinks();
105
+ if (!currentLinks.length)
106
+ return [];
107
+ const selectors = currentLinks
108
+ .map((link) => link.href())
109
+ .filter(Boolean)
110
+ .map((id) => `#${CSS.escape(id)}`)
111
+ .join(',');
112
+ return selectors ? Array.from(this.scrollableContainer().querySelectorAll(selectors)) : [];
113
+ }
114
+ disconnectObserver() {
115
+ this.intersectionObserver?.disconnect();
116
+ this.intersectionObserver = undefined;
117
+ }
118
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
119
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationService }); }
120
+ }
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationService, decorators: [{
122
+ type: Injectable
123
+ }], ctorParameters: () => [] });
124
+
125
+ let AnchorNavigationItemComponent = class AnchorNavigationItemComponent {
126
+ constructor() {
127
+ this.navigationService = inject(AnchorNavigationService);
128
+ this.element = injectElement();
129
+ this.href = input.required();
130
+ this.isActive = computed(() => this.navigationService.activeAnchorLink() === this);
131
+ }
132
+ handleClick(e) {
133
+ e.preventDefault();
134
+ this.navigationService.scrollToAnchor(this);
135
+ }
136
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
137
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: AnchorNavigationItemComponent, isStandalone: true, selector: "odx-anchor-navigation-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.is-active": "isActive()" } }, ngImport: i0, template: "<a odxLink [href]=\"'#' + href()\" (click)=\"handleClick($event)\" (keydown.space)=\"handleClick($event)\" [attr.aria-current]=\"isActive() ? 'page' : null\">\n <ng-content />\n</a>\n", dependencies: [{ kind: "directive", type: LinkDirective, selector: "a[odxLink]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
138
+ };
139
+ AnchorNavigationItemComponent = __decorate([
140
+ CSSComponent('anchor-navigation-item')
141
+ ], AnchorNavigationItemComponent);
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationItemComponent, decorators: [{
143
+ type: Component,
144
+ args: [{ selector: 'odx-anchor-navigation-item', standalone: true, imports: [LinkDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
145
+ '[class.is-active]': 'isActive()',
146
+ }, template: "<a odxLink [href]=\"'#' + href()\" (click)=\"handleClick($event)\" (keydown.space)=\"handleClick($event)\" [attr.aria-current]=\"isActive() ? 'page' : null\">\n <ng-content />\n</a>\n" }]
147
+ }] });
148
+
149
+ let AnchorNavigationComponent = class AnchorNavigationComponent {
150
+ constructor() {
151
+ this.service = inject(AnchorNavigationService);
152
+ this.element = injectElement();
153
+ /**
154
+ * A Signal with list of `AnchorLinkDirective` instances projected into this component.
155
+ * These are the anchor links that this navigation component will manage.
156
+ */
157
+ this.projectedAnchorLinks = contentChildren(AnchorNavigationItemComponent);
158
+ /**
159
+ * Input to determine if the anchor navigation should be displayed vertically.
160
+ * Defaults to `false` (horizontal).
161
+ */
162
+ this.vertical = input(false, { transform: booleanAttribute });
163
+ /**
164
+ * Input to specify the scrollable container element or document whose scroll position
165
+ * is used to determine the active anchor link. If not provided, defaults to the
166
+ * `document` of the current window.
167
+ */
168
+ // eslint-disable-next-line @angular-eslint/no-input-rename
169
+ this.scrollableContainer = input(undefined, { alias: 'root' });
170
+ this.activeAnchorLink = this.service.activeAnchorLink;
171
+ effect(() => {
172
+ this.service.projectedAnchorLinks.set(this.projectedAnchorLinks());
173
+ const rcInput = this.scrollableContainer();
174
+ if (rcInput !== undefined) {
175
+ this.service.scrollableContainer.set(rcInput);
176
+ }
177
+ }, { allowSignalWrites: true });
178
+ }
179
+ /**
180
+ * Scrolls the view to the section associated with the given `AnchorLinkDirective`.
181
+ * @param anchor The `AnchorLinkDirective` instance representing the target anchor/section.
182
+ */
183
+ scrollToAnchor(anchor) {
184
+ this.service.scrollToAnchor(anchor);
185
+ }
186
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
187
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: AnchorNavigationComponent, isStandalone: true, selector: "odx-anchor-navigation", inputs: { vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, scrollableContainer: { classPropertyName: "scrollableContainer", publicName: "root", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.odx-anchor-navigation--vertical": "vertical()", "attr.role": "\"navigation\"" } }, providers: [AnchorNavigationService], queries: [{ propertyName: "projectedAnchorLinks", predicate: AnchorNavigationItemComponent, isSignal: true }], ngImport: i0, template: "<ng-content select=\"odx-anchor-navigation-item\" />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
188
+ };
189
+ AnchorNavigationComponent = __decorate([
190
+ CSSComponent('anchor-navigation'),
191
+ __metadata("design:paramtypes", [])
192
+ ], AnchorNavigationComponent);
193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationComponent, decorators: [{
194
+ type: Component,
195
+ args: [{ selector: 'odx-anchor-navigation', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, encapsulation: ViewEncapsulation.None, providers: [AnchorNavigationService], host: {
196
+ '[class.odx-anchor-navigation--vertical]': 'vertical()',
197
+ '[attr.role]': '"navigation"',
198
+ }, template: "<ng-content select=\"odx-anchor-navigation-item\" />\n" }]
199
+ }], ctorParameters: () => [] });
200
+
201
+ const modules = [AnchorNavigationComponent, AnchorNavigationItemComponent];
202
+ class AnchorNavigationModule {
203
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
204
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationModule, imports: [AnchorNavigationComponent, AnchorNavigationItemComponent], exports: [AnchorNavigationComponent, AnchorNavigationItemComponent] }); }
205
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationModule }); }
206
+ }
207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AnchorNavigationModule, decorators: [{
208
+ type: NgModule,
209
+ args: [{
210
+ imports: modules,
211
+ exports: modules,
212
+ }]
213
+ }] });
214
+
215
+ /**
216
+ * Generated bundle index. Do not edit.
217
+ */
218
+
219
+ export { AnchorNavigationComponent, AnchorNavigationItemComponent, AnchorNavigationModule, AnchorNavigationService };
220
+ //# sourceMappingURL=odx-angular-components-anchor-navigation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odx-angular-components-anchor-navigation.mjs","sources":["../../../../libs/angular/components/anchor-navigation/src/anchor-navigation.service.ts","../../../../libs/angular/components/anchor-navigation/src/components/anchor-navigation-item.component.ts","../../../../libs/angular/components/anchor-navigation/src/components/anchor-navigation-item.component.html","../../../../libs/angular/components/anchor-navigation/src/anchor-navigation.component.ts","../../../../libs/angular/components/anchor-navigation/src/anchor-navigation.component.html","../../../../libs/angular/components/anchor-navigation/src/anchor-navigation.module.ts","../../../../libs/angular/components/anchor-navigation/src/odx-angular-components-anchor-navigation.ts"],"sourcesContent":["import { computed, effect, inject, Injectable, OnDestroy, signal, WritableSignal } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { AnchorNavigationItemComponent } from './components/anchor-navigation-item.component';\n\n@Injectable()\nexport class AnchorNavigationService implements OnDestroy {\n private readonly windowRef = inject(WindowRef);\n private intersectionObserver?: IntersectionObserver;\n private readonly intersectionStates = new Map<Element, boolean>();\n\n private readonly targetScrollSections = computed<HTMLElement[]>(() => this.findTargetScrollSections());\n\n /**\n * A WritableSignal holding the scrollable container element or document.\n * This is set by the AnchorNavigationComponent.\n * Defaults to the window's document.\n */\n public scrollableContainer: WritableSignal<HTMLElement | Document> = signal(this.windowRef.document);\n\n /**\n * A WritableSignal holding an array of `AnchorLinkDirective` instances.\n * These are the links managed by the service, typically set by the `AnchorNavigationComponent`\n * based on its projected content.\n */\n public projectedAnchorLinks: WritableSignal<readonly AnchorNavigationItemComponent[]> = signal([]);\n\n /**\n * A readonly Signal indicating the currently active AnchorLinkDirective.\n * This is updated by the service based on scroll position and intersection.\n */\n public readonly activeAnchorLink = signal<AnchorNavigationItemComponent | null>(null);\n\n constructor() {\n effect((onCleanup) => {\n const currentRoot = this.scrollableContainer();\n const currentLinks = this.projectedAnchorLinks();\n\n if (!currentLinks.length) {\n this.disconnectObserver();\n return;\n }\n\n this.initIntersectionObserver(currentRoot);\n this.updateObservedElements();\n\n onCleanup(() => {\n this.disconnectObserver();\n });\n });\n }\n\n public ngOnDestroy(): void {\n this.disconnectObserver();\n }\n\n /**\n * Scrolls the view to the section associated with the given `AnchorLinkDirective`\n * and sets it as the active link.\n *\n * @param anchor The `AnchorLinkDirective` instance representing the target anchor/section.\n * If null or if the anchor's ID is not found, a warning is logged and the method returns.\n */\n public scrollToAnchor(anchor: AnchorNavigationItemComponent | null): void {\n const anchorId = anchor?.href();\n if (!anchorId) {\n console.warn(`[AnchorNavigationService] Attempted to scroll to an anchor without an ID.`);\n return;\n }\n const anchorElement = this.scrollableContainer().querySelector(`#${CSS.escape(anchorId)}`) as HTMLElement | null;\n\n if (!anchorElement) {\n console.warn(`[AnchorNavigationService] Anchor with ID \"${anchorId}\" not found in the root container.`);\n return;\n }\n\n anchorElement.scrollIntoView({ behavior: 'smooth', block: 'start' });\n }\n\n private initIntersectionObserver(root: HTMLElement | Document): void {\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect();\n }\n this.intersectionObserver = new IntersectionObserver((entries: IntersectionObserverEntry[]) => this.onIntersectionUpdate(entries), {\n root: root === this.windowRef.document ? null : root,\n threshold: 0.1,\n });\n }\n\n private updateObservedElements(): void {\n if (!this.intersectionObserver) return;\n this.intersectionObserver.disconnect();\n this.intersectionStates.clear();\n\n const sections = this.targetScrollSections();\n sections.forEach((section) => {\n if (section) {\n this.intersectionStates.set(section, false);\n this.intersectionObserver!.observe(section);\n }\n });\n }\n\n private onIntersectionUpdate(entries: IntersectionObserverEntry[]): void {\n entries.forEach((entry) => this.intersectionStates.set(entry.target, entry.isIntersecting));\n\n let newActiveCandidate: AnchorNavigationItemComponent | null = null;\n const currentSections = this.targetScrollSections();\n for (const section of currentSections) {\n if (this.intersectionStates.get(section) === true) {\n newActiveCandidate = this.projectedAnchorLinks().find((link) => link.href() === section.id) || null;\n break;\n }\n }\n\n if (this.activeAnchorLink() !== newActiveCandidate) this.activeAnchorLink.set(newActiveCandidate);\n }\n\n private findTargetScrollSections(): HTMLElement[] {\n const currentLinks = this.projectedAnchorLinks();\n if (!currentLinks.length) return [];\n\n const selectors = currentLinks\n .map((link) => link.href())\n .filter(Boolean)\n .map((id) => `#${CSS.escape(id)}`)\n .join(',');\n return selectors ? Array.from(this.scrollableContainer().querySelectorAll<HTMLElement>(selectors)) : [];\n }\n\n private disconnectObserver(): void {\n this.intersectionObserver?.disconnect();\n this.intersectionObserver = undefined;\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation } from '@angular/core';\nimport { LinkDirective } from '@odx/angular/components/link';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { AnchorNavigationService } from '../anchor-navigation.service';\n\n@CSSComponent('anchor-navigation-item')\n@Component({\n selector: 'odx-anchor-navigation-item',\n templateUrl: './anchor-navigation-item.component.html',\n standalone: true,\n imports: [LinkDirective],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.is-active]': 'isActive()',\n },\n})\nexport class AnchorNavigationItemComponent {\n private readonly navigationService = inject(AnchorNavigationService);\n public readonly element = injectElement();\n\n public href = input.required<string>();\n public isActive = computed(() => this.navigationService.activeAnchorLink() === this);\n\n protected handleClick(e: Event): void {\n e.preventDefault();\n this.navigationService.scrollToAnchor(this);\n }\n}\n","<a odxLink [href]=\"'#' + href()\" (click)=\"handleClick($event)\" (keydown.space)=\"handleClick($event)\" [attr.aria-current]=\"isActive() ? 'page' : null\">\n <ng-content />\n</a>\n","import { booleanAttribute, ChangeDetectionStrategy, Component, contentChildren, effect, inject, input, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { AnchorNavigationService } from './anchor-navigation.service';\nimport { AnchorNavigationItemComponent } from './components';\n\n@CSSComponent('anchor-navigation')\n@Component({\n selector: 'odx-anchor-navigation',\n templateUrl: './anchor-navigation.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n providers: [AnchorNavigationService],\n host: {\n '[class.odx-anchor-navigation--vertical]': 'vertical()',\n '[attr.role]': '\"navigation\"',\n },\n})\nexport class AnchorNavigationComponent {\n private readonly service = inject(AnchorNavigationService);\n public readonly element = injectElement();\n\n /**\n * A Signal with list of `AnchorLinkDirective` instances projected into this component.\n * These are the anchor links that this navigation component will manage.\n */\n public readonly projectedAnchorLinks = contentChildren(AnchorNavigationItemComponent);\n\n /**\n * Input to determine if the anchor navigation should be displayed vertically.\n * Defaults to `false` (horizontal).\n */\n public vertical = input<boolean, boolean>(false, { transform: booleanAttribute });\n\n /**\n * Input to specify the scrollable container element or document whose scroll position\n * is used to determine the active anchor link. If not provided, defaults to the\n * `document` of the current window.\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n public scrollableContainer = input<HTMLElement | Document | undefined>(undefined, { alias: 'root' });\n\n public readonly activeAnchorLink = this.service.activeAnchorLink;\n\n constructor() {\n effect(\n () => {\n this.service.projectedAnchorLinks.set(this.projectedAnchorLinks());\n const rcInput = this.scrollableContainer();\n\n if (rcInput !== undefined) {\n this.service.scrollableContainer.set(rcInput);\n }\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * Scrolls the view to the section associated with the given `AnchorLinkDirective`.\n * @param anchor The `AnchorLinkDirective` instance representing the target anchor/section.\n */\n public scrollToAnchor(anchor: AnchorNavigationItemComponent): void {\n this.service.scrollToAnchor(anchor);\n }\n}\n","<ng-content select=\"odx-anchor-navigation-item\" />\n","import { NgModule } from '@angular/core';\nimport { AnchorNavigationComponent } from './anchor-navigation.component';\nimport { AnchorNavigationItemComponent } from './components';\n\nconst modules = [AnchorNavigationComponent, AnchorNavigationItemComponent];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class AnchorNavigationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAKa,uBAAuB,CAAA;AA2BlC,IAAA,WAAA,GAAA;AA1BiB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAE9B,QAAA,IAAA,CAAA,kBAAkB,GAAG,IAAI,GAAG,EAAoB,CAAC;QAEjD,IAAoB,CAAA,oBAAA,GAAG,QAAQ,CAAgB,MAAM,IAAI,CAAC,wBAAwB,EAAE,CAAC,CAAC;AAEvG;;;;AAIG;QACI,IAAmB,CAAA,mBAAA,GAA2C,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AAErG;;;;AAIG;AACI,QAAA,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AA,QAAA,EAAA,uBAAuB,EAEhB,eAAA,EAAA,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,aAAA,EACD,iBAAiB,CAAC,IAAI,EAAA,SAAA,EAC1B,CAAC,uBAAuB,CAAC,EAC9B,IAAA,EAAA;AACJ,wBAAA,yCAAyC,EAAE,YAAY;AACvD,wBAAA,aAAa,EAAE,cAAc;AAC9B,qBAAA,EAAA,QAAA,EAAA,wDAAA,EAAA,CAAA;;;AEbH,MAAM,OAAO,GAAG,CAAC,yBAAyB,EAAE,6BAA6B,CAAC,CAAC;MAM9D,sBAAsB,CAAA;+GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YANlB,yBAAyB,EAAE,6BAA6B,CAAxD,EAAA,OAAA,EAAA,CAAA,yBAAyB,EAAE,6BAA6B,CAAA,EAAA,CAAA,CAAA,EAAA;gHAM5D,sBAAsB,EAAA,CAAA,CAAA,EAAA;;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,OAAO;AACjB,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/angular",
3
- "version": "12.14.2",
3
+ "version": "12.15.1",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -166,6 +166,12 @@
166
166
  "esm": "./esm2022/components/action-group/odx-angular-components-action-group.mjs",
167
167
  "default": "./fesm2022/odx-angular-components-action-group.mjs"
168
168
  },
169
+ "./components/anchor-navigation": {
170
+ "types": "./components/anchor-navigation/index.d.ts",
171
+ "esm2022": "./esm2022/components/anchor-navigation/odx-angular-components-anchor-navigation.mjs",
172
+ "esm": "./esm2022/components/anchor-navigation/odx-angular-components-anchor-navigation.mjs",
173
+ "default": "./fesm2022/odx-angular-components-anchor-navigation.mjs"
174
+ },
169
175
  "./components/area-header": {
170
176
  "types": "./components/area-header/index.d.ts",
171
177
  "esm2022": "./esm2022/components/area-header/odx-angular-components-area-header.mjs",