@odx/angular 1.0.0-rc.15 → 1.0.0-rc.17
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/cdk/a11y/lib/directives/interactive.directive.d.ts +2 -2
- package/cdk/custom-form-control/lib/custom-form-control.d.ts +2 -1
- package/components/launch-tile/lib/launch-tile.component.d.ts +8 -4
- package/components/loading-spinner/lib/loading-spinner.directive.d.ts +3 -3
- package/components/menu/lib/menu.directive.d.ts +1 -0
- package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +4 -1
- package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +8 -3
- package/esm2020/cdk/a11y/lib/directives/interactive.directive.mjs +1 -1
- package/esm2020/cdk/custom-form-control/lib/custom-form-control.mjs +5 -2
- package/esm2020/components/checkbox/lib/checkbox.component.mjs +3 -3
- package/esm2020/components/launch-tile/lib/launch-tile.component.mjs +21 -16
- package/esm2020/components/loading-spinner/lib/loading-spinner.directive.mjs +8 -5
- package/esm2020/components/menu/lib/menu.directive.mjs +4 -1
- package/esm2020/components/switch/lib/switch.component.mjs +3 -3
- package/esm2020/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +11 -5
- package/esm2020/components/toggle-button-group/lib/toggle-button-group.component.mjs +18 -7
- package/esm2020/lib/directives/delegate-focus.directive.mjs +40 -0
- package/esm2020/lib/directives/index.mjs +2 -1
- package/fesm2015/odx-angular-cdk-a11y.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-custom-form-control.mjs +4 -1
- package/fesm2015/odx-angular-cdk-custom-form-control.mjs.map +1 -1
- package/fesm2015/odx-angular-components-checkbox.mjs +2 -2
- package/fesm2015/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2015/odx-angular-components-launch-tile.mjs +22 -17
- package/fesm2015/odx-angular-components-launch-tile.mjs.map +1 -1
- package/fesm2015/odx-angular-components-loading-spinner.mjs +8 -5
- package/fesm2015/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2015/odx-angular-components-menu.mjs +3 -0
- package/fesm2015/odx-angular-components-menu.mjs.map +1 -1
- package/fesm2015/odx-angular-components-switch.mjs +2 -2
- package/fesm2015/odx-angular-components-switch.mjs.map +1 -1
- package/fesm2015/odx-angular-components-toggle-button-group.mjs +29 -9
- package/fesm2015/odx-angular-components-toggle-button-group.mjs.map +1 -1
- package/fesm2015/odx-angular.mjs +40 -2
- package/fesm2015/odx-angular.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-a11y.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-custom-form-control.mjs +4 -1
- package/fesm2020/odx-angular-cdk-custom-form-control.mjs.map +1 -1
- package/fesm2020/odx-angular-components-checkbox.mjs +2 -2
- package/fesm2020/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2020/odx-angular-components-launch-tile.mjs +21 -16
- package/fesm2020/odx-angular-components-launch-tile.mjs.map +1 -1
- package/fesm2020/odx-angular-components-loading-spinner.mjs +8 -5
- package/fesm2020/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2020/odx-angular-components-menu.mjs +3 -0
- package/fesm2020/odx-angular-components-menu.mjs.map +1 -1
- package/fesm2020/odx-angular-components-switch.mjs +2 -2
- package/fesm2020/odx-angular-components-switch.mjs.map +1 -1
- package/fesm2020/odx-angular-components-toggle-button-group.mjs +26 -9
- package/fesm2020/odx-angular-components-toggle-button-group.mjs.map +1 -1
- package/fesm2020/odx-angular.mjs +40 -2
- package/fesm2020/odx-angular.mjs.map +1 -1
- package/lib/directives/delegate-focus.directive.d.ts +11 -0
- package/lib/directives/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
3
3
|
import { DisabledController, ReadonlyController } from '@odx/angular';
|
|
4
4
|
import { RadioControlDirective } from '@odx/angular/cdk/radio-group-control';
|
|
5
5
|
import { CSSComponent } from '@odx/angular/internal';
|
|
@@ -10,9 +10,12 @@ let ToggleButtonComponent = class ToggleButtonComponent extends RadioControlDire
|
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.element = injectElement();
|
|
12
12
|
}
|
|
13
|
+
focus() {
|
|
14
|
+
this.inputElement.nativeElement?.focus();
|
|
15
|
+
}
|
|
13
16
|
};
|
|
14
17
|
ToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ToggleButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
-
ToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ToggleButtonComponent, isStandalone: true, selector: "odx-toggle-button", host: { attributes: { "role": "button" } }, providers: [DisabledController.connect(), ReadonlyController.connect()], usesInheritance: true, ngImport: i0, template: "<label class=\"odx-toggle-button__label\">\n <input\n
|
|
18
|
+
ToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ToggleButtonComponent, isStandalone: true, selector: "odx-toggle-button", host: { attributes: { "role": "button" } }, providers: [DisabledController.connect(), ReadonlyController.connect()], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"odx-toggle-button__label\">\n <div class=\"odx-toggle-button__indicator\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.isRequired || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.isRequired\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n #input\n />\n <ng-content></ng-content>\n </div>\n</label>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
16
19
|
ToggleButtonComponent = __decorate([
|
|
17
20
|
CSSComponent('toggle-button')
|
|
18
21
|
], ToggleButtonComponent);
|
|
@@ -21,6 +24,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
21
24
|
type: Component,
|
|
22
25
|
args: [{ standalone: true, selector: 'odx-toggle-button', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DisabledController.connect(), ReadonlyController.connect()], host: {
|
|
23
26
|
role: 'button',
|
|
24
|
-
}, template: "<label class=\"odx-toggle-button__label\">\n <input\n
|
|
25
|
-
}]
|
|
26
|
-
|
|
27
|
+
}, template: "<label class=\"odx-toggle-button__label\">\n <div class=\"odx-toggle-button__indicator\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.isRequired || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.isRequired\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n #input\n />\n <ng-content></ng-content>\n </div>\n</label>\n" }]
|
|
28
|
+
}], propDecorators: { inputElement: [{
|
|
29
|
+
type: ViewChild,
|
|
30
|
+
args: ['input']
|
|
31
|
+
}] } });
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid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XG4gICAgICBbYXR0ci5hcmlhLWNoZWNrZWRdPVwiYXJpYUNoZWNrZWRcIlxuICAgICAgW2F0dHIuYXJpYS1pbnZhbGlkXT1cInJhZGlvR3JvdXBDb250cm9sLmhhc0Vycm9yIHx8IG51bGxcIlxuICAgICAgW2F0dHIuYXJpYS1yZWFkb25seV09XCJyZWFkb25seUNvbnRyb2xsZXI/LnJlYWRvbmx5IHx8IG51bGxcIlxuICAgICAgW2F0dHIuYXJpYS1yZXF1aXJlZF09XCJyYWRpb0dyb3VwQ29udHJvbC5pc1JlcXVpcmVkIHx8IG51bGxcIlxuICAgICAgW2NoZWNrZWRdPVwiaXNBY3RpdmVcIlxuICAgICAgW2Rpc2FibGVkXT1cImRpc2FibGVkQ29udHJvbGxlcj8uZGlzYWJsZWQgfHwgcmVhZG9ubHlDb250cm9sbGVyPy5yZWFkb25seVwiXG4gICAgICBbbmFtZV09XCJyYWRpb0dyb3VwQ29udHJvbC5uYW1lXCJcbiAgICAgIFtyZWFkb25seV09XCJyZWFkb25seUNvbnRyb2xsZXI/LnJlYWRvbmx5XCJcbiAgICAgIFtyZXF1aXJlZF09XCJyYWRpb0dyb3VwQ29udHJvbC5pc1JlcXVpcmVkXCJcbiAgICAgIFt2YWx1ZV09XCJ2YWx1ZVwiXG4gICAgICAoY2hhbmdlKT1cInJhZGlvR3JvdXBDb250cm9sLnVwZGF0ZVZhbHVlKHZhbHVlKVwiXG4gICAgICAjaW5wdXRcbiAgICAvPlxuICAgIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cbiAgPC9kaXY+XG48L2xhYmVsPlxuIl19
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
var ToggleButtonGroupComponent_1;
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { ChangeDetectionStrategy, Component, ContentChildren, forwardRef, QueryList, ViewEncapsulation } from '@angular/core';
|
|
5
|
-
import { DisabledController, ReadonlyController } from '@odx/angular';
|
|
4
|
+
import { ChangeDetectionStrategy, Component, ContentChildren, forwardRef, inject, QueryList, ViewEncapsulation } from '@angular/core';
|
|
5
|
+
import { DelegateFocusDirective, DisabledController, ReadonlyController } from '@odx/angular';
|
|
6
6
|
import { ActiveIndicatorDirective } from '@odx/angular/cdk/active-indicator';
|
|
7
7
|
import { RadioGroupControlDirective, RADIO_GROUP_CONTROL } from '@odx/angular/cdk/radio-group-control';
|
|
8
8
|
import { CSSComponent } from '@odx/angular/internal';
|
|
9
|
-
import { injectElement } from '@odx/angular/utils';
|
|
9
|
+
import { injectElement, untilDestroyed } from '@odx/angular/utils';
|
|
10
10
|
import { defer, map, merge, startWith, tap } from 'rxjs';
|
|
11
11
|
import { ToggleButtonComponent } from './components';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "@angular
|
|
13
|
+
import * as i1 from "@odx/angular";
|
|
14
|
+
import * as i2 from "@angular/common";
|
|
14
15
|
let ToggleButtonGroupComponent = ToggleButtonGroupComponent_1 = class ToggleButtonGroupComponent extends RadioGroupControlDirective {
|
|
15
16
|
constructor() {
|
|
16
17
|
super(...arguments);
|
|
18
|
+
this.delegateFocusDirective = inject(DelegateFocusDirective, { host: true });
|
|
19
|
+
this.takeUntilDestroyed = untilDestroyed();
|
|
17
20
|
this.activeElement$ = defer(() => merge(this.toggleButtons.changes, this.change$)).pipe(startWith(undefined), map(() => this.toggleButtons.find((button) => button.isActive)?.element.nativeElement ?? null), tap((activeElement) => this.element.nativeElement.classList.toggle('is-active', !!activeElement)));
|
|
18
21
|
this.element = injectElement();
|
|
19
22
|
}
|
|
23
|
+
ngOnInit() {
|
|
24
|
+
this.delegateFocusDirective.focused.pipe(this.takeUntilDestroyed()).subscribe(() => {
|
|
25
|
+
this.getFirstToggleButton()?.focus();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
getFirstToggleButton() {
|
|
29
|
+
return this.toggleButtons?.toArray()[0] ?? null;
|
|
30
|
+
}
|
|
20
31
|
};
|
|
21
32
|
ToggleButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ToggleButtonGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
22
33
|
ToggleButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ToggleButtonGroupComponent, isStandalone: true, selector: "odx-toggle-button-group", providers: [
|
|
@@ -27,7 +38,7 @@ ToggleButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
27
38
|
},
|
|
28
39
|
DisabledController.connect(),
|
|
29
40
|
ReadonlyController.connect(),
|
|
30
|
-
], queries: [{ propertyName: "toggleButtons", predicate: ToggleButtonComponent }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"odx-toggle-button\"> </ng-content>\n<div class=\"odx-toggle-button-group__indicator\" [odxActiveIndicator]=\"activeElement$ | async\"></div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type:
|
|
41
|
+
], queries: [{ propertyName: "toggleButtons", predicate: ToggleButtonComponent }], usesInheritance: true, hostDirectives: [{ directive: i1.DelegateFocusDirective }], ngImport: i0, template: "<ng-content select=\"odx-toggle-button\"> </ng-content>\n<div class=\"odx-toggle-button-group__indicator\" [odxActiveIndicator]=\"activeElement$ | async\"></div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "directive", type: ActiveIndicatorDirective, selector: "[odxActiveIndicator]", inputs: ["odxActiveIndicator", "odxActiveIndicatorParent", "odxActiveIndicatorDirection", "odxActiveIndicatorPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
31
42
|
ToggleButtonGroupComponent = ToggleButtonGroupComponent_1 = __decorate([
|
|
32
43
|
CSSComponent('toggle-button-group')
|
|
33
44
|
], ToggleButtonGroupComponent);
|
|
@@ -42,9 +53,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
42
53
|
},
|
|
43
54
|
DisabledController.connect(),
|
|
44
55
|
ReadonlyController.connect(),
|
|
45
|
-
], template: "<ng-content select=\"odx-toggle-button\"> </ng-content>\n<div class=\"odx-toggle-button-group__indicator\" [odxActiveIndicator]=\"activeElement$ | async\"></div>\n" }]
|
|
56
|
+
], hostDirectives: [DelegateFocusDirective], template: "<ng-content select=\"odx-toggle-button\"> </ng-content>\n<div class=\"odx-toggle-button-group__indicator\" [odxActiveIndicator]=\"activeElement$ | async\"></div>\n" }]
|
|
46
57
|
}], propDecorators: { toggleButtons: [{
|
|
47
58
|
type: ContentChildren,
|
|
48
59
|
args: [ToggleButtonComponent]
|
|
49
60
|
}] } });
|
|
50
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
61
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLWJ1dHRvbi1ncm91cC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXIvY29tcG9uZW50cy90b2dnbGUtYnV0dG9uLWdyb3VwL3NyYy9saWIvdG9nZ2xlLWJ1dHRvbi1ncm91cC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXIvY29tcG9uZW50cy90b2dnbGUtYnV0dG9uLWdyb3VwL3NyYy9saWIvdG9nZ2xlLWJ1dHRvbi1ncm91cC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLGV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SgnaXMtYWN0aXZlJywgISFhY3RpdmVFbGVtZW50KSlcbiAgKTtcblxuICBAQ29udGVudENoaWxkcmVuKFRvZ2dsZUJ1dHRvbkNvbXBvbmVudClcbiAgcHJvdGVjdGVkIHRvZ2dsZUJ1dHRvbnMhOiBRdWVyeUxpc3Q8VG9nZ2xlQnV0dG9uQ29tcG9uZW50PjtcblxuICBwdWJsaWMgcmVhZG9ubHkgZWxlbWVudCA9IGluamVjdEVsZW1lbnQoKTtcblxuICBwdWJsaWMgbmdPbkluaXQoKTogdm9pZCB7XG4gICAgdGhpcy5kZWxlZ2F0ZUZvY3VzRGlyZWN0aXZlLmZvY3VzZWQucGlwZSh0aGlzLnRha2VVbnRpbERlc3Ryb3llZCgpKS5zdWJzY3JpYmUoKCkgPT4ge1xuICAgICAgdGhpcy5nZXRGaXJzdFRvZ2dsZUJ1dHRvbigpPy5mb2N1cygpO1xuICAgIH0pO1xuICB9XG5cbiAgcHJpdmF0ZSBnZXRGaXJzdFRvZ2dsZUJ1dHRvbigpOiBUb2dnbGVCdXR0b25Db21wb25lbnQgfCBudWxsIHtcbiAgICByZXR1cm4gdGhpcy50b2dnbGVCdXR0b25zPy50b0FycmF5KClbMF0gPz8gbnVsbDtcbiAgfVxufVxuIiwiPG5nLWNvbnRlbnQgc2VsZWN0PVwib2R4LXRvZ2dsZS1idXR0b25cIj4gPC9uZy1jb250ZW50PlxuPGRpdiBjbGFzcz1cIm9keC10b2dnbGUtYnV0dG9uLWdyb3VwX19pbmRpY2F0b3JcIiBbb2R4QWN0aXZlSW5kaWNhdG9yXT1cImFjdGl2ZUVsZW1lbnQkIHwgYXN5bmNcIj48L2Rpdj5cbiJdfQ==
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Directive, EventEmitter, HostListener, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class DelegateFocusDirective {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.tabindex = 0;
|
|
6
|
+
this.focused = new EventEmitter();
|
|
7
|
+
}
|
|
8
|
+
handleFocus() {
|
|
9
|
+
this.focused.next();
|
|
10
|
+
}
|
|
11
|
+
handleFocusIn() {
|
|
12
|
+
this.tabindex = -1;
|
|
13
|
+
}
|
|
14
|
+
handleFocusOut() {
|
|
15
|
+
this.tabindex = 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
DelegateFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DelegateFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
19
|
+
DelegateFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: DelegateFocusDirective, isStandalone: true, outputs: { focused: "focused" }, host: { listeners: { "focus": "handleFocus()", "focusin": "handleFocusIn()", "focusout": "handleFocusOut()" }, properties: { "attr.tabindex": "tabindex" } }, ngImport: i0 });
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DelegateFocusDirective, decorators: [{
|
|
21
|
+
type: Directive,
|
|
22
|
+
args: [{
|
|
23
|
+
standalone: true,
|
|
24
|
+
host: {
|
|
25
|
+
'[attr.tabindex]': 'tabindex',
|
|
26
|
+
},
|
|
27
|
+
}]
|
|
28
|
+
}], propDecorators: { focused: [{
|
|
29
|
+
type: Output
|
|
30
|
+
}], handleFocus: [{
|
|
31
|
+
type: HostListener,
|
|
32
|
+
args: ['focus']
|
|
33
|
+
}], handleFocusIn: [{
|
|
34
|
+
type: HostListener,
|
|
35
|
+
args: ['focusin']
|
|
36
|
+
}], handleFocusOut: [{
|
|
37
|
+
type: HostListener,
|
|
38
|
+
args: ['focusout']
|
|
39
|
+
}] } });
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsZWdhdGUtZm9jdXMuZGlyZWN0aXZlLmpzIiwic291cm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gSG9zdExpc3RlbmVyLCBPdXRwdXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQERpcmVjdGl2ZSh7XG4gIHN0YW5kYWxvbmU6IHRydWUsXG4gIGhvc3Q6IHtcbiAgICAnW2F0dHIudGFiaW5kZXhdJzogJ3RhYmluZGV4JyxcbiAgfSxcbn0pXG5leHBvcnQgY2xhc3MgRGVsZWdhdGVGb2N1c0RpcmVjdGl2ZSB7XG4gIHByb3RlY3RlZCB0YWJpbmRleCA9IDA7XG5cbiAgQE91dHB1dCgpXG4gIHB1YmxpYyBmb2N1c2VkID0gbmV3IEV2ZW50RW1pdHRlcjx2b2lkPigpO1xuXG4gIEBIb3N0TGlzdGVuZXIoJ2ZvY3VzJylcbiAgcHJvdGVjdGVkIGhhbmRsZUZvY3VzKCk6IHZvaWQge1xuICAgIHRoaXMuZm9jdXNlZC5uZXh0KCk7XG4gIH1cblxuICBASG9zdExpc3RlbmVyKCdmb2N1c2luJylcbiAgcHJvdGVjdGVkIGhhbmRsZUZvY3VzSW4oKTogdm9pZCB7XG4gICAgdGhpcy50YWJpbmRleCA9IC0xO1xuICB9XG5cbiAgQEhvc3RMaXN0ZW5lcignZm9jdXNvdXQnKVxuICBwcm90ZWN0ZWQgaGFuZGxlRm9jdXNPdXQoKTogdm9pZCB7XG4gICAgdGhpcy50YWJpbmRleCA9IDA7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './click-outside.directive';
|
|
2
|
+
export * from './delegate-focus.directive';
|
|
2
3
|
export * from './with-disabled-state.directive';
|
|
3
4
|
export * from './with-tabindex.directive';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXIvc3JjL2xpYi9kaXJlY3RpdmVzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsMkJBQTJCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NsaWNrLW91dHNpZGUuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vZGVsZWdhdGUtZm9jdXMuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vd2l0aC1kaXNhYmxlZC1zdGF0ZS5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi93aXRoLXRhYmluZGV4LmRpcmVjdGl2ZSc7XG4iXX0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-a11y.mjs","sources":["../../../../libs/angular/cdk/a11y/src/lib/directives/interactive.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager-option.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/a11y.module.ts","../../../../libs/angular/cdk/a11y/src/odx-angular-cdk-a11y.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { DisabledController, WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('cdk-interactive')\n@Directive({\n selector: '[odxCdkInteractive]',\n standalone: true,\n hostDirectives: [WithDisabledState, WithTabIndex],\n host: {\n role: 'button',\n },\n})\nexport class InteractiveDirective {\n private readonly disabledController = DisabledController.inject();\n\n public readonly element = injectElement();\n\n @Output('odxCdkInteractive')\n public interact = new EventEmitter<
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-a11y.mjs","sources":["../../../../libs/angular/cdk/a11y/src/lib/directives/interactive.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager-option.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/a11y.module.ts","../../../../libs/angular/cdk/a11y/src/odx-angular-cdk-a11y.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { DisabledController, WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('cdk-interactive')\n@Directive({\n selector: '[odxCdkInteractive]',\n standalone: true,\n hostDirectives: [WithDisabledState, WithTabIndex],\n host: {\n role: 'button',\n },\n})\nexport class InteractiveDirective {\n private readonly disabledController = DisabledController.inject();\n\n public readonly element = injectElement();\n\n @Output('odxCdkInteractive')\n public interact = new EventEmitter<MouseEvent | KeyboardEvent>();\n\n @HostListener('click', ['$event'])\n @HostListener('keyup.enter', ['$event'])\n @HostListener('keyup.space', ['$event'])\n protected handleEvents(event: MouseEvent | KeyboardEvent) {\n if (!this.disabledController?.disabled) {\n this.interact.next(event);\n }\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport { Directive } from '@angular/core';\nimport { DisabledController } from '@odx/angular';\nimport { injectElement } from '@odx/angular/utils';\n\n@Directive({\n selector: '[odxListFocusManager]',\n standalone: true,\n})\nexport class ListFocusManagerOptionDirective implements FocusableOption {\n private readonly disabledController = DisabledController.inject();\n private readonly element = injectElement();\n\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n public focus(): void {\n this.element.nativeElement.focus();\n }\n}\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { AfterContentInit, ContentChildren, Directive, HostListener, OnDestroy, QueryList } from '@angular/core';\nimport { deferFn } from '@odx/angular/utils';\nimport { ListFocusManagerOptionDirective } from './list-focus-manager-option.directive';\n\n@Directive({\n selector: '[odxListFocusManager]',\n standalone: true,\n})\nexport class ListFocusManagerDirective implements AfterContentInit, OnDestroy {\n private keyManager: FocusKeyManager<ListFocusManagerOptionDirective> | null = null;\n\n @ContentChildren(ListFocusManagerOptionDirective)\n protected options!: QueryList<ListFocusManagerOptionDirective>;\n\n public ngAfterContentInit(): void {\n this.keyManager = new FocusKeyManager(this.options)\n .withHomeAndEnd()\n .withWrap()\n .skipPredicate((item) => item.disabled);\n deferFn(() => this.keyManager?.setFirstItemActive());\n }\n\n public ngOnDestroy(): void {\n this.keyManager?.destroy();\n this.keyManager = null;\n }\n\n @HostListener('keydown', ['$event'])\n protected onKeyDown(event: KeyboardEvent): void {\n this.keyManager?.onKeydown(event);\n }\n}\n","import { A11yModule as NgCdkA11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { InteractiveDirective, ListFocusManagerDirective, ListFocusManagerOptionDirective } from './directives';\n\nconst modules = [ListFocusManagerDirective, ListFocusManagerOptionDirective, InteractiveDirective];\n\n@NgModule({\n imports: [NgCdkA11yModule, ...modules],\n exports: [CoreModule, NgCdkA11yModule, ...modules],\n})\nexport class A11yModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgCdkA11yModule"],"mappings":";;;;;;;;;AAca,IAAA,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;AAA1B,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC;AAElD,QAAA,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAGnC,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAA8B,CAAC;KAUlE;AALW,IAAA,YAAY,CAAC,KAAiC,EAAA;;QACtD,IAAI,EAAC,CAAA,EAAA,GAAA,IAAI,CAAC,kBAAkB,MAAA,IAAA,IAAA,EAAA,K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,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACvBrC,MAAM,OAAO,GAAG,CAAC,yBAAyB,EAAE,+BAA+B,EAAE,oBAAoB,CAAC,CAAC;MAMtF,UAAU,CAAA;;uGAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAV,UAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAHXA,YAAe,EAHV,yBAAyB,EAAE,+BAA+B,EAAE,oBAAoB,CAIrF,EAAA,OAAA,EAAA,CAAA,UAAU,EAAEA,YAAe,EAJtB,yBAAyB,EAAE,+BAA+B,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAMpF,UAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,EAHX,OAAA,EAAA,CAAAA,YAAe,EACf,UAAU,EAAEA,YAAe,CAAA,EAAA,CAAA,CAAA;2FAE1B,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAACA,YAAe,EAAE,GAAG,OAAO,CAAC;oBACtC,OAAO,EAAE,CAAC,UAAU,EAAEA,YAAe,EAAE,GAAG,OAAO,CAAC;iBACnD,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -54,6 +54,7 @@ class CustomFormControl extends Controller {
|
|
|
54
54
|
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
55
55
|
this.id = null;
|
|
56
56
|
this.name = `odx-form-control-${CustomFormControl.CURRENT_INDEX++}`;
|
|
57
|
+
this.tabindex = null;
|
|
57
58
|
this.control = null;
|
|
58
59
|
this.internalValue = initialValue;
|
|
59
60
|
if (this.ngControl) {
|
|
@@ -95,7 +96,7 @@ class CustomFormControl extends Controller {
|
|
|
95
96
|
}
|
|
96
97
|
CustomFormControl.CURRENT_INDEX = 0;
|
|
97
98
|
CustomFormControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: CustomFormControl, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
98
|
-
CustomFormControl.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: CustomFormControl, inputs: { id: "id", name: "name" }, host: { properties: { "class.has-error": "hasError", "class.is-disabled": "isDisabled", "class.is-readonly": "isReadonly", "class.is-required": "required" } }, viewQueries: [{ propertyName: "control", first: true, predicate: ControlDirective, descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
99
|
+
CustomFormControl.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: CustomFormControl, inputs: { id: "id", name: "name", tabindex: "tabindex" }, host: { properties: { "class.has-error": "hasError", "class.is-disabled": "isDisabled", "class.is-readonly": "isReadonly", "class.is-required": "required" } }, viewQueries: [{ propertyName: "control", first: true, predicate: ControlDirective, descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
99
100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: CustomFormControl, decorators: [{
|
|
100
101
|
type: Directive,
|
|
101
102
|
args: [{
|
|
@@ -110,6 +111,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
110
111
|
type: Input
|
|
111
112
|
}], name: [{
|
|
112
113
|
type: Input
|
|
114
|
+
}], tabindex: [{
|
|
115
|
+
type: Input
|
|
113
116
|
}], control: [{
|
|
114
117
|
type: ViewChild,
|
|
115
118
|
args: [ControlDirective]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-custom-form-control.mjs","sources":["../../../../libs/angular/cdk/custom-form-control/src/lib/control.directive.ts","../../../../libs/angular/cdk/custom-form-control/src/lib/custom-form-control.ts","../../../../libs/angular/cdk/custom-form-control/src/odx-angular-cdk-custom-form-control.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { injectElement } from '@odx/angular/utils';\n\n@Directive({\n standalone: true,\n selector: '[odxControl]',\n exportAs: 'odxControl',\n})\nexport class ControlDirective {\n public readonly element = injectElement();\n}\n","import { Directive, inject, Input, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NgControl, RequiredValidator, ValidatorFn, Validators } from '@angular/forms';\nimport { Controller, DisabledController, ReadonlyController } from '@odx/angular';\nimport { ControlDirective } from './control.directive';\n\n@Directive({\n host: {\n '[class.has-error]': 'hasError',\n '[class.is-disabled]': 'isDisabled',\n '[class.is-readonly]': 'isReadonly',\n '[class.is-required]': 'required',\n },\n})\nexport abstract class CustomFormControl<T> extends Controller implements ControlValueAccessor {\n private static CURRENT_INDEX = 0;\n\n private readonly requiredValidator = inject(RequiredValidator, { optional: true, self: true });\n private internalValue: T;\n protected readonly disabledController = DisabledController.inject();\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n @Input()\n public id: string | null = null;\n\n @Input()\n public name = `odx-form-control-${CustomFormControl.CURRENT_INDEX++}`;\n\n public set value(value: T) {\n if (this.internalValue !== value) {\n this.internalValue = value;\n this.triggerControllerChange();\n }\n }\n public get value(): T {\n return this.internalValue;\n }\n\n public get hasError(): boolean {\n return !!this.ngControl?.touched && !!this.ngControl?.invalid;\n }\n\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n public get isReadonly(): boolean {\n return !!this.readonlyController?.readonly;\n }\n\n public get isRequired(): boolean {\n return !!this.requiredValidator?.required || this.hasValidator(Validators.required) || this.hasValidator(Validators.requiredTrue);\n }\n\n @ViewChild(ControlDirective)\n public readonly control: ControlDirective | null = null;\n\n constructor(initialValue: T) {\n super();\n this.internalValue = initialValue;\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n public onTouched() {\n // implemented by control value accessor\n }\n\n public onChange(_value: T) {\n // implemented by control value accessor\n }\n\n public registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this.disabledController?.setDisabledState(isDisabled);\n }\n\n public writeValue(value: T): void {\n if (this.isDisabled) return;\n this.value = value;\n this.onChange(value);\n }\n\n public updateValue(value: T): void {\n if (this.isDisabled) return;\n this.writeValue(value);\n this.onTouched();\n }\n\n protected hasValidator(validator: ValidatorFn): boolean {\n return !!this.ngControl?.control?.hasValidator(validator);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,gBAAgB,CAAA;AAL7B,IAAA,WAAA,GAAA;AAMkB,QAAA,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;KAC3C;;6GAFY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;iGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,YAAY;iBACvB,CAAA;;;ACMK,MAAgB,iBAAqB,SAAQ,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-custom-form-control.mjs","sources":["../../../../libs/angular/cdk/custom-form-control/src/lib/control.directive.ts","../../../../libs/angular/cdk/custom-form-control/src/lib/custom-form-control.ts","../../../../libs/angular/cdk/custom-form-control/src/odx-angular-cdk-custom-form-control.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { injectElement } from '@odx/angular/utils';\n\n@Directive({\n standalone: true,\n selector: '[odxControl]',\n exportAs: 'odxControl',\n})\nexport class ControlDirective {\n public readonly element = injectElement();\n}\n","import { Directive, inject, Input, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NgControl, RequiredValidator, ValidatorFn, Validators } from '@angular/forms';\nimport { Controller, DisabledController, ReadonlyController } from '@odx/angular';\nimport { ControlDirective } from './control.directive';\n\n@Directive({\n host: {\n '[class.has-error]': 'hasError',\n '[class.is-disabled]': 'isDisabled',\n '[class.is-readonly]': 'isReadonly',\n '[class.is-required]': 'required',\n },\n})\nexport abstract class CustomFormControl<T> extends Controller implements ControlValueAccessor {\n private static CURRENT_INDEX = 0;\n\n private readonly requiredValidator = inject(RequiredValidator, { optional: true, self: true });\n private internalValue: T;\n protected readonly disabledController = DisabledController.inject();\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n @Input()\n public id: string | null = null;\n\n @Input()\n public name = `odx-form-control-${CustomFormControl.CURRENT_INDEX++}`;\n\n @Input()\n public tabindex: string | null = null;\n\n public set value(value: T) {\n if (this.internalValue !== value) {\n this.internalValue = value;\n this.triggerControllerChange();\n }\n }\n public get value(): T {\n return this.internalValue;\n }\n\n public get hasError(): boolean {\n return !!this.ngControl?.touched && !!this.ngControl?.invalid;\n }\n\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n public get isReadonly(): boolean {\n return !!this.readonlyController?.readonly;\n }\n\n public get isRequired(): boolean {\n return !!this.requiredValidator?.required || this.hasValidator(Validators.required) || this.hasValidator(Validators.requiredTrue);\n }\n\n @ViewChild(ControlDirective)\n public readonly control: ControlDirective | null = null;\n\n constructor(initialValue: T) {\n super();\n this.internalValue = initialValue;\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n public onTouched() {\n // implemented by control value accessor\n }\n\n public onChange(_value: T) {\n // implemented by control value accessor\n }\n\n public registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this.disabledController?.setDisabledState(isDisabled);\n }\n\n public writeValue(value: T): void {\n if (this.isDisabled) return;\n this.value = value;\n this.onChange(value);\n }\n\n public updateValue(value: T): void {\n if (this.isDisabled) return;\n this.writeValue(value);\n this.onTouched();\n }\n\n protected hasValidator(validator: ValidatorFn): boolean {\n return !!this.ngControl?.control?.hasValidator(validator);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,gBAAgB,CAAA;AAL7B,IAAA,WAAA,GAAA;AAMkB,QAAA,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;KAC3C;;6GAFY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;iGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,YAAY;iBACvB,CAAA;;;ACMK,MAAgB,iBAAqB,SAAQ,UAAU,CAAA;IAkB3D,IAAW,KAAK,CAAC,KAAQ,EAAA;AACvB,Q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,EAAE,UAAU;AAC/B,wBAAA,qBAAqB,EAAE,YAAY;AACnC,wBAAA,qBAAqB,EAAE,YAAY;AACnC,wBAAA,qBAAqB,EAAE,UAAU;AAClC,qBAAA;iBACF,CAAA;6FAWQ,EAAE,EAAA,CAAA;sBADR,KAAK;gBAIC,IAAI,EAAA,CAAA;sBADV,KAAK;gBAIC,QAAQ,EAAA,CAAA;sBADd,KAAK;gBA8BU,OAAO,EAAA,CAAA;sBADtB,SAAS;uBAAC,gBAAgB,CAAA;;;ACzD7B;;AAEG;;;;"}
|
|
@@ -38,7 +38,7 @@ let CheckboxComponent = class CheckboxComponent extends CheckBoxControl {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
-
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: CheckboxComponent, isStandalone: true, selector: "odx-checkbox", inputs: { indeterminate: "indeterminate" }, outputs: { indeterminateChange: "indeterminateChange" }, host: { properties: { "class.is-active": "checked || indeterminate" } }, providers: [ReadonlyController.connect()], usesInheritance: true, hostDirectives: [{ directive: i1.WithDisabledState }], ngImport: i0, template: "<label class=\"odx-checkbox__label\">\n <input\n odxControl\n class=\"odx-checkbox__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 [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [indeterminate]=\"indeterminate\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-checkbox__indicator\">\n <odx-icon [name]=\"modifierIcon\"></odx-icon>\n </div>\n <div class=\"odx-checkbox__content\">\n <ng-content></ng-content>\n </div>\n</label>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }, { kind: "directive", type: ControlDirective, selector: "[odxControl]", exportAs: ["odxControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
41
|
+
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: CheckboxComponent, isStandalone: true, selector: "odx-checkbox", inputs: { indeterminate: "indeterminate" }, outputs: { indeterminateChange: "indeterminateChange" }, host: { properties: { "class.is-active": "checked || indeterminate" } }, providers: [ReadonlyController.connect()], usesInheritance: true, hostDirectives: [{ directive: i1.WithDisabledState }], ngImport: i0, template: "<label class=\"odx-checkbox__label\">\n <input\n odxControl\n class=\"odx-checkbox__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 [indeterminate]=\"indeterminate\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-checkbox__indicator\">\n <odx-icon [name]=\"modifierIcon\"></odx-icon>\n </div>\n <div class=\"odx-checkbox__content\">\n <ng-content></ng-content>\n </div>\n</label>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }, { kind: "directive", type: ControlDirective, selector: "[odxControl]", exportAs: ["odxControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
42
42
|
__decorate([
|
|
43
43
|
CSSModifier(),
|
|
44
44
|
__metadata("design:type", Object),
|
|
@@ -51,7 +51,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
51
51
|
type: Component,
|
|
52
52
|
args: [{ standalone: true, selector: 'odx-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [IconComponent, ControlDirective], providers: [ReadonlyController.connect()], hostDirectives: [WithDisabledState], host: {
|
|
53
53
|
'[class.is-active]': 'checked || indeterminate',
|
|
54
|
-
}, template: "<label class=\"odx-checkbox__label\">\n <input\n odxControl\n class=\"odx-checkbox__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 [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [indeterminate]=\"indeterminate\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-checkbox__indicator\">\n <odx-icon [name]=\"modifierIcon\"></odx-icon>\n </div>\n <div class=\"odx-checkbox__content\">\n <ng-content></ng-content>\n </div>\n</label>\n" }]
|
|
54
|
+
}, template: "<label class=\"odx-checkbox__label\">\n <input\n odxControl\n class=\"odx-checkbox__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 [indeterminate]=\"indeterminate\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-checkbox__indicator\">\n <odx-icon [name]=\"modifierIcon\"></odx-icon>\n </div>\n <div class=\"odx-checkbox__content\">\n <ng-content></ng-content>\n </div>\n</label>\n" }]
|
|
55
55
|
}], propDecorators: { indeterminate: [{
|
|
56
56
|
type: Input
|
|
57
57
|
}], indeterminateChange: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-checkbox.mjs","sources":["../../../../libs/angular/components/checkbox/src/lib/checkbox.component.ts","../../../../libs/angular/components/checkbox/src/lib/checkbox.component.html","../../../../libs/angular/components/checkbox/src/lib/checkbox.validator.ts","../../../../libs/angular/components/checkbox/src/lib/checkbox.module.ts","../../../../libs/angular/components/checkbox/src/odx-angular-components-checkbox.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, 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, CSSModifier } from '@odx/angular/internal';\n\n@CSSComponent('checkbox')\n@Component({\n standalone: true,\n selector: 'odx-checkbox',\n templateUrl: 'checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [IconComponent, ControlDirective],\n providers: [ReadonlyController.connect()],\n hostDirectives: [WithDisabledState],\n host: {\n '[class.is-active]': 'checked || indeterminate',\n },\n})\nexport class CheckboxComponent extends CheckBoxControl {\n public static ngAcceptInputType_indeterminate: BooleanInput;\n\n private isIndeterminate = false;\n\n @CSSModifier()\n @Input()\n public set indeterminate(value: unknown) {\n if (this.isIndeterminate !== value) {\n this.isIndeterminate = coerceBooleanProperty(value);\n this.indeterminateChange.emit(this.isIndeterminate);\n }\n }\n\n public get indeterminate(): boolean {\n return this.isIndeterminate;\n }\n\n @Output()\n public readonly indeterminateChange = new EventEmitter<boolean>();\n\n public override get ariaChecked(): string {\n return this.checked ? 'true' : this.indeterminate ? 'mixed' : 'false';\n }\n\n public get modifierIcon(): string {\n return this.indeterminate ? 'indeterminate' : 'check';\n }\n\n public override onChanged(event: Event): void {\n event.stopPropagation();\n this.indeterminate = false;\n super.updateValue((event.target as HTMLInputElement).checked);\n }\n}\n","<label class=\"odx-checkbox__label\">\n <input\n odxControl\n class=\"odx-checkbox__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 [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [indeterminate]=\"indeterminate\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-checkbox__indicator\">\n <odx-icon [name]=\"modifierIcon\"></odx-icon>\n </div>\n <div class=\"odx-checkbox__content\">\n <ng-content></ng-content>\n </div>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\n@Directive({\n standalone: true,\n selector: 'odx-checkbox[required][formControlName], odx-checkbox[required][formControl], odx-checkbox[required][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => CheckboxValidator),\n multi: true,\n },\n ],\n})\nexport class CheckboxValidator extends CheckboxRequiredValidator {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CheckboxComponent } from './checkbox.component';\nimport { CheckboxValidator } from './checkbox.validator';\n\nconst modules = [CheckboxComponent, CheckboxValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class CheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAsBO,IAAM,iBAAiB,GAAvB,MAAM,0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,aAAA,EAAA,eAAA,EAAA,EAAA,OAAA,EAAA,EAAA,mBAAA,EAAA,qBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,0BAAA,EAAA,EAAA,EAAA,SAAA,EAAA,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChB3C,
|
|
1
|
+
{"version":3,"file":"odx-angular-components-checkbox.mjs","sources":["../../../../libs/angular/components/checkbox/src/lib/checkbox.component.ts","../../../../libs/angular/components/checkbox/src/lib/checkbox.component.html","../../../../libs/angular/components/checkbox/src/lib/checkbox.validator.ts","../../../../libs/angular/components/checkbox/src/lib/checkbox.module.ts","../../../../libs/angular/components/checkbox/src/odx-angular-components-checkbox.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, 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, CSSModifier } from '@odx/angular/internal';\n\n@CSSComponent('checkbox')\n@Component({\n standalone: true,\n selector: 'odx-checkbox',\n templateUrl: 'checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [IconComponent, ControlDirective],\n providers: [ReadonlyController.connect()],\n hostDirectives: [WithDisabledState],\n host: {\n '[class.is-active]': 'checked || indeterminate',\n },\n})\nexport class CheckboxComponent extends CheckBoxControl {\n public static ngAcceptInputType_indeterminate: BooleanInput;\n\n private isIndeterminate = false;\n\n @CSSModifier()\n @Input()\n public set indeterminate(value: unknown) {\n if (this.isIndeterminate !== value) {\n this.isIndeterminate = coerceBooleanProperty(value);\n this.indeterminateChange.emit(this.isIndeterminate);\n }\n }\n\n public get indeterminate(): boolean {\n return this.isIndeterminate;\n }\n\n @Output()\n public readonly indeterminateChange = new EventEmitter<boolean>();\n\n public override get ariaChecked(): string {\n return this.checked ? 'true' : this.indeterminate ? 'mixed' : 'false';\n }\n\n public get modifierIcon(): string {\n return this.indeterminate ? 'indeterminate' : 'check';\n }\n\n public override onChanged(event: Event): void {\n event.stopPropagation();\n this.indeterminate = false;\n super.updateValue((event.target as HTMLInputElement).checked);\n }\n}\n","<label class=\"odx-checkbox__label\">\n <input\n odxControl\n class=\"odx-checkbox__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 [indeterminate]=\"indeterminate\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-checkbox__indicator\">\n <odx-icon [name]=\"modifierIcon\"></odx-icon>\n </div>\n <div class=\"odx-checkbox__content\">\n <ng-content></ng-content>\n </div>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\n@Directive({\n standalone: true,\n selector: 'odx-checkbox[required][formControlName], odx-checkbox[required][formControl], odx-checkbox[required][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => CheckboxValidator),\n multi: true,\n },\n ],\n})\nexport class CheckboxValidator extends CheckboxRequiredValidator {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CheckboxComponent } from './checkbox.component';\nimport { CheckboxValidator } from './checkbox.validator';\n\nconst modules = [CheckboxComponent, CheckboxValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class CheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAsBO,IAAM,iBAAiB,GAAvB,MAAM,0BAA0B,eAAe,CAAA;AAA/C,IAAA,WAAA,GAAA;;AAGG,QAAA,IAAe,CAAA,eAAA,GAAG,KAAK,CAAC;AAgBhB,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,YAAY,EAAW,CAAC;KAenE;IA7BC,IAEW,aAAa,CAAC,KAAc,EAAA;AACrC,QAAA,IAAI,IAAI,CAAC,eAAe,KAAK,KAAK,EAAE;AAClC,YAAA,IAAI,CAAC,eAAe,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;YACpD,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AACrD,SAAA;KACF;AAED,IAAA,IAAW,aAAa,GAAA;QACtB,OAAO,IAAI,CAAC,eAAe,CAAC;KAC7B;AAKD,IAAA,IAAoB,WAAW,GAAA;QAC7B,OAAO,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC,aAAa,GAAG,OAAO,GAAG,OAAO,CAAC;KACvE;AAED,IAAA,IAAW,YAAY,GAAA;QACrB,OAAO,IAAI,CAAC,aAAa,GAAG,eAAe,GAAG,OAAO,CAAC;KACvD;AAEe,IAAA,SAAS,CAAC,KAAY,EAAA;QACpC,KAAK,CAAC,eAAe,EAAE,CAAC;AACxB,QAAA,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,KAAK,CAAC,WAAW,CAAE,KAAK,CAAC,MAA2B,CAAC,OAAO,CAAC,CAAC;KAC/D;;8GAjCU,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,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AA,OAAO,EAAE,aAAa;AACtB,4BAAA,WAAW,EAAE,UAAU,CAAC,uBAAuB,CAAC;AAChD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;iBACF,CAAA;;;ACRD,MAAM,OAAO,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;MAM1C,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;4GAAd,cAAc,EAAA,OAAA,EAAA,CANV,iBAAiB,EAAE,iBAAiB,aAIzC,UAAU,EAJL,iBAAiB,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;4GAMxC,cAAc,EAAA,OAAA,EAAA,CANV,iBAAiB,EAItB,UAAU,CAAA,EAAA,CAAA,CAAA;2FAET,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;iBAClC,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, ContentChild, ViewChild,
|
|
3
|
-
import { __decorate } from 'tslib';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, inject, EventEmitter, ElementRef, ContentChild, ViewChild, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { __decorate, __metadata } from 'tslib';
|
|
4
4
|
import * as i1 from '@odx/angular/cdk/a11y';
|
|
5
|
-
import {
|
|
5
|
+
import { InteractiveDirective, A11yModule } from '@odx/angular/cdk/a11y';
|
|
6
6
|
import { ActionGroupComponent } from '@odx/angular/components/action-group';
|
|
7
7
|
import { ButtonComponent } from '@odx/angular/components/button';
|
|
8
8
|
import { IconComponent } from '@odx/angular/components/icon';
|
|
9
9
|
import * as i3 from '@odx/angular/components/menu';
|
|
10
10
|
import { MenuComponent, MenuDirective, MenuModule } from '@odx/angular/components/menu';
|
|
11
11
|
import { CSSComponent } from '@odx/angular/internal';
|
|
12
|
-
import { injectElement, containsElement } from '@odx/angular/utils';
|
|
12
|
+
import { untilDestroyed, injectElement, containsElement } from '@odx/angular/utils';
|
|
13
13
|
import * as i2 from '@angular/common';
|
|
14
14
|
import { CoreModule } from '@odx/angular';
|
|
15
15
|
import { AvatarComponent } from '@odx/angular/components/avatar';
|
|
@@ -38,39 +38,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
38
38
|
|
|
39
39
|
let LaunchTileComponent = class LaunchTileComponent {
|
|
40
40
|
constructor() {
|
|
41
|
+
this.interactiveDirective = inject(InteractiveDirective, { host: true });
|
|
42
|
+
this.takeUntilDestroyed = untilDestroyed();
|
|
43
|
+
this.interact = new EventEmitter();
|
|
41
44
|
this.element = injectElement();
|
|
45
|
+
this.interactiveDirective.interact.pipe(this.takeUntilDestroyed()).subscribe((event) => {
|
|
46
|
+
this.stopEvents(event);
|
|
47
|
+
});
|
|
42
48
|
}
|
|
43
49
|
stopEvents(event) {
|
|
44
|
-
var _a, _b;
|
|
50
|
+
var _a, _b, _c;
|
|
45
51
|
const target = event.target;
|
|
46
52
|
const isFooterEvent = containsElement((_a = this.footer) === null || _a === void 0 ? void 0 : _a.nativeElement, target, false);
|
|
47
|
-
const isMenuEvent = containsElement((_b = this.menuHost) === null || _b === void 0 ? void 0 : _b.nativeElement, target);
|
|
48
|
-
if (isFooterEvent
|
|
49
|
-
|
|
50
|
-
return;
|
|
53
|
+
const isMenuEvent = containsElement((_b = this.menuHost) === null || _b === void 0 ? void 0 : _b.element.nativeElement, target);
|
|
54
|
+
if (!isFooterEvent && !isMenuEvent && !((_c = this.menuHost) === null || _c === void 0 ? void 0 : _c.isOpen())) {
|
|
55
|
+
this.interact.emit(event);
|
|
51
56
|
}
|
|
52
57
|
}
|
|
53
58
|
};
|
|
54
59
|
LaunchTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LaunchTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
-
LaunchTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: LaunchTileComponent, isStandalone: true, selector: "odx-launch-tile",
|
|
60
|
+
LaunchTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: LaunchTileComponent, isStandalone: true, selector: "odx-launch-tile", outputs: { interact: "interact" }, queries: [{ propertyName: "menu", first: true, predicate: MenuComponent, descendants: true }, { propertyName: "footer", first: true, predicate: LaunchTileFooterComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "menuHost", first: true, predicate: MenuDirective, descendants: true }], hostDirectives: [{ directive: i1.InteractiveDirective }], ngImport: i0, template: "<div class=\"odx-launch-tile__trigger\">\n <div class=\"odx-launch-tile__container\">\n <ng-content select=\"odx-avatar\"></ng-content>\n <div class=\"odx-launch-tile__content\">\n <div class=\"odx-launch-tile__title\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"odx-launch-tile-subtitle\"></ng-content>\n </div>\n </div>\n\n <ng-content select=\"odx-launch-tile-footer\"></ng-content>\n\n <odx-action-group class=\"odx-launch-tile-menu\" *ngIf=\"menu\" #menuHost>\n <button odxButton [odxMenu]=\"menuTpl\" odxMenuPosition=\"bottom-end\">\n <odx-icon name=\"more\"></odx-icon>\n </button>\n\n <ng-template #menuTpl>\n <ng-content select=\"odx-menu\"></ng-content>\n </ng-template>\n </odx-action-group>\n</div>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }, { kind: "ngmodule", type: MenuModule }, { kind: "directive", type: i3.MenuDirective, selector: "[odxMenu]", inputs: ["odxMenu", "odxMenuPosition"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
56
61
|
LaunchTileComponent = __decorate([
|
|
57
|
-
CSSComponent('launch-tile')
|
|
62
|
+
CSSComponent('launch-tile'),
|
|
63
|
+
__metadata("design:paramtypes", [])
|
|
58
64
|
], LaunchTileComponent);
|
|
59
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LaunchTileComponent, decorators: [{
|
|
60
66
|
type: Component,
|
|
61
|
-
args: [{ selector: 'odx-launch-tile', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [A11yModule, ButtonComponent, IconComponent, MenuModule, ActionGroupComponent], hostDirectives: [InteractiveDirective], template: "<div class=\"odx-launch-tile__trigger\"
|
|
62
|
-
}], propDecorators: { menu: [{
|
|
67
|
+
args: [{ selector: 'odx-launch-tile', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [A11yModule, ButtonComponent, IconComponent, MenuModule, ActionGroupComponent], hostDirectives: [InteractiveDirective], template: "<div class=\"odx-launch-tile__trigger\">\n <div class=\"odx-launch-tile__container\">\n <ng-content select=\"odx-avatar\"></ng-content>\n <div class=\"odx-launch-tile__content\">\n <div class=\"odx-launch-tile__title\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"odx-launch-tile-subtitle\"></ng-content>\n </div>\n </div>\n\n <ng-content select=\"odx-launch-tile-footer\"></ng-content>\n\n <odx-action-group class=\"odx-launch-tile-menu\" *ngIf=\"menu\" #menuHost>\n <button odxButton [odxMenu]=\"menuTpl\" odxMenuPosition=\"bottom-end\">\n <odx-icon name=\"more\"></odx-icon>\n </button>\n\n <ng-template #menuTpl>\n <ng-content select=\"odx-menu\"></ng-content>\n </ng-template>\n </odx-action-group>\n</div>\n" }]
|
|
68
|
+
}], ctorParameters: function () { return []; }, propDecorators: { menu: [{
|
|
63
69
|
type: ContentChild,
|
|
64
70
|
args: [MenuComponent]
|
|
65
71
|
}], menuHost: [{
|
|
66
72
|
type: ViewChild,
|
|
67
|
-
args: [MenuDirective
|
|
73
|
+
args: [MenuDirective]
|
|
68
74
|
}], footer: [{
|
|
69
75
|
type: ContentChild,
|
|
70
76
|
args: [LaunchTileFooterComponent, { read: ElementRef }]
|
|
71
|
-
}],
|
|
72
|
-
type:
|
|
73
|
-
args: ['click', ['$event']]
|
|
77
|
+
}], interact: [{
|
|
78
|
+
type: Output
|
|
74
79
|
}] } });
|
|
75
80
|
|
|
76
81
|
const modules = [LaunchTileComponent, LaunchTileFooterComponent, LaunchTileSubtitleComponent, AvatarComponent, ButtonComponent, IconComponent];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-launch-tile.mjs","sources":["../../../../libs/angular/components/launch-tile/src/lib/components/launch-tile-footer/launch-tile-footer.component.ts","../../../../libs/angular/components/launch-tile/src/lib/components/launch-tile-footer/launch-tile-footer.component.html","../../../../libs/angular/components/launch-tile/src/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.ts","../../../../libs/angular/components/launch-tile/src/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.html","../../../../libs/angular/components/launch-tile/src/lib/launch-tile.component.ts","../../../../libs/angular/components/launch-tile/src/lib/launch-tile.component.html","../../../../libs/angular/components/launch-tile/src/lib/launch-tile.module.ts","../../../../libs/angular/components/launch-tile/src/odx-angular-components-launch-tile.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'odx-launch-tile-footer',\n templateUrl: './launch-tile-footer.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.odx-launch-tile__footer]': 'true',\n },\n})\nexport class LaunchTileFooterComponent {}\n","<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'odx-launch-tile-subtitle',\n templateUrl: './launch-tile-subtitle.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.odx-launch-tile__subtitle]': 'true',\n },\n})\nexport class LaunchTileSubtitleComponent {}\n","<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, HostListener, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { A11yModule, InteractiveDirective } from '@odx/angular/cdk/a11y';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { MenuComponent, MenuDirective, MenuModule } from '@odx/angular/components/menu';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { containsElement, injectElement } from '@odx/angular/utils';\nimport { LaunchTileFooterComponent } from './components';\n\n@CSSComponent('launch-tile')\n@Component({\n selector: 'odx-launch-tile',\n templateUrl: './launch-tile.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, ButtonComponent, IconComponent, MenuModule, ActionGroupComponent],\n hostDirectives: [InteractiveDirective],\n})\nexport class LaunchTileComponent {\n @ContentChild(MenuComponent)\n protected readonly menu?: MenuComponent;\n\n @ViewChild(MenuDirective, { read: ElementRef })\n protected readonly menuHost?: ElementRef<HTMLElement>;\n\n @ContentChild(LaunchTileFooterComponent, { read: ElementRef })\n protected readonly footer?: ElementRef<HTMLElement>;\n\n public readonly element = injectElement();\n\n @HostListener('click', ['$event'])\n protected stopEvents(event: Event): void {\n const target = event.target as Element;\n const isFooterEvent = containsElement(this.footer?.nativeElement, target, false);\n const isMenuEvent = containsElement(this.menuHost?.nativeElement, target);\n if (isFooterEvent || isMenuEvent) {\n event.stopImmediatePropagation();\n return;\n }\n }\n}\n","<div class=\"odx-launch-tile__trigger\" (click)=\"stopEvents($event)\">\n <div class=\"odx-launch-tile__container\">\n <ng-content select=\"odx-avatar\"></ng-content>\n <div class=\"odx-launch-tile__content\">\n <div class=\"odx-launch-tile__title\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"odx-launch-tile-subtitle\"></ng-content>\n </div>\n </div>\n\n <ng-content select=\"odx-launch-tile-footer\"></ng-content>\n\n <odx-action-group class=\"odx-launch-tile-menu\" *ngIf=\"menu\">\n <button odxButton [odxMenu]=\"menuTpl\" odxMenuPosition=\"bottom-end\">\n <odx-icon name=\"more\"></odx-icon>\n </button>\n\n <ng-template #menuTpl>\n <ng-content select=\"odx-menu\"></ng-content>\n </ng-template>\n </odx-action-group>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AvatarComponent } from '@odx/angular/components/avatar';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { MenuModule } from '@odx/angular/components/menu';\nimport { LaunchTileFooterComponent, LaunchTileSubtitleComponent } from './components';\nimport { LaunchTileComponent } from './launch-tile.component';\n\nconst modules = [LaunchTileComponent, LaunchTileFooterComponent, LaunchTileSubtitleComponent, AvatarComponent, ButtonComponent, IconComponent];\n\n@NgModule({\n imports: [modules],\n exports: [CoreModule, MenuModule, ...modules],\n})\nexport class LaunchTileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAYa,yBAAyB,CAAA;;sHAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA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AAA,EAAA,CAAA,OAAO,EACP,UAAU,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAErB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,OAAO,CAAC;oBAClB,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;iBAC9C,CAAA;;;ACdD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-launch-tile.mjs","sources":["../../../../libs/angular/components/launch-tile/src/lib/components/launch-tile-footer/launch-tile-footer.component.ts","../../../../libs/angular/components/launch-tile/src/lib/components/launch-tile-footer/launch-tile-footer.component.html","../../../../libs/angular/components/launch-tile/src/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.ts","../../../../libs/angular/components/launch-tile/src/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.html","../../../../libs/angular/components/launch-tile/src/lib/launch-tile.component.ts","../../../../libs/angular/components/launch-tile/src/lib/launch-tile.component.html","../../../../libs/angular/components/launch-tile/src/lib/launch-tile.module.ts","../../../../libs/angular/components/launch-tile/src/odx-angular-components-launch-tile.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'odx-launch-tile-footer',\n templateUrl: './launch-tile-footer.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.odx-launch-tile__footer]': 'true',\n },\n})\nexport class LaunchTileFooterComponent {}\n","<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'odx-launch-tile-subtitle',\n templateUrl: './launch-tile-subtitle.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.odx-launch-tile__subtitle]': 'true',\n },\n})\nexport class LaunchTileSubtitleComponent {}\n","<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, inject, Output, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { A11yModule, InteractiveDirective } from '@odx/angular/cdk/a11y';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { MenuComponent, MenuDirective, MenuModule } from '@odx/angular/components/menu';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { containsElement, injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { LaunchTileFooterComponent } from './components';\n\n@CSSComponent('launch-tile')\n@Component({\n selector: 'odx-launch-tile',\n templateUrl: './launch-tile.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, ButtonComponent, IconComponent, MenuModule, ActionGroupComponent],\n hostDirectives: [InteractiveDirective],\n})\nexport class LaunchTileComponent {\n private readonly interactiveDirective = inject(InteractiveDirective, { host: true });\n private readonly takeUntilDestroyed = untilDestroyed();\n\n @ContentChild(MenuComponent)\n protected readonly menu?: MenuComponent;\n\n @ViewChild(MenuDirective)\n protected readonly menuHost?: MenuDirective;\n\n @ContentChild(LaunchTileFooterComponent, { read: ElementRef })\n protected readonly footer?: ElementRef<HTMLElement>;\n\n @Output()\n public interact = new EventEmitter<Event>();\n\n public readonly element = injectElement();\n\n constructor() {\n this.interactiveDirective.interact.pipe(this.takeUntilDestroyed()).subscribe((event) => {\n this.stopEvents(event);\n });\n }\n\n protected stopEvents(event: Event): void {\n const target = event.target as Element | null;\n const isFooterEvent = containsElement(this.footer?.nativeElement, target, false);\n const isMenuEvent = containsElement(this.menuHost?.element.nativeElement, target);\n if (!isFooterEvent && !isMenuEvent && !this.menuHost?.isOpen()) {\n this.interact.emit(event);\n }\n }\n}\n","<div class=\"odx-launch-tile__trigger\">\n <div class=\"odx-launch-tile__container\">\n <ng-content select=\"odx-avatar\"></ng-content>\n <div class=\"odx-launch-tile__content\">\n <div class=\"odx-launch-tile__title\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"odx-launch-tile-subtitle\"></ng-content>\n </div>\n </div>\n\n <ng-content select=\"odx-launch-tile-footer\"></ng-content>\n\n <odx-action-group class=\"odx-launch-tile-menu\" *ngIf=\"menu\" #menuHost>\n <button odxButton [odxMenu]=\"menuTpl\" odxMenuPosition=\"bottom-end\">\n <odx-icon name=\"more\"></odx-icon>\n </button>\n\n <ng-template #menuTpl>\n <ng-content select=\"odx-menu\"></ng-content>\n </ng-template>\n </odx-action-group>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AvatarComponent } from '@odx/angular/components/avatar';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { MenuModule } from '@odx/angular/components/menu';\nimport { LaunchTileFooterComponent, LaunchTileSubtitleComponent } from './components';\nimport { LaunchTileComponent } from './launch-tile.component';\n\nconst modules = [LaunchTileComponent, LaunchTileFooterComponent, LaunchTileSubtitleComponent, AvatarComponent, ButtonComponent, IconComponent];\n\n@NgModule({\n imports: [modules],\n exports: [CoreModule, MenuModule, ...modules],\n})\nexport class LaunchTileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAYa,yBAAyB,CAAA;;sHAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,yBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,qJCZtC,6BACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA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AAA,EAAA,CAAA,CAAA;2FAErB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,OAAO,CAAC;oBAClB,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;iBAC9C,CAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -2,19 +2,19 @@ import { __decorate, __metadata } from 'tslib';
|
|
|
2
2
|
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, Renderer2, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
5
|
-
import * as i1 from '@odx/angular';
|
|
6
5
|
import { DisabledController, WindowRef, CoreModule } from '@odx/angular';
|
|
7
6
|
import { fadeIn, fadeOut } from '@odx/angular/animations';
|
|
8
7
|
import { CircularProgressComponent } from '@odx/angular/components/circular-progress';
|
|
9
8
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
10
9
|
import { injectElement, getInjector, px, deferFn, Transform } from '@odx/angular/utils';
|
|
11
|
-
import {
|
|
10
|
+
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
12
11
|
import { DynamicViewService } from '@odx/angular/cdk/dynamic-view';
|
|
13
12
|
|
|
14
13
|
const LOADING_SPINNER_PARENT_CLASS = 'odx-loading-spinner-parent';
|
|
15
14
|
class LoadingSpinnerDirective {
|
|
16
15
|
constructor() {
|
|
17
16
|
this.disabledController = DisabledController.inject();
|
|
17
|
+
this.hasDisabledControllerOnHost = !!inject(DisabledController, { optional: true });
|
|
18
18
|
this.dynamicViewService = inject(DynamicViewService);
|
|
19
19
|
this.hostElement = injectElement();
|
|
20
20
|
this.renderer = inject(Renderer2);
|
|
@@ -25,7 +25,10 @@ class LoadingSpinnerDirective {
|
|
|
25
25
|
}
|
|
26
26
|
set isLoading(value) {
|
|
27
27
|
var _a;
|
|
28
|
-
|
|
28
|
+
const isLoading = coerceBooleanProperty(value);
|
|
29
|
+
if (!this.hasDisabledControllerOnHost) {
|
|
30
|
+
(_a = this.disabledController) === null || _a === void 0 ? void 0 : _a.setDisabledState(isLoading);
|
|
31
|
+
}
|
|
29
32
|
if (value) {
|
|
30
33
|
this.createSpinner();
|
|
31
34
|
}
|
|
@@ -71,7 +74,7 @@ class LoadingSpinnerDirective {
|
|
|
71
74
|
}
|
|
72
75
|
}
|
|
73
76
|
LoadingSpinnerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LoadingSpinnerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
74
|
-
LoadingSpinnerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: LoadingSpinnerDirective, isStandalone: true, selector: "[odxLoadingSpinner]", inputs: { autoColor: ["odxLoadingSpinnerAutoColor", "autoColor"], isLoading: ["odxLoadingSpinner", "isLoading"], minHeight: ["odxLoadingSpinnerMinHeight", "minHeight"] },
|
|
77
|
+
LoadingSpinnerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: LoadingSpinnerDirective, isStandalone: true, selector: "[odxLoadingSpinner]", inputs: { autoColor: ["odxLoadingSpinnerAutoColor", "autoColor"], isLoading: ["odxLoadingSpinner", "isLoading"], minHeight: ["odxLoadingSpinnerMinHeight", "minHeight"] }, providers: [DisabledController.connect()], ngImport: i0 });
|
|
75
78
|
__decorate([
|
|
76
79
|
Transform(coerceBooleanProperty),
|
|
77
80
|
__metadata("design:type", Object)
|
|
@@ -86,7 +89,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
86
89
|
args: [{
|
|
87
90
|
standalone: true,
|
|
88
91
|
selector: '[odxLoadingSpinner]',
|
|
89
|
-
|
|
92
|
+
providers: [DisabledController.connect()],
|
|
90
93
|
}]
|
|
91
94
|
}], propDecorators: { autoColor: [{
|
|
92
95
|
type: Input,
|