@odx/angular 12.18.1 → 12.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +4 -2
- package/esm2022/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +9 -6
- package/esm2022/components/switch/lib/switch.component.mjs +3 -3
- package/fesm2022/odx-angular-components-accordion.mjs +8 -5
- package/fesm2022/odx-angular-components-accordion.mjs.map +1 -1
- package/fesm2022/odx-angular-components-switch.mjs +2 -2
- package/fesm2022/odx-angular-components-switch.mjs.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @odx/angular
|
|
2
2
|
|
|
3
|
+
## 12.19.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8b75baa: Fix: `onTransitionEnd` output emits only when the accordion item itself finishes expanding or collapsing
|
|
8
|
+
|
|
9
|
+
## 12.19.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 448c241: OdxSwitchComponent now supports @odx/icons v4
|
|
14
|
+
|
|
3
15
|
## 12.18.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
1
2
|
import { ExpandableItemDirective } from '@odx/angular/cdk/expandable';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
import * as i1 from "@odx/angular/cdk/expandable";
|
|
@@ -12,7 +13,8 @@ import * as i1 from "@odx/angular/cdk/expandable";
|
|
|
12
13
|
export declare class AccordionItemComponent {
|
|
13
14
|
private readonly disabledController;
|
|
14
15
|
protected readonly expandableItem: ExpandableItemDirective;
|
|
15
|
-
readonly
|
|
16
|
+
protected readonly expandableBlock: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
17
|
+
readonly element: ElementRef<HTMLElement>;
|
|
16
18
|
/**
|
|
17
19
|
* The title for the accordion item. This is an `InputSignal`.
|
|
18
20
|
* @default null
|
|
@@ -51,7 +53,7 @@ export declare class AccordionItemComponent {
|
|
|
51
53
|
* @returns {string} The slot ID.
|
|
52
54
|
*/
|
|
53
55
|
get slotId(): string;
|
|
54
|
-
protected onTransitionEnd(): void;
|
|
56
|
+
protected onTransitionEnd({ target, propertyName }: TransitionEvent): void;
|
|
55
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
|
|
56
58
|
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: {}; }]>;
|
|
57
59
|
}
|
package/esm2022/components/accordion/lib/components/accordion-item/accordion-item.component.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject, input, output } from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject, input, output, viewChild } from '@angular/core';
|
|
3
3
|
import { CoreModule, DisabledController } from '@odx/angular';
|
|
4
4
|
import { A11yModule } from '@odx/angular/cdk/a11y';
|
|
5
5
|
import { ExpandableItemDirective } from '@odx/angular/cdk/expandable';
|
|
@@ -21,6 +21,7 @@ let AccordionItemComponent = class AccordionItemComponent {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
this.disabledController = DisabledController.inject();
|
|
23
23
|
this.expandableItem = inject(ExpandableItemDirective, { self: true });
|
|
24
|
+
this.expandableBlock = viewChild('expandableBlock');
|
|
24
25
|
this.element = injectElement();
|
|
25
26
|
/**
|
|
26
27
|
* The title for the accordion item. This is an `InputSignal`.
|
|
@@ -69,11 +70,13 @@ let AccordionItemComponent = class AccordionItemComponent {
|
|
|
69
70
|
get slotId() {
|
|
70
71
|
return `${this.expandableItem.id}-slot`;
|
|
71
72
|
}
|
|
72
|
-
onTransitionEnd() {
|
|
73
|
-
this.
|
|
73
|
+
onTransitionEnd({ target, propertyName }) {
|
|
74
|
+
if (target === this.expandableBlock()?.nativeElement && propertyName === 'grid-template-rows') {
|
|
75
|
+
this.expandedChange.emit(this.expandableItem.expanded);
|
|
76
|
+
}
|
|
74
77
|
}
|
|
75
78
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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 }); }
|
|
79
|
+
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()], viewQueries: [{ propertyName: "expandableBlock", first: true, predicate: ["expandableBlock"], descendants: true, isSignal: true }], 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 #expandableBlock class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd($event)\">\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 }); }
|
|
77
80
|
};
|
|
78
81
|
AccordionItemComponent = __decorate([
|
|
79
82
|
CSSComponent('accordion-item')
|
|
@@ -86,6 +89,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
86
89
|
'[class.odx-accordion-item--expanded]': 'isExpanded',
|
|
87
90
|
'[attr.id]': 'expandableItem.id',
|
|
88
91
|
'[attr.title]': 'null',
|
|
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" }]
|
|
92
|
+
}, 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 #expandableBlock class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd($event)\">\n <div class=\"odx-accordion-item__slot-content\">\n <ng-content />\n </div>\n </div>\n}\n" }]
|
|
90
93
|
}] });
|
|
91
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
94
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyL2NvbXBvbmVudHMvYWNjb3JkaW9uL3NyYy9saWIvY29tcG9uZW50cy9hY2NvcmRpb24taXRlbS9hY2NvcmRpb24taXRlbS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXIvY29tcG9uZW50cy9hY2NvcmRpb24vc3JjL2xpYi9jb21wb25lbnRzL2FjY29yZGlvbi1pdGVtL2FjY29yZGlvbi1pdGVtLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFjLGlCQUFpQixFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNwSSxPQUFPLEVBQUUsVUFBVSxFQUFFLGtCQUFrQixFQUFFLE1BQU0sY0FBYyxDQUFDO0FBQzlELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUNuRCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw2QkFBNkIsQ0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XIgKG9uIHZpZXdwb3J0KGJ1dHRvbikpIHtcbiAgPGRpdiAjZXhwYW5kYWJsZUJsb2NrIGNsYXNzPVwib2R4LWFjY29yZGlvbi1pdGVtX19zbG90XCIgW2F0dHIuaWRdPVwic2xvdElkXCIgW2F0dHIuYXJpYS1sYWJlbGxlZGJ5XT1cInRpdGxlSWRcIiAodHJhbnNpdGlvbmVuZCk9XCJvblRyYW5zaXRpb25FbmQoJGV2ZW50KVwiPlxuICAgIDxkaXYgY2xhc3M9XCJvZHgtYWNjb3JkaW9uLWl0ZW1fX3Nsb3QtY29udGVudFwiPlxuICAgICAgPG5nLWNvbnRlbnQgLz5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG59XG4iXX0=
|
|
@@ -19,7 +19,7 @@ import * as i1 from "@odx/angular";
|
|
|
19
19
|
*/
|
|
20
20
|
let SwitchComponent = class SwitchComponent extends CheckBoxControl {
|
|
21
21
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SwitchComponent, isStandalone: true, selector: "odx-switch", host: { properties: { "class.is-active": "checked" } }, providers: [ReadonlyController.connect()], usesInheritance: true, hostDirectives: [{ directive: i1.WithDisabledState }], ngImport: i0, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <odx-icon class=\"odx-
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SwitchComponent, isStandalone: true, selector: "odx-switch", host: { properties: { "class.is-active": "checked" } }, providers: [ReadonlyController.connect()], usesInheritance: true, hostDirectives: [{ directive: i1.WithDisabledState }], ngImport: i0, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__track\">\n <div class=\"odx-switch__thumb\">\n <odx-icon class=\"odx-switch__icon\" iconSet=\"core\" [name]=\"checked ? 'check' : 'close'\" />\n </div>\n </div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n", dependencies: [{ kind: "directive", type: ControlDirective, selector: "[odxControl]", exportAs: ["odxControl"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
23
23
|
};
|
|
24
24
|
SwitchComponent = __decorate([
|
|
25
25
|
CSSComponent('switch')
|
|
@@ -29,6 +29,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
29
29
|
type: Component,
|
|
30
30
|
args: [{ standalone: true, selector: 'odx-switch', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [ControlDirective, IconComponent], providers: [ReadonlyController.connect()], hostDirectives: [WithDisabledState], host: {
|
|
31
31
|
'[class.is-active]': 'checked',
|
|
32
|
-
}, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <odx-icon class=\"odx-
|
|
32
|
+
}, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__track\">\n <div class=\"odx-switch__thumb\">\n <odx-icon class=\"odx-switch__icon\" iconSet=\"core\" [name]=\"checked ? 'check' : 'close'\" />\n </div>\n </div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n" }]
|
|
33
33
|
}] });
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3dpdGNoLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4u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gIH1cbiAgPC9kaXY+XG48L2xhYmVsPlxuIl19
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation, inject, input, output, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, inject, viewChild, 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';
|
|
@@ -45,6 +45,7 @@ let AccordionItemComponent = class AccordionItemComponent {
|
|
|
45
45
|
constructor() {
|
|
46
46
|
this.disabledController = DisabledController.inject();
|
|
47
47
|
this.expandableItem = inject(ExpandableItemDirective, { self: true });
|
|
48
|
+
this.expandableBlock = viewChild('expandableBlock');
|
|
48
49
|
this.element = injectElement();
|
|
49
50
|
/**
|
|
50
51
|
* The title for the accordion item. This is an `InputSignal`.
|
|
@@ -93,11 +94,13 @@ let AccordionItemComponent = class AccordionItemComponent {
|
|
|
93
94
|
get slotId() {
|
|
94
95
|
return `${this.expandableItem.id}-slot`;
|
|
95
96
|
}
|
|
96
|
-
onTransitionEnd() {
|
|
97
|
-
this.
|
|
97
|
+
onTransitionEnd({ target, propertyName }) {
|
|
98
|
+
if (target === this.expandableBlock()?.nativeElement && propertyName === 'grid-template-rows') {
|
|
99
|
+
this.expandedChange.emit(this.expandableItem.expanded);
|
|
100
|
+
}
|
|
98
101
|
}
|
|
99
102
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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 }); }
|
|
103
|
+
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()], viewQueries: [{ propertyName: "expandableBlock", first: true, predicate: ["expandableBlock"], descendants: true, isSignal: true }], 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 #expandableBlock class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd($event)\">\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 }); }
|
|
101
104
|
};
|
|
102
105
|
AccordionItemComponent = __decorate([
|
|
103
106
|
CSSComponent('accordion-item')
|
|
@@ -109,7 +112,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
109
112
|
'[class.odx-accordion-item--expanded]': 'isExpanded',
|
|
110
113
|
'[attr.id]': 'expandableItem.id',
|
|
111
114
|
'[attr.title]': 'null',
|
|
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" }]
|
|
115
|
+
}, 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 #expandableBlock class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd($event)\">\n <div class=\"odx-accordion-item__slot-content\">\n <ng-content />\n </div>\n </div>\n}\n" }]
|
|
113
116
|
}] });
|
|
114
117
|
|
|
115
118
|
/**
|
|
@@ -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 { 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,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;ADqBa,kBAAkB,GAAA,UAAA,CAAA;IAT9B,YAAY,CAAC,WAAW,CAAC;AASb,CAAA,EAAA,kBAAkB,CAE9B,CAAA;4FAFY,kBAAkB,EAAA,UAAA,EAAA,CAAA;kB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,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAJvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,0BAA0B;AACrC,iBAAA,CAAA;;;ACFD,MAAM,OAAO,GAAG,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAAC,CAAC;MAM7E,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAf,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,eAAe,EANX,OAAA,EAAA,CAAA,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAI5E,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;gHAM3E,eAAe,EAAA,OAAA,EAAA,CANS,sBAAsB,EAI/C,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACXD;;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, ElementRef, ViewEncapsulation, inject, input, output, viewChild } 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 protected readonly expandableBlock = viewChild<ElementRef>('expandableBlock');\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({ target, propertyName }: TransitionEvent): void {\n if (target === this.expandableBlock()?.nativeElement && propertyName === 'grid-template-rows') {\n this.expandedChange.emit(this.expandableItem.expanded);\n }\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 #expandableBlock class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" (transitionend)=\"onTransitionEnd($event)\">\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,EAAA,eAAA,E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AAA,EAAA,EAAA,IAAA,EAAA,eAAe,EANX,OAAA,EAAA,CAAA,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAI5E,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;gHAM3E,eAAe,EAAA,OAAA,EAAA,CANS,sBAAsB,EAI/C,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -21,7 +21,7 @@ import { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';
|
|
|
21
21
|
*/
|
|
22
22
|
let SwitchComponent = class SwitchComponent extends CheckBoxControl {
|
|
23
23
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SwitchComponent, isStandalone: true, selector: "odx-switch", host: { properties: { "class.is-active": "checked" } }, providers: [ReadonlyController.connect()], usesInheritance: true, hostDirectives: [{ directive: i1.WithDisabledState }], ngImport: i0, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <odx-icon class=\"odx-
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SwitchComponent, isStandalone: true, selector: "odx-switch", host: { properties: { "class.is-active": "checked" } }, providers: [ReadonlyController.connect()], usesInheritance: true, hostDirectives: [{ directive: i1.WithDisabledState }], ngImport: i0, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__track\">\n <div class=\"odx-switch__thumb\">\n <odx-icon class=\"odx-switch__icon\" iconSet=\"core\" [name]=\"checked ? 'check' : 'close'\" />\n </div>\n </div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n", dependencies: [{ kind: "directive", type: ControlDirective, selector: "[odxControl]", exportAs: ["odxControl"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
25
25
|
};
|
|
26
26
|
SwitchComponent = __decorate([
|
|
27
27
|
CSSComponent('switch')
|
|
@@ -30,7 +30,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
30
30
|
type: Component,
|
|
31
31
|
args: [{ standalone: true, selector: 'odx-switch', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [ControlDirective, IconComponent], providers: [ReadonlyController.connect()], hostDirectives: [WithDisabledState], host: {
|
|
32
32
|
'[class.is-active]': 'checked',
|
|
33
|
-
}, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <odx-icon class=\"odx-
|
|
33
|
+
}, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__track\">\n <div class=\"odx-switch__thumb\">\n <odx-icon class=\"odx-switch__icon\" iconSet=\"core\" [name]=\"checked ? 'check' : 'close'\" />\n </div>\n </div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n" }]
|
|
34
34
|
}] });
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-switch.mjs","sources":["../../../../libs/angular/components/switch/src/lib/switch.component.ts","../../../../libs/angular/components/switch/src/lib/switch.component.html","../../../../libs/angular/components/switch/src/lib/switch.validator.ts","../../../../libs/angular/components/switch/src/lib/switch.module.ts","../../../../libs/angular/components/switch/src/odx-angular-components-switch.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ReadonlyController, WithDisabledState } from '@odx/angular';\nimport { CheckBoxControl } from '@odx/angular/cdk/checkbox-control';\nimport { ControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\n\n/**\n * SwitchComponent provides a custom switch (toggle) control that can be used within forms\n * or standalone for toggling a specific binary state. It supports readonly and disabled states,\n * and integrates seamlessly with Angular's form controls for data binding and state management.\n * Has host directives for disabled state handling.\n * Extends CheckBoxControl to provide additional behavior.\n *\n * @see {WithDisabledState}\n * @see {CheckBoxControl}\n */\n@CSSComponent('switch')\n@Component({\n standalone: true,\n selector: 'odx-switch',\n templateUrl: 'switch.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [ControlDirective, IconComponent],\n providers: [ReadonlyController.connect()],\n hostDirectives: [WithDisabledState],\n host: {\n '[class.is-active]': 'checked',\n },\n})\nexport class SwitchComponent extends CheckBoxControl {}\n","<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <odx-icon class=\"odx-
|
|
1
|
+
{"version":3,"file":"odx-angular-components-switch.mjs","sources":["../../../../libs/angular/components/switch/src/lib/switch.component.ts","../../../../libs/angular/components/switch/src/lib/switch.component.html","../../../../libs/angular/components/switch/src/lib/switch.validator.ts","../../../../libs/angular/components/switch/src/lib/switch.module.ts","../../../../libs/angular/components/switch/src/odx-angular-components-switch.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ReadonlyController, WithDisabledState } from '@odx/angular';\nimport { CheckBoxControl } from '@odx/angular/cdk/checkbox-control';\nimport { ControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\n\n/**\n * SwitchComponent provides a custom switch (toggle) control that can be used within forms\n * or standalone for toggling a specific binary state. It supports readonly and disabled states,\n * and integrates seamlessly with Angular's form controls for data binding and state management.\n * Has host directives for disabled state handling.\n * Extends CheckBoxControl to provide additional behavior.\n *\n * @see {WithDisabledState}\n * @see {CheckBoxControl}\n */\n@CSSComponent('switch')\n@Component({\n standalone: true,\n selector: 'odx-switch',\n templateUrl: 'switch.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [ControlDirective, IconComponent],\n providers: [ReadonlyController.connect()],\n hostDirectives: [WithDisabledState],\n host: {\n '[class.is-active]': 'checked',\n },\n})\nexport class SwitchComponent extends CheckBoxControl {}\n","<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__track\">\n <div class=\"odx-switch__thumb\">\n <odx-icon class=\"odx-switch__icon\" iconSet=\"core\" [name]=\"checked ? 'check' : 'close'\" />\n </div>\n </div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\n/**\n * SwitchValidator extends CheckboxRequiredValidator to provide required field validation\n * for switch components used within Angular forms. It ensures that the switch is marked as required\n * and must be toggled (checked) to meet form validation criteria.\n *\n * This directive automatically attaches itself to any switch component with a 'required' attribute\n * and a form control binding (formControlName, formControl, or ngModel).\n *\n * Extends CheckboxRequiredValidator.\n *\n * @see {CheckboxRequiredValidator}\n */\n@Directive({\n standalone: true,\n selector: 'odx-switch[required][formControlName], odx-switch[required][formControl], odx-switch[required][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SwitchValidator),\n multi: true,\n },\n ],\n})\nexport class SwitchValidator extends CheckboxRequiredValidator {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { SwitchComponent } from './switch.component';\nimport { SwitchValidator } from './switch.validator';\n\nconst modules = [SwitchComponent, SwitchValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class SwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAOA;;;;;;;;;AASG;AAeI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,eAAe,CAAA;+GAAvC,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,E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OAAA,EAAA,CANR,eAAe,EAAE,eAAe,aAIrC,UAAU,EAJL,eAAe,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;gHAMpC,YAAY,EAAA,OAAA,EAAA,CANR,eAAe,EAIpB,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odx/angular",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.19.1",
|
|
4
4
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -316,18 +316,18 @@
|
|
|
316
316
|
"esm": "./esm2022/components/header-navigation/odx-angular-components-header-navigation.mjs",
|
|
317
317
|
"default": "./fesm2022/odx-angular-components-header-navigation.mjs"
|
|
318
318
|
},
|
|
319
|
-
"./components/inline-message": {
|
|
320
|
-
"types": "./components/inline-message/index.d.ts",
|
|
321
|
-
"esm2022": "./esm2022/components/inline-message/odx-angular-components-inline-message.mjs",
|
|
322
|
-
"esm": "./esm2022/components/inline-message/odx-angular-components-inline-message.mjs",
|
|
323
|
-
"default": "./fesm2022/odx-angular-components-inline-message.mjs"
|
|
324
|
-
},
|
|
325
319
|
"./components/icon": {
|
|
326
320
|
"types": "./components/icon/index.d.ts",
|
|
327
321
|
"esm2022": "./esm2022/components/icon/odx-angular-components-icon.mjs",
|
|
328
322
|
"esm": "./esm2022/components/icon/odx-angular-components-icon.mjs",
|
|
329
323
|
"default": "./fesm2022/odx-angular-components-icon.mjs"
|
|
330
324
|
},
|
|
325
|
+
"./components/inline-message": {
|
|
326
|
+
"types": "./components/inline-message/index.d.ts",
|
|
327
|
+
"esm2022": "./esm2022/components/inline-message/odx-angular-components-inline-message.mjs",
|
|
328
|
+
"esm": "./esm2022/components/inline-message/odx-angular-components-inline-message.mjs",
|
|
329
|
+
"default": "./fesm2022/odx-angular-components-inline-message.mjs"
|
|
330
|
+
},
|
|
331
331
|
"./components/link": {
|
|
332
332
|
"types": "./components/link/index.d.ts",
|
|
333
333
|
"esm2022": "./esm2022/components/link/odx-angular-components-link.mjs",
|
|
@@ -376,18 +376,18 @@
|
|
|
376
376
|
"esm": "./esm2022/components/modal/odx-angular-components-modal.mjs",
|
|
377
377
|
"default": "./fesm2022/odx-angular-components-modal.mjs"
|
|
378
378
|
},
|
|
379
|
-
"./components/notification": {
|
|
380
|
-
"types": "./components/notification/index.d.ts",
|
|
381
|
-
"esm2022": "./esm2022/components/notification/odx-angular-components-notification.mjs",
|
|
382
|
-
"esm": "./esm2022/components/notification/odx-angular-components-notification.mjs",
|
|
383
|
-
"default": "./fesm2022/odx-angular-components-notification.mjs"
|
|
384
|
-
},
|
|
385
379
|
"./components/navigation-back": {
|
|
386
380
|
"types": "./components/navigation-back/index.d.ts",
|
|
387
381
|
"esm2022": "./esm2022/components/navigation-back/odx-angular-components-navigation-back.mjs",
|
|
388
382
|
"esm": "./esm2022/components/navigation-back/odx-angular-components-navigation-back.mjs",
|
|
389
383
|
"default": "./fesm2022/odx-angular-components-navigation-back.mjs"
|
|
390
384
|
},
|
|
385
|
+
"./components/notification": {
|
|
386
|
+
"types": "./components/notification/index.d.ts",
|
|
387
|
+
"esm2022": "./esm2022/components/notification/odx-angular-components-notification.mjs",
|
|
388
|
+
"esm": "./esm2022/components/notification/odx-angular-components-notification.mjs",
|
|
389
|
+
"default": "./fesm2022/odx-angular-components-notification.mjs"
|
|
390
|
+
},
|
|
391
391
|
"./components/paginator": {
|
|
392
392
|
"types": "./components/paginator/index.d.ts",
|
|
393
393
|
"esm2022": "./esm2022/components/paginator/odx-angular-components-paginator.mjs",
|