@odx/angular 12.3.3 → 12.4.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/cdk/checkbox-control/lib/checkbox-control.directive.d.ts +0 -2
- package/cdk/custom-form-control/lib/custom-form-control.d.ts +3 -1
- package/esm2022/cdk/checkbox-control/lib/checkbox-control.directive.mjs +1 -4
- package/esm2022/cdk/custom-form-control/lib/custom-form-control.mjs +9 -5
- package/esm2022/components/checkbox/lib/checkbox.component.mjs +3 -3
- package/esm2022/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +2 -3
- package/esm2022/components/form-field/lib/form-field.component.mjs +3 -3
- package/esm2022/components/form-field/lib/form-field.service.mjs +3 -2
- package/esm2022/components/modal/lib/modal.service.mjs +4 -2
- package/esm2022/components/switch/lib/switch.component.mjs +3 -3
- package/fesm2022/odx-angular-breakpoints.mjs +1 -1
- package/fesm2022/odx-angular-cdk-a11y.mjs +1 -1
- package/fesm2022/odx-angular-cdk-active-indicator.mjs +1 -1
- package/fesm2022/odx-angular-cdk-autocomplete-control.mjs +1 -1
- package/fesm2022/odx-angular-cdk-checkbox-control.mjs +1 -4
- package/fesm2022/odx-angular-cdk-checkbox-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs +1 -1
- package/fesm2022/odx-angular-cdk-custom-form-control.mjs +8 -4
- package/fesm2022/odx-angular-cdk-custom-form-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-dynamic-view.mjs +1 -1
- package/fesm2022/odx-angular-cdk-expandable.mjs +1 -1
- package/fesm2022/odx-angular-cdk-option-control.mjs +1 -1
- package/fesm2022/odx-angular-cdk-radio-group-control.mjs +1 -1
- package/fesm2022/odx-angular-components-accordion.mjs +1 -1
- package/fesm2022/odx-angular-components-action-group.mjs +1 -1
- package/fesm2022/odx-angular-components-area-header.mjs +1 -1
- package/fesm2022/odx-angular-components-autocomplete.mjs +1 -1
- package/fesm2022/odx-angular-components-avatar.mjs +1 -1
- package/fesm2022/odx-angular-components-badge.mjs +1 -1
- package/fesm2022/odx-angular-components-bar.mjs +1 -1
- package/fesm2022/odx-angular-components-breadcrumbs.mjs +1 -1
- package/fesm2022/odx-angular-components-button-group.mjs +1 -1
- package/fesm2022/odx-angular-components-button.mjs +1 -1
- package/fesm2022/odx-angular-components-calendar.mjs +2 -2
- package/fesm2022/odx-angular-components-card.mjs +2 -2
- package/fesm2022/odx-angular-components-checkbox.mjs +3 -3
- package/fesm2022/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2022/odx-angular-components-chip.mjs +1 -1
- package/fesm2022/odx-angular-components-circular-progress.mjs +1 -1
- package/fesm2022/odx-angular-components-content-box.mjs +1 -1
- package/fesm2022/odx-angular-components-datepicker.mjs +2 -2
- package/fesm2022/odx-angular-components-daterangepicker.mjs +3 -3
- package/fesm2022/odx-angular-components-dropdown.mjs +1 -1
- package/fesm2022/odx-angular-components-error-page.mjs +1 -1
- package/fesm2022/odx-angular-components-footer.mjs +2 -2
- package/fesm2022/odx-angular-components-form-field.mjs +77 -76
- package/fesm2022/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2022/odx-angular-components-header-navigation.mjs +1 -1
- package/fesm2022/odx-angular-components-header.mjs +1 -1
- package/fesm2022/odx-angular-components-icon.mjs +1 -1
- package/fesm2022/odx-angular-components-inline-message.mjs +1 -1
- package/fesm2022/odx-angular-components-list.mjs +2 -2
- package/fesm2022/odx-angular-components-loading-spinner.mjs +1 -1
- package/fesm2022/odx-angular-components-logo.mjs +1 -1
- package/fesm2022/odx-angular-components-main-menu.mjs +2 -2
- package/fesm2022/odx-angular-components-mainfilter-group.mjs +1 -1
- package/fesm2022/odx-angular-components-menu.mjs +1 -1
- package/fesm2022/odx-angular-components-modal.mjs +4 -2
- package/fesm2022/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2022/odx-angular-components-navigation-back.mjs +1 -1
- package/fesm2022/odx-angular-components-notification.mjs +3 -3
- package/fesm2022/odx-angular-components-paginator.mjs +1 -1
- package/fesm2022/odx-angular-components-progress.mjs +1 -1
- package/fesm2022/odx-angular-components-radio-group.mjs +1 -1
- package/fesm2022/odx-angular-components-rail-navigation.mjs +1 -1
- package/fesm2022/odx-angular-components-rich-list.mjs +1 -1
- package/fesm2022/odx-angular-components-select.mjs +1 -1
- package/fesm2022/odx-angular-components-slider.mjs +1 -1
- package/fesm2022/odx-angular-components-spinbox.mjs +1 -1
- package/fesm2022/odx-angular-components-switch.mjs +3 -3
- package/fesm2022/odx-angular-components-switch.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tab-bar.mjs +1 -1
- package/fesm2022/odx-angular-components-table.mjs +1 -1
- package/fesm2022/odx-angular-components-timepicker.mjs +2 -2
- package/fesm2022/odx-angular-components-toast.mjs +1 -1
- package/fesm2022/odx-angular-components-toggle-button-group.mjs +1 -1
- package/fesm2022/odx-angular-components-tooltip.mjs +1 -1
- package/fesm2022/odx-angular-components-wizard.mjs +1 -1
- package/fesm2022/odx-angular.mjs +2 -2
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ import * as i1 from "@odx/angular";
|
|
|
18
18
|
*/
|
|
19
19
|
let SwitchComponent = class SwitchComponent extends CheckBoxControl {
|
|
20
20
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
-
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__indicator\"></div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (
|
|
21
|
+
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__indicator\"></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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
22
22
|
};
|
|
23
23
|
SwitchComponent = __decorate([
|
|
24
24
|
CSSComponent('switch')
|
|
@@ -28,6 +28,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
28
28
|
type: Component,
|
|
29
29
|
args: [{ standalone: true, selector: 'odx-switch', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [ControlDirective], providers: [ReadonlyController.connect()], hostDirectives: [WithDisabledState], host: {
|
|
30
30
|
'[class.is-active]': 'checked',
|
|
31
|
-
}, 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__indicator\"></div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (
|
|
31
|
+
}, 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__indicator\"></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" }]
|
|
32
32
|
}] });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3dpdGNoLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3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BbYXR0ci5hcmlhLXJlYWRvbmx5XT1cImlzUmVhZG9ubHkgfHwgbnVsbFwiXG4gICAgW2F0dHIuYXJpYS1yZXF1aXJlZF09XCJpc1JlcXVpcmVkIHx8IG51bGxcIlxuICAgIFthdHRyLnRhYmluZGV4XT1cInRhYmluZGV4IHx8IG51bGxcIlxuICAgIFtjaGVja2VkXT1cImNoZWNrZWRcIlxuICAgIFtkaXNhYmxlZF09XCJpc0Rpc2FibGVkIHx8IGlzUmVhZG9ubHlcIlxuICAgIFtuYW1lXT1cIm5hbWVcIlxuICAgIFtyZWFkb25seV09XCJpc1JlYWRvbmx5XCJcbiAgICBbdmFsdWVdPVwidmFsdWVcIlxuICAgIHR5cGU9XCJjaGVja2JveFwiXG4gICAgKGJsdXIpPVwib25Ub3VjaGVkKClcIlxuICAgIChjaGFuZ2UpPVwib25DaGFuZ2VkKCRldmVudClcIlxuICAvPlxuICA8ZGl2IGNsYXNzPVwib2R4LXN3aXRjaF9faW5kaWNhdG9yXCI+PC9kaXY+XG4gIDxkaXYgY2xhc3M9XCJvZHgtc3dpdGNoX19jb250ZW50XCI+XG4gICAgPG5nLWNvbnRlbnQgLz5cbiAgICBAaWYgKGlzUmVxdWlyZWQpIHtcbiAgICAgIDxzcGFuIGNsYXNzPVwib2R4LXN3aXRjaF9fcmVxdWlyZWRcIj4qPC9zcGFuPlxuICAgIH1cbiAgPC9kaXY+XG48L2xhYmVsPlxuIl19
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createConfigTokens, untilDestroyed, coerceArray } from '@odx/angular/utils';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, Injectable, TemplateRef, ViewContainerRef,
|
|
3
|
+
import { inject, Injectable, TemplateRef, ViewContainerRef, Input, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import { of, map, distinctUntilChanged, shareReplay, BehaviorSubject, switchMap, tap } from 'rxjs';
|
|
5
5
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FocusKeyManager, A11yModule as A11yModule$1 } from '@angular/cdk/a11y';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { EventEmitter,
|
|
3
|
+
import { EventEmitter, HostListener, Output, Directive, ContentChildren, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@odx/angular';
|
|
5
5
|
import { DisabledController, WithDisabledState, WithTabIndex, CoreModule } from '@odx/angular';
|
|
6
6
|
import { __decorate } from 'tslib';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Input, Directive } from '@angular/core';
|
|
4
4
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
5
5
|
import { fromElementResize$ } from '@odx/angular/rxjs';
|
|
6
6
|
import { untilDestroyed, injectElement, hasChanged, isPresent, px, disableCSSTransitions, applyStyles } from '@odx/angular/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, ChangeDetectorRef, EventEmitter, booleanAttribute,
|
|
3
|
+
import { inject, ChangeDetectorRef, EventEmitter, booleanAttribute, HostListener, Output, Input, ViewChild, Directive, InjectionToken } from '@angular/core';
|
|
4
4
|
import { detectControllerChanges, ODX_STRING_SEARCH_HANDLER, ODX_STRINGIFY } from '@odx/angular';
|
|
5
5
|
import { CustomFormControl } from '@odx/angular/cdk/custom-form-control';
|
|
6
6
|
import { DropdownDirective } from '@odx/angular/components/dropdown';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, booleanAttribute,
|
|
2
|
+
import { EventEmitter, booleanAttribute, Output, Input, Directive } from '@angular/core';
|
|
3
3
|
import { detectControllerChanges } from '@odx/angular';
|
|
4
4
|
import { CustomFormControl } from '@odx/angular/cdk/custom-form-control';
|
|
5
5
|
import { booleanToAttributeString, injectElement } from '@odx/angular/utils';
|
|
@@ -48,9 +48,6 @@ class CheckBoxControl extends CustomFormControl {
|
|
|
48
48
|
super.updateValue(event.target.checked);
|
|
49
49
|
this.checkedChange.next(this.checked);
|
|
50
50
|
}
|
|
51
|
-
get requiredGetter() {
|
|
52
|
-
return this.required || this.isRequired;
|
|
53
|
-
}
|
|
54
51
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CheckBoxControl, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
55
52
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.13", type: CheckBoxControl, selector: "[odxCheckBoxControl]", inputs: { checked: ["checked", "checked", booleanAttribute], controlValue: ["value", "controlValue"] }, outputs: { checkedChange: "checkedChange" }, usesInheritance: true, ngImport: i0 }); }
|
|
56
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-checkbox-control.mjs","sources":["../../../../libs/angular/cdk/checkbox-control/src/lib/checkbox-control.directive.ts","../../../../libs/angular/cdk/checkbox-control/src/odx-angular-cdk-checkbox-control.ts"],"sourcesContent":["import { booleanAttribute, Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { booleanToAttributeString, injectElement } from '@odx/angular/utils';\n\n/**\n * `CheckBoxControl` is a directive that extends `CustomFormControl` to create a custom checkbox control.\n * It integrates seamlessly with Angular forms and provides additional events and bindings for enhanced\n * functionality.\n */\n@Directive({\n selector: '[odxCheckBoxControl]',\n})\nexport class CheckBoxControl extends CustomFormControl<boolean> {\n public readonly element = injectElement();\n
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-checkbox-control.mjs","sources":["../../../../libs/angular/cdk/checkbox-control/src/lib/checkbox-control.directive.ts","../../../../libs/angular/cdk/checkbox-control/src/odx-angular-cdk-checkbox-control.ts"],"sourcesContent":["import { booleanAttribute, Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { booleanToAttributeString, injectElement } from '@odx/angular/utils';\n\n/**\n * `CheckBoxControl` is a directive that extends `CustomFormControl` to create a custom checkbox control.\n * It integrates seamlessly with Angular forms and provides additional events and bindings for enhanced\n * functionality.\n */\n@Directive({\n selector: '[odxCheckBoxControl]',\n})\nexport class CheckBoxControl extends CustomFormControl<boolean> {\n public readonly element = injectElement();\n\n @Input({ transform: booleanAttribute })\n public set checked(value: boolean) {\n this.value = value;\n }\n public get checked(): boolean {\n return this.value;\n }\n\n /**\n * The value of the checkbox control.\n *\n * @type {string | null}\n * @default null\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('value')\n public controlValue: string | null = null;\n\n /**\n * A boolean value when the checked state of the checkbox changes.\n *\n * @emits {boolean} - The new checked state of the checkbox.\n */\n @Output()\n public checkedChange = new EventEmitter<boolean>();\n\n /**\n * Aria attribute that represents the checked state of the checkbox.\n *\n * @type {string}\n */\n public get ariaChecked(): string {\n return booleanToAttributeString(this.checked);\n }\n\n constructor() {\n super(false);\n detectControllerChanges(this).subscribe();\n }\n\n public onChanged(event: Event): void {\n event.stopPropagation();\n super.updateValue((event.target as HTMLInputElement).checked);\n this.checkedChange.next(this.checked);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAKA;;;;AAIG;AAIG,MAAO,eAAgB,SAAQ,iBAA0B,CAAA;IAG7D,IACW,OAAO,CAAC,KAAc,EAAA;AAC/B,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;;AAEpB,IAAA,IAAW,OAAO,GAAA;QAChB,OAAO,IA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,EAAE,gBAAgB,EAAE;gBAgB/B,YAAY,EAAA,CAAA;sBADlB,KAAK;uBAAC,OAAO;gBASP,aAAa,EAAA,CAAA;sBADnB;;;ACvCH;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, NgZone, Injector,
|
|
3
|
+
import { inject, NgZone, Injector, Output, Input, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, Injectable } from '@angular/core';
|
|
4
4
|
import { arrow, flip, computePosition, offset, shift, size, hide, autoUpdate } from '@floating-ui/dom';
|
|
5
5
|
import { CoreModule } from '@odx/angular';
|
|
6
6
|
import { DynamicViewDirective, DynamicViewService } from '@odx/angular/cdk/dynamic-view';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, inject,
|
|
2
|
+
import { Directive, inject, booleanAttribute, ViewChild, Input } from '@angular/core';
|
|
3
3
|
import { injectElement, arrayAttribute, Pure, untilDestroyed } from '@odx/angular/utils';
|
|
4
4
|
import { __decorate, __metadata } from 'tslib';
|
|
5
5
|
import { Validators, RequiredValidator, NgControl } from '@angular/forms';
|
|
@@ -110,7 +110,7 @@ class CustomFormControl extends Controller {
|
|
|
110
110
|
* ````
|
|
111
111
|
*/
|
|
112
112
|
get isRequired() {
|
|
113
|
-
return !!this.requiredValidator?.required || this.hasValidator(Validators.required) || this.hasValidator(Validators.requiredTrue);
|
|
113
|
+
return this.required || !!this.requiredValidator?.required || this.hasValidator(Validators.required) || this.hasValidator(Validators.requiredTrue);
|
|
114
114
|
}
|
|
115
115
|
constructor(initialValue) {
|
|
116
116
|
super();
|
|
@@ -145,6 +145,7 @@ class CustomFormControl extends Controller {
|
|
|
145
145
|
* @type {string[]}
|
|
146
146
|
*/
|
|
147
147
|
this.ignoreErrors = [];
|
|
148
|
+
this.required = false;
|
|
148
149
|
/**
|
|
149
150
|
* A reference to the `ControlDirective` if it exists within the same host. This allows for direct interaction
|
|
150
151
|
* with the underlying form control directive.
|
|
@@ -203,7 +204,7 @@ class CustomFormControl extends Controller {
|
|
|
203
204
|
return Object.keys(errors).some((error) => !this.ignoreErrors.includes(error));
|
|
204
205
|
}
|
|
205
206
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CustomFormControl, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
|
206
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.13", type: CustomFormControl, inputs: { id: "id", name: "name", tabindex: "tabindex", ignoreErrors: ["ignoreErrors", "ignoreErrors", arrayAttribute] }, host: { properties: { "class.has-error": "hasError", "class.is-disabled": "isDisabled", "class.is-readonly": "isReadonly", "class.is-required": "
|
|
207
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.13", type: CustomFormControl, inputs: { id: "id", name: "name", tabindex: "tabindex", ignoreErrors: ["ignoreErrors", "ignoreErrors", arrayAttribute], required: ["required", "required", booleanAttribute] }, host: { properties: { "class.has-error": "hasError", "class.is-disabled": "isDisabled", "class.is-readonly": "isReadonly", "class.is-required": "isRequired" } }, viewQueries: [{ propertyName: "control", first: true, predicate: ControlDirective, descendants: true }], usesInheritance: true, ngImport: i0 }); }
|
|
207
208
|
}
|
|
208
209
|
__decorate([
|
|
209
210
|
Pure,
|
|
@@ -218,7 +219,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
218
219
|
'[class.has-error]': 'hasError',
|
|
219
220
|
'[class.is-disabled]': 'isDisabled',
|
|
220
221
|
'[class.is-readonly]': 'isReadonly',
|
|
221
|
-
'[class.is-required]': '
|
|
222
|
+
'[class.is-required]': 'isRequired',
|
|
222
223
|
},
|
|
223
224
|
}]
|
|
224
225
|
}], ctorParameters: () => [{ type: undefined }], propDecorators: { id: [{
|
|
@@ -230,6 +231,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
230
231
|
}], ignoreErrors: [{
|
|
231
232
|
type: Input,
|
|
232
233
|
args: [{ transform: arrayAttribute }]
|
|
234
|
+
}], required: [{
|
|
235
|
+
type: Input,
|
|
236
|
+
args: [{ transform: booleanAttribute }]
|
|
233
237
|
}], control: [{
|
|
234
238
|
type: ViewChild,
|
|
235
239
|
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/lib/input-control.directive.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, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\nimport { Controller, DisabledController, ReadonlyController } from '@odx/angular';\nimport { arrayAttribute, Pure } from '@odx/angular/utils';\nimport { ControlDirective } from './control.directive';\n\n/**\n * An abstract directive that serves as a base for custom form controls, integrating seamlessly with Angular Forms.\n * It incorporates common form control behaviors such as handling disabled and readonly states, validation, and more.\n *\n * This approach allows the creation of highly reusable and consistent form controls within Angular applications,\n * simplifying the integration with Angular Forms and the handling of common form behaviors.\n *\n * Extends Controller to provide a consistent API for managing state changes and subscriptions.\n *\n * @see {Controller}\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 /**\n * A unique identifier for the custom form control. If not provided, a unique ID is generated automatically.\n * This can be useful for associating form control with a label.\n *\n * @type {string}\n */\n @Input()\n public id: string | null = null;\n\n /**\n * The name attribute for the custom form control. Defaults to a unique name if not provided.\n * This is useful when the form control is part of a form and needs to be identified.\n *\n * @type {string}\n */\n @Input()\n public name = `odx-form-control-${CustomFormControl.CURRENT_INDEX++}`;\n\n /**\n * The tabindex attribute for the custom form control. Can be used to control the order of focus navigation.\n *\n * @type {string | null}\n */\n @Input()\n public tabindex: string | null = null;\n\n /**\n * An array of error codes to ignore. If an error code is included in this array, the form control will not\n * consider it as an error state. Useful for ignoring specific validation errors.\n *\n * @type {string[]}\n */\n @Input({ transform: arrayAttribute })\n public ignoreErrors: string[] = [];\n\n /**\n * The current value of the form control. Setting this value updates the internal state and marks the control\n * for checking changes. Getting this value returns the current internal value of the control.\n *\n * @example\n * ```ts\n * this.customInputControl.value = 'newValue'; // Sets the value\n * const currentValue = this.customInputControl.value; // Gets the current value\n * ```\n */\n public set value(value: T) {\n if (this.internalValue !== value) {\n this.internalValue = value;\n this.triggerControllerChange();\n }\n }\n\n /**\n * Gets the value of the custom form control.\n *\n * @returns {T} - The value of the custom form control.\n */\n public get value(): T {\n return this.internalValue;\n }\n\n /**\n * Indicates whether the form control currently has an error. This takes into account any ignored errors.\n *\n * @returns {boolean} - True if the form control has an error, false otherwise.\n *\n * @example\n * ```ts\n * if (this.customInputControl.hasError) { ... }\n * ```\n */\n public get hasError(): boolean {\n return !!this.ngControl?.touched && !!this.ngControl?.invalid && this.hasNonIgnoredError(this.ngControl.errors);\n }\n\n /**\n * Indicates whether the form control is currently disabled.\n *\n * @returns {boolean} - True if the form control is disabled, false otherwise.\n *\n * @example\n * ```ts\n * if (this.customInputControl.isDisabled) { ... }\n * ```\n */\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Indicates whether the form control is currently in a readonly state.\n *\n * @returns {boolean} - True if the form control is readonly, false otherwise.\n *\n * @example\n * ```ts\n * if (this.customInputControl.isReadonly) { ... }\n * ```\n */\n public get isReadonly(): boolean {\n return !!this.readonlyController?.readonly;\n }\n\n /**\n * Indicates whether the form control is marked as required, either through Validators.required, Validators.requiredTrue,\n * or by a required attribute on a parent form field.\n *\n * @returns {boolean} - True if the form control is required, false otherwise.\n *\n * @example\n * ````ts\n * if (this.customInputControl.isRequired) { ... }\n * ````\n */\n public get isRequired(): boolean {\n return !!this.requiredValidator?.required || this.hasValidator(Validators.required) || this.hasValidator(Validators.requiredTrue);\n }\n\n /**\n * A reference to the `ControlDirective` if it exists within the same host. This allows for direct interaction\n * with the underlying form control directive.\n *\n * @type {ControlDirective | null}\n *\n * @example\n * ```ts\n * this.customInputControl.control?.focus();\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 /** @internal */\n public onTouched() {\n // implemented by control value accessor\n }\n\n /** @internal */\n public onChange(_value: T) {\n // implemented by control value accessor\n }\n\n /** @internal */\n public registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n /** @internal */\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @internal */\n public setDisabledState(isDisabled: boolean): void {\n this.disabledController?.setDisabledState(isDisabled);\n }\n\n /** @internal */\n public writeValue(value: T): void {\n this.value = value;\n this.onChange(value);\n }\n\n /** @internal */\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 @Pure\n private hasNonIgnoredError(errors: ValidationErrors | null): boolean {\n if (!errors) return false;\n\n return Object.keys(errors).some((error) => !this.ignoreErrors.includes(error));\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { distinctUntilChanged, fromEvent, map } from 'rxjs';\n\n/**\n * An abstract directive that facilitates handling input changes, focusing, and blurring programmatically for input elements.\n * It provides a reactive `valueChange$` observable to subscribe to input changes.\n * This directive can be extended to create more specific input handlers.\n *\n * @example\n * Extending InputControlDirective in a custom directive:\n * ```ts\n * @Directive({\n * selector: '[appCustomInput]',\n * standalone: true,\n * })\n * export class CustomInputDirective extends InputControlDirective {\n * // Custom logic here\n * }\n * ```\n *\n * Using the directive in a component template:\n * ```html\n * <input appCustomInput type=\"text\" />\n * ```\n *\n * Subscribing to input changes in the component:\n * ```ts\n * @Component({...})\n * export class MyComponent implements AfterViewInit {\n * @ViewChild(CustomInputDirective) customInputDirective!: CustomInputDirective;\n *\n * ngAfterViewInit(): void {\n * this.customInputDirective.valueChange$.subscribe(value => {\n * console.log('Input value changed to:', value);\n * });\n * }\n * }\n *\n * // Focusing the input programmatically\n * this.customInputDirective.focus();\n *\n * // Blurring the input programmatically\n * this.customInputDirective.blur();\n *\n * // Resetting the input value programmatically\n * this.customInputDirective.reset();\n * ```\n */\n@Directive({\n standalone: true,\n})\nexport abstract class InputControlDirective {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n public readonly element = injectElement<HTMLInputElement>();\n\n /**\n * Represents an observable stream of value changes for the input control.\n *\n * @emits {string} input value changes.\n */\n public valueChange$ = fromEvent(this.element.nativeElement, 'input').pipe(\n distinctUntilChanged(),\n map(() => this.nativeElementValue),\n );\n\n /**\n * Gets the current value of the input element.\n *\n * @type {string} The current value of the input element.\n */\n public get nativeElementValue(): string {\n return this.element.nativeElement.value;\n }\n\n /**\n * Sets the value of the input element.\n *\n * @param {string} value - The value to set.\n */\n public set nativeElementValue(value: string) {\n this.element.nativeElement.value = value;\n }\n\n /**\n * Sets focus on the input element.\n *\n * @returns {void}\n */\n public focus(): void {\n this.element.nativeElement.focus();\n }\n\n /**\n * Removes focus from the input element.\n *\n * @returns {void}\n */\n public blur(): void {\n this.element.nativeElement.blur();\n }\n\n /**\n * Resets the input element value to an empty string.\n *\n * @returns {void}\n */\n public reset(): void {\n this.element.nativeElement.value = '';\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;QAMkB,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE;AAC1C;+GAFY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,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;AACvB,iBAAA;;;ACDD;;;;;;;;;;AAUG;AASG,MAAgB,iBAAqB,SAAQ,UAAU,CAAA;aAC5C,IAAa,CAAA,aAAA,GAAG,CAAH,CAAK;AA2CjC;;;;;;;;;AASG;IACH,IAAW,KAAK,CAAC,KAAQ,EAAA;AACvB,QAAA,IAAI,IAAI,CAAC,aAAa,KAAK,KAAK,EAAE;AAChC,YAAA,IAAI,CAAC,aAAa,GAAG,KAAK;YAC1B,IAAI,CAAC,uBAAuB,EAAE;;;A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A,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAH1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACnDD;;AAEG;;;;"}
|
|
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/lib/input-control.directive.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 { booleanAttribute, Directive, inject, Input, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NgControl, RequiredValidator, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\nimport { Controller, DisabledController, ReadonlyController } from '@odx/angular';\nimport { arrayAttribute, Pure } from '@odx/angular/utils';\nimport { ControlDirective } from './control.directive';\n\n/**\n * An abstract directive that serves as a base for custom form controls, integrating seamlessly with Angular Forms.\n * It incorporates common form control behaviors such as handling disabled and readonly states, validation, and more.\n *\n * This approach allows the creation of highly reusable and consistent form controls within Angular applications,\n * simplifying the integration with Angular Forms and the handling of common form behaviors.\n *\n * Extends Controller to provide a consistent API for managing state changes and subscriptions.\n *\n * @see {Controller}\n */\n@Directive({\n host: {\n '[class.has-error]': 'hasError',\n '[class.is-disabled]': 'isDisabled',\n '[class.is-readonly]': 'isReadonly',\n '[class.is-required]': 'isRequired',\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 /**\n * A unique identifier for the custom form control. If not provided, a unique ID is generated automatically.\n * This can be useful for associating form control with a label.\n *\n * @type {string}\n */\n @Input()\n public id: string | null = null;\n\n /**\n * The name attribute for the custom form control. Defaults to a unique name if not provided.\n * This is useful when the form control is part of a form and needs to be identified.\n *\n * @type {string}\n */\n @Input()\n public name = `odx-form-control-${CustomFormControl.CURRENT_INDEX++}`;\n\n /**\n * The tabindex attribute for the custom form control. Can be used to control the order of focus navigation.\n *\n * @type {string | null}\n */\n @Input()\n public tabindex: string | null = null;\n\n /**\n * An array of error codes to ignore. If an error code is included in this array, the form control will not\n * consider it as an error state. Useful for ignoring specific validation errors.\n *\n * @type {string[]}\n */\n @Input({ transform: arrayAttribute })\n public ignoreErrors: string[] = [];\n\n @Input({ transform: booleanAttribute })\n public required = false;\n\n /**\n * The current value of the form control. Setting this value updates the internal state and marks the control\n * for checking changes. Getting this value returns the current internal value of the control.\n *\n * @example\n * ```ts\n * this.customInputControl.value = 'newValue'; // Sets the value\n * const currentValue = this.customInputControl.value; // Gets the current value\n * ```\n */\n public set value(value: T) {\n if (this.internalValue !== value) {\n this.internalValue = value;\n this.triggerControllerChange();\n }\n }\n\n /**\n * Gets the value of the custom form control.\n *\n * @returns {T} - The value of the custom form control.\n */\n public get value(): T {\n return this.internalValue;\n }\n\n /**\n * Indicates whether the form control currently has an error. This takes into account any ignored errors.\n *\n * @returns {boolean} - True if the form control has an error, false otherwise.\n *\n * @example\n * ```ts\n * if (this.customInputControl.hasError) { ... }\n * ```\n */\n public get hasError(): boolean {\n return !!this.ngControl?.touched && !!this.ngControl?.invalid && this.hasNonIgnoredError(this.ngControl.errors);\n }\n\n /**\n * Indicates whether the form control is currently disabled.\n *\n * @returns {boolean} - True if the form control is disabled, false otherwise.\n *\n * @example\n * ```ts\n * if (this.customInputControl.isDisabled) { ... }\n * ```\n */\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Indicates whether the form control is currently in a readonly state.\n *\n * @returns {boolean} - True if the form control is readonly, false otherwise.\n *\n * @example\n * ```ts\n * if (this.customInputControl.isReadonly) { ... }\n * ```\n */\n public get isReadonly(): boolean {\n return !!this.readonlyController?.readonly;\n }\n\n /**\n * Indicates whether the form control is marked as required, either through Validators.required, Validators.requiredTrue,\n * or by a required attribute on a parent form field.\n *\n * @returns {boolean} - True if the form control is required, false otherwise.\n *\n * @example\n * ````ts\n * if (this.customInputControl.isRequired) { ... }\n * ````\n */\n public get isRequired(): boolean {\n return this.required || !!this.requiredValidator?.required || this.hasValidator(Validators.required) || this.hasValidator(Validators.requiredTrue);\n }\n\n /**\n * A reference to the `ControlDirective` if it exists within the same host. This allows for direct interaction\n * with the underlying form control directive.\n *\n * @type {ControlDirective | null}\n *\n * @example\n * ```ts\n * this.customInputControl.control?.focus();\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 /** @internal */\n public onTouched() {\n // implemented by control value accessor\n }\n\n /** @internal */\n public onChange(_value: T) {\n // implemented by control value accessor\n }\n\n /** @internal */\n public registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n /** @internal */\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @internal */\n public setDisabledState(isDisabled: boolean): void {\n this.disabledController?.setDisabledState(isDisabled);\n }\n\n /** @internal */\n public writeValue(value: T): void {\n this.value = value;\n this.onChange(value);\n }\n\n /** @internal */\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 @Pure\n private hasNonIgnoredError(errors: ValidationErrors | null): boolean {\n if (!errors) return false;\n\n return Object.keys(errors).some((error) => !this.ignoreErrors.includes(error));\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { distinctUntilChanged, fromEvent, map } from 'rxjs';\n\n/**\n * An abstract directive that facilitates handling input changes, focusing, and blurring programmatically for input elements.\n * It provides a reactive `valueChange$` observable to subscribe to input changes.\n * This directive can be extended to create more specific input handlers.\n *\n * @example\n * Extending InputControlDirective in a custom directive:\n * ```ts\n * @Directive({\n * selector: '[appCustomInput]',\n * standalone: true,\n * })\n * export class CustomInputDirective extends InputControlDirective {\n * // Custom logic here\n * }\n * ```\n *\n * Using the directive in a component template:\n * ```html\n * <input appCustomInput type=\"text\" />\n * ```\n *\n * Subscribing to input changes in the component:\n * ```ts\n * @Component({...})\n * export class MyComponent implements AfterViewInit {\n * @ViewChild(CustomInputDirective) customInputDirective!: CustomInputDirective;\n *\n * ngAfterViewInit(): void {\n * this.customInputDirective.valueChange$.subscribe(value => {\n * console.log('Input value changed to:', value);\n * });\n * }\n * }\n *\n * // Focusing the input programmatically\n * this.customInputDirective.focus();\n *\n * // Blurring the input programmatically\n * this.customInputDirective.blur();\n *\n * // Resetting the input value programmatically\n * this.customInputDirective.reset();\n * ```\n */\n@Directive({\n standalone: true,\n})\nexport abstract class InputControlDirective {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n public readonly element = injectElement<HTMLInputElement>();\n\n /**\n * Represents an observable stream of value changes for the input control.\n *\n * @emits {string} input value changes.\n */\n public valueChange$ = fromEvent(this.element.nativeElement, 'input').pipe(\n distinctUntilChanged(),\n map(() => this.nativeElementValue),\n );\n\n /**\n * Gets the current value of the input element.\n *\n * @type {string} The current value of the input element.\n */\n public get nativeElementValue(): string {\n return this.element.nativeElement.value;\n }\n\n /**\n * Sets the value of the input element.\n *\n * @param {string} value - The value to set.\n */\n public set nativeElementValue(value: string) {\n this.element.nativeElement.value = value;\n }\n\n /**\n * Sets focus on the input element.\n *\n * @returns {void}\n */\n public focus(): void {\n this.element.nativeElement.focus();\n }\n\n /**\n * Removes focus from the input element.\n *\n * @returns {void}\n */\n public blur(): void {\n this.element.nativeElement.blur();\n }\n\n /**\n * Resets the input element value to an empty string.\n *\n * @returns {void}\n */\n public reset(): void {\n this.element.nativeElement.value = '';\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;QAMkB,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE;AAC1C;+GAFY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,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;AACvB,iBAAA;;;ACDD;;;;;;;;;;AAUG;AASG,MAAgB,iBAAqB,SAAQ,UAAU,CAAA;aAC5C,IAAa,CAAA,aAAA,GAAG,CAAH,CAAK;AA8CjC;;;;;;;;;AASG;IACH,IAAW,KAAK,CAAC,KAAQ,EAAA;AACvB,QAAA,IAAI,IAAI,CAAC,aAAa,KAAK,KAAK,EAAE;AAChC,YAAA,IAAI,CAAC,aAAa,GAAG,KAAK;YAC1B,IAAI,CAAC,uBAAuB,EAAE;;;AAIlC;;;;AAIG;AACH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AK,GAAG,EAAE;;+GAzDnB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAH1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACnDD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Input, ViewEncapsulation, ChangeDetectionStrategy, Component, reflectComponentType, ApplicationRef, createComponent, EnvironmentInjector, InjectionToken, inject, Injector, Injectable, ViewContainerRef, TemplateRef, Directive } from '@angular/core';
|
|
3
3
|
import { injectElement, isString, isViewContainer, isTemplateRef, isComponent, hasChanged } from '@odx/angular/utils';
|
|
4
4
|
import { isObservable, distinctUntilChanged } from 'rxjs';
|
|
5
5
|
import { deepmerge } from '@odx/angular/internal';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, booleanAttribute,
|
|
2
|
+
import { InjectionToken, inject, booleanAttribute, Input, Directive, ChangeDetectorRef, NgModule } from '@angular/core';
|
|
3
3
|
import { getUniqueId } from '@odx/angular/utils';
|
|
4
4
|
|
|
5
5
|
const ODX_EXPANDABLE_CONTAINER = new InjectionToken('@odx/angular/cdk/expandable::ExpandableContainer');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef,
|
|
2
|
+
import { inject, ChangeDetectorRef, HostListener, Input, Directive } from '@angular/core';
|
|
3
3
|
import { untilDestroyed, injectElement, deferFn } from '@odx/angular/utils';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, forwardRef,
|
|
2
|
+
import { InjectionToken, forwardRef, HostListener, Directive, inject, Input, NgModule } from '@angular/core';
|
|
3
3
|
import { DisabledController, ReadonlyController, detectControllerChanges, CoreModule } from '@odx/angular';
|
|
4
4
|
import { injectElement, booleanToAttributeString } from '@odx/angular/utils';
|
|
5
5
|
import { CustomFormControl } from '@odx/angular/cdk/custom-form-control';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { ViewEncapsulation, ChangeDetectionStrategy, Component, inject, EventEmitter, Output, Input, 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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { booleanAttribute,
|
|
3
|
+
import { booleanAttribute, Input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
4
4
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
5
5
|
import { injectElement } from '@odx/angular/utils';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
4
|
+
import { Input, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, NgModule } from '@angular/core';
|
|
5
5
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
6
6
|
import { injectElement } from '@odx/angular/utils';
|
|
7
7
|
import { CoreModule } from '@odx/angular';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, inject,
|
|
3
|
+
import { InjectionToken, inject, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, forwardRef, HostListener, ContentChild, ContentChildren, Pipe, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@odx/angular';
|
|
5
5
|
import { CoreModule, ReadonlyController, WithTabIndex, ClickOutsideDirective } from '@odx/angular';
|
|
6
6
|
import { AutocompleteControl, ODX_SEARCH_FILTER_HOST, BaseSearchFilterPipe } from '@odx/angular/cdk/autocomplete-control';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
4
4
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
5
5
|
import { injectElement } from '@odx/angular/utils';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { booleanAttribute,
|
|
3
|
+
import { booleanAttribute, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, Injector, numberAttribute, Directive } from '@angular/core';
|
|
4
4
|
import { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';
|
|
5
5
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
6
6
|
import { injectElement, Position, isPresent } from '@odx/angular/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { ChangeDetectionStrategy, ViewEncapsulation, Component, Input, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import { CSSComponent, CSSModifier } from '@odx/angular/internal';
|
|
5
5
|
import { injectElement } from '@odx/angular/utils';
|
|
6
6
|
import { DisabledController, CoreModule } from '@odx/angular';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
4
4
|
import { CSSComponent } from '@odx/angular/internal';
|
|
5
5
|
import { injectElement } from '@odx/angular/utils';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { booleanAttribute,
|
|
3
|
+
import { booleanAttribute, Input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
4
4
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
5
5
|
import { injectElement } from '@odx/angular/utils';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Input, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
|
|
4
4
|
import * as i1 from '@odx/angular';
|
|
5
5
|
import { WithDisabledState } from '@odx/angular';
|
|
6
6
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Injectable,
|
|
4
|
+
import { EventEmitter, Injectable, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, ChangeDetectorRef, Pipe, Directive } from '@angular/core';
|
|
5
5
|
import * as i2 from '@odx/angular';
|
|
6
6
|
import { CoreModule, WindowRef, DisabledController } from '@odx/angular';
|
|
7
7
|
import { CSSComponent, fastDeepEqual, CSSModifier } from '@odx/angular/internal';
|
|
8
8
|
import { createConfigTokens, isString, isPresent, injectElement, hasChanged, EventManager, deferFn, untilDestroyed, isFunction } from '@odx/angular/utils';
|
|
9
9
|
import { BehaviorSubject, shareReplay, map, filter, distinctUntilChanged, merge, defer, of, withLatestFrom, combineLatest } from 'rxjs';
|
|
10
|
-
import {
|
|
10
|
+
import { isSameYear, isSameMonth, isSameDay, endOfYear, endOfMonth, endOfDay, startOfYear, startOfMonth, startOfDay, isValid, toDate, isBefore, isEqual, addMonths, subMonths, isWithinInterval, startOfWeek, addDays, endOfWeek, eachMonthOfInterval, addYears, getYear, setYear, subDays, subWeeks, addWeeks, setMonth, getMonth } from 'date-fns';
|
|
11
11
|
import { ActionGroupComponent } from '@odx/angular/components/action-group';
|
|
12
12
|
import { ButtonComponent } from '@odx/angular/components/button';
|
|
13
13
|
import { IconComponent } from '@odx/angular/components/icon';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { ViewEncapsulation, ChangeDetectionStrategy, Component, HostBinding, Input, inject, EventEmitter, ElementRef, Output, ContentChild, ViewChild, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@odx/angular/cdk/a11y';
|
|
5
5
|
import { InteractiveDirective, A11yModule } from '@odx/angular/cdk/a11y';
|
|
6
6
|
import { ActionGroupComponent } from '@odx/angular/components/action-group';
|
|
@@ -8,7 +8,7 @@ import { ButtonComponent } from '@odx/angular/components/button';
|
|
|
8
8
|
import { ChipListRowComponent } from '@odx/angular/components/chip';
|
|
9
9
|
import { IconComponent } from '@odx/angular/components/icon';
|
|
10
10
|
import * as i3 from '@odx/angular/components/menu';
|
|
11
|
-
import {
|
|
11
|
+
import { MenuModule, MenuDirective, MenuComponent } from '@odx/angular/components/menu';
|
|
12
12
|
import { CSSComponent, CSSModifier } from '@odx/angular/internal';
|
|
13
13
|
import { createConfigTokens, injectElement, untilDestroyed, containsElement } from '@odx/angular/utils';
|
|
14
14
|
import * as i2 from '@angular/common';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { EventEmitter, booleanAttribute,
|
|
3
|
+
import { EventEmitter, booleanAttribute, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, forwardRef, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@odx/angular';
|
|
5
5
|
import { ReadonlyController, WithDisabledState, CoreModule } from '@odx/angular';
|
|
6
6
|
import { CheckBoxControl } from '@odx/angular/cdk/checkbox-control';
|
|
@@ -76,7 +76,7 @@ let CheckboxComponent = class CheckboxComponent extends CheckBoxControl {
|
|
|
76
76
|
this.checkedChange.next(this.checked);
|
|
77
77
|
}
|
|
78
78
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CheckboxComponent, isStandalone: true, selector: "odx-checkbox", inputs: { indeterminate: ["indeterminate", "indeterminate", booleanAttribute] }, 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\" iconSet=\"core\" />\n </div>\n <div class=\"odx-checkbox__content\">\n <div class=\"odx-checkbox__title\">\n <ng-content />\n @if (
|
|
79
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CheckboxComponent, isStandalone: true, selector: "odx-checkbox", inputs: { indeterminate: ["indeterminate", "indeterminate", booleanAttribute] }, 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\" iconSet=\"core\" />\n </div>\n <div class=\"odx-checkbox__content\">\n <div class=\"odx-checkbox__title\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-checkbox__required\">*</span>\n }\n </div>\n <ng-content select=\".odx-checkbox__subtitle\" />\n </div>\n</label>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }, { kind: "directive", type: ControlDirective, selector: "[odxControl]", exportAs: ["odxControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
80
80
|
};
|
|
81
81
|
__decorate([
|
|
82
82
|
CSSModifier(),
|
|
@@ -90,7 +90,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
90
90
|
type: Component,
|
|
91
91
|
args: [{ standalone: true, selector: 'odx-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [IconComponent, ControlDirective], providers: [ReadonlyController.connect()], hostDirectives: [WithDisabledState], host: {
|
|
92
92
|
'[class.is-active]': 'checked || indeterminate',
|
|
93
|
-
}, 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\" iconSet=\"core\" />\n </div>\n <div class=\"odx-checkbox__content\">\n <div class=\"odx-checkbox__title\">\n <ng-content />\n @if (
|
|
93
|
+
}, 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\" iconSet=\"core\" />\n </div>\n <div class=\"odx-checkbox__content\">\n <div class=\"odx-checkbox__title\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-checkbox__required\">*</span>\n }\n </div>\n <ng-content select=\".odx-checkbox__subtitle\" />\n </div>\n</label>\n" }]
|
|
94
94
|
}], propDecorators: { indeterminate: [{
|
|
95
95
|
type: Input,
|
|
96
96
|
args: [{ transform: booleanAttribute }]
|
|
@@ -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 { booleanAttribute, 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/**\n * Represents a checkbox component.\n * @extends {CheckBoxControl}\n *\n * @remarks\n * To add subtitle text to the checkbox, use class `odx-checkbox__subtitle` in template's content.\n *\n * @example\n * ```html\n * <odx-checkbox [(checked)]=\"isChecked\">\n * Checkbox label\n * <span class=\"odx-checkbox__subtitle\">Subtitle text</span>\n * </odx-checkbox>\n * ```\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 private isIndeterminate = false;\n\n /**\n * Gets or sets a value indicating whether the checkbox is in an indeterminate state.\n *\n * @type {boolean}\n *\n * @remarks\n * The indeterminate state is typically used when the checkbox represents a group of checkboxes\n * and not all of them are checked or unchecked.\n */\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public set indeterminate(value: boolean) {\n if (this.isIndeterminate !== value) {\n this.isIndeterminate = value;\n this.indeterminateChange.emit(this.isIndeterminate);\n }\n }\n\n public get indeterminate(): boolean {\n return this.isIndeterminate;\n }\n\n /**\n * Emits a boolean value when the indeterminate state of the checkbox changes.\n *\n * @emits {boolean} The new value of the indeterminate state.\n */\n @Output()\n public readonly indeterminateChange = new EventEmitter<boolean>();\n\n /**\n * Gets the value of the `ariaChecked` attribute.\n *\n * @returns {string} - The value of the `ariaChecked` attribute as a string.\n */\n public override get ariaChecked(): string {\n return this.checked ? 'true' : this.indeterminate ? 'mixed' : 'false';\n }\n\n /**\n * Gets the modifier icon for the checkbox component.\n *\n * @returns {string} 'minus' if the checkbox is in indeterminate state, otherwise returns 'check'.\n */\n public get modifierIcon(): string {\n return this.indeterminate ? 'minus' : '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 this.checkedChange.next(this.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\" iconSet=\"core\" />\n </div>\n <div class=\"odx-checkbox__content\">\n <div class=\"odx-checkbox__title\">\n <ng-content />\n @if (requiredGetter) {\n <span class=\"odx-checkbox__required\">*</span>\n }\n </div>\n <ng-content select=\".odx-checkbox__subtitle\" />\n </div>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\n/**\n * A directive that extends Angular's `CheckboxRequiredValidator` for use with `odx-checkbox` components,\n * enforcing required validation. This directive ensures that an `odx-checkbox` marked as required\n * is checked in order to be considered valid within a form.\n *\n * The directive is automatically applied to `odx-checkbox` elements that have the `required` attribute\n * along with either `formControlName`, `formControl`, or `ngModel` directives, making it integrate seamlessly\n * with both reactive and template-driven forms.\n *\n * @example\n * ```html\n * <!-- In a reactive form -->\n * <odx-checkbox formControlName=\"acceptTerms\" required />\n *\n * <!-- In a template-driven form -->\n * <odx-checkbox [(ngModel)]=\"acceptTerms\" name=\"acceptTerms\" required />\n * ```\n *\n * By using this directive, forms containing `odx-checkbox` components with the required validation\n * will ensure the checkbox is checked before considering the form valid.\n *\n * @extends {CheckboxRequiredValidator} Inherits the behavior of Angular's `CheckboxRequiredValidator`.\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":";;;;;;;;;;;AAOA;;;;;;;;;;;;;;AAcG;AAeI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,eAAe,CAAA;AAA/C,IAAA,WAAA,GAAA;;QACG,IAAe,CAAA,eAAA,GAAG,KAAK;AAwB/B;;;;AAIG;AAEa,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,YAAY,EAAW;AA0BlE;AAtDC;;;;;;;;AAQG;IACH,IAEW,aAAa,CAAC,KAAc,EAAA;AACrC,QAAA,IAAI,IAAI,CAAC,eAAe,KAAK,KAAK,EAAE;AAClC,YAAA,IAAI,CAAC,eAAe,GAAG,KAAK;YAC5B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;;;AAIvD,IAAA,IAAW,aAAa,GAAA;QACtB,OAAO,IAAI,CAAC,eAAe;;AAW7B;;;;AAIG;AACH,IAAA,IAAoB,WAAW,GAAA;QAC7B,OAAO,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC,aAAa,GAAG,OAAO,GAAG,OAAO;;AAGvE;;;;AAIG;AACH,IAAA,IAAW,YAAY,GAAA;QACrB,OAAO,IAAI,CAAC,aAAa,GAAG,OAAO,GAAG,OAAO;;AAG/B,IAAA,SAAS,CAAC,KAAY,EAAA;QACpC,KAAK,CAAC,eAAe,EAAE;AACvB,QAAA,IAAI,CAAC,aAAa,GAAG,KAAK;QAC1B,KAAK,CAAC,WAAW,CAAE,KAAK,CAAC,MAA2B,CAAC,OAAO,CAAC;QAC7D,IAAI,CAAC,aAAa,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YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,+GAA+G;AACzH,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,WAAW,EAAE,UAAU,CAAC,uBAAuB,CAAC;AAChD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC/BD,MAAM,OAAO,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;MAMzC,cAAc,CAAA;+GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAd,cAAc,EAAA,OAAA,EAAA,CANV,iBAAiB,EAAE,iBAAiB,aAIzC,UAAU,EAJL,iBAAiB,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;gHAMxC,cAAc,EAAA,OAAA,EAAA,CANV,iBAAiB,EAItB,UAAU,CAAA,EAAA,CAAA,CAAA;;4FAET,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;AAClC,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
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 { booleanAttribute, 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/**\n * Represents a checkbox component.\n * @extends {CheckBoxControl}\n *\n * @remarks\n * To add subtitle text to the checkbox, use class `odx-checkbox__subtitle` in template's content.\n *\n * @example\n * ```html\n * <odx-checkbox [(checked)]=\"isChecked\">\n * Checkbox label\n * <span class=\"odx-checkbox__subtitle\">Subtitle text</span>\n * </odx-checkbox>\n * ```\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 private isIndeterminate = false;\n\n /**\n * Gets or sets a value indicating whether the checkbox is in an indeterminate state.\n *\n * @type {boolean}\n *\n * @remarks\n * The indeterminate state is typically used when the checkbox represents a group of checkboxes\n * and not all of them are checked or unchecked.\n */\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public set indeterminate(value: boolean) {\n if (this.isIndeterminate !== value) {\n this.isIndeterminate = value;\n this.indeterminateChange.emit(this.isIndeterminate);\n }\n }\n\n public get indeterminate(): boolean {\n return this.isIndeterminate;\n }\n\n /**\n * Emits a boolean value when the indeterminate state of the checkbox changes.\n *\n * @emits {boolean} The new value of the indeterminate state.\n */\n @Output()\n public readonly indeterminateChange = new EventEmitter<boolean>();\n\n /**\n * Gets the value of the `ariaChecked` attribute.\n *\n * @returns {string} - The value of the `ariaChecked` attribute as a string.\n */\n public override get ariaChecked(): string {\n return this.checked ? 'true' : this.indeterminate ? 'mixed' : 'false';\n }\n\n /**\n * Gets the modifier icon for the checkbox component.\n *\n * @returns {string} 'minus' if the checkbox is in indeterminate state, otherwise returns 'check'.\n */\n public get modifierIcon(): string {\n return this.indeterminate ? 'minus' : '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 this.checkedChange.next(this.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\" iconSet=\"core\" />\n </div>\n <div class=\"odx-checkbox__content\">\n <div class=\"odx-checkbox__title\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-checkbox__required\">*</span>\n }\n </div>\n <ng-content select=\".odx-checkbox__subtitle\" />\n </div>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\n/**\n * A directive that extends Angular's `CheckboxRequiredValidator` for use with `odx-checkbox` components,\n * enforcing required validation. This directive ensures that an `odx-checkbox` marked as required\n * is checked in order to be considered valid within a form.\n *\n * The directive is automatically applied to `odx-checkbox` elements that have the `required` attribute\n * along with either `formControlName`, `formControl`, or `ngModel` directives, making it integrate seamlessly\n * with both reactive and template-driven forms.\n *\n * @example\n * ```html\n * <!-- In a reactive form -->\n * <odx-checkbox formControlName=\"acceptTerms\" required />\n *\n * <!-- In a template-driven form -->\n * <odx-checkbox [(ngModel)]=\"acceptTerms\" name=\"acceptTerms\" required />\n * ```\n *\n * By using this directive, forms containing `odx-checkbox` components with the required validation\n * will ensure the checkbox is checked before considering the form valid.\n *\n * @extends {CheckboxRequiredValidator} Inherits the behavior of Angular's `CheckboxRequiredValidator`.\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":";;;;;;;;;;;AAOA;;;;;;;;;;;;;;AAcG;AAeI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,eAAe,CAAA;AAA/C,IAAA,WAAA,GAAA;;QACG,IAAe,CAAA,eAAA,GAAG,KAAK;AAwB/B;;;;AAIG;AAEa,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,YAAY,EAAW;AA0BlE;AAtDC;;;;;;;;AAQG;IACH,IAEW,aAAa,CAAC,KAAc,EAAA;AACrC,QAAA,IAAI,IAAI,CAAC,eAAe,KAAK,KAAK,EAAE;AAClC,YAAA,IAAI,CAAC,eAAe,GAAG,KAAK;YAC5B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;;;AAIvD,IAAA,IAAW,aAAa,GAAA;QACtB,OAAO,IAAI,CAAC,eAAe;;AAW7B;;;;AAIG;AACH,IAAA,IAAoB,WAAW,GAAA;QAC7B,OAAO,IAAI,CAAC,OAAO,GAAG,M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G;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { ChangeDetectionStrategy, ViewEncapsulation, Component, EventEmitter, booleanAttribute, Output, Input } from '@angular/core';
|
|
4
4
|
import { CSSComponent, CSSModifier } from '@odx/angular/internal';
|
|
5
5
|
import { injectElement } from '@odx/angular/utils';
|
|
6
6
|
import { CoreModule } from '@odx/angular';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, ChangeDetectorRef, numberAttribute,
|
|
3
|
+
import { inject, ChangeDetectorRef, numberAttribute, Input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
5
5
|
import { fromElementResize$ } from '@odx/angular/rxjs';
|
|
6
6
|
import { untilDestroyed, injectElement, hasChanged } from '@odx/angular/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, NgModule } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents a content box component.
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from 'tslib';
|
|
|
2
2
|
import * as i1$1 from '@angular/cdk/a11y';
|
|
3
3
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject, EventEmitter,
|
|
5
|
+
import { inject, EventEmitter, HostListener, Output, Directive, input, booleanAttribute, ElementRef, ContentChild, ViewChild, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
6
6
|
import * as i1 from '@odx/angular';
|
|
7
7
|
import { ReadonlyController, WithTabIndex, detectControllerChanges, CoreModule } from '@odx/angular';
|
|
8
8
|
import { InputControlDirective, CustomFormControl } from '@odx/angular/cdk/custom-form-control';
|
|
@@ -10,7 +10,7 @@ import { ActionGroupComponent } from '@odx/angular/components/action-group';
|
|
|
10
10
|
import { ButtonComponent } from '@odx/angular/components/button';
|
|
11
11
|
import { CalendarComponent } from '@odx/angular/components/calendar';
|
|
12
12
|
import * as i2 from '@odx/angular/components/dropdown';
|
|
13
|
-
import {
|
|
13
|
+
import { DropdownModule, DropdownDirective } from '@odx/angular/components/dropdown';
|
|
14
14
|
import { IconComponent } from '@odx/angular/components/icon';
|
|
15
15
|
import { CSSComponent } from '@odx/angular/internal';
|
|
16
16
|
import { createConfigTokens, untilDestroyed, injectElement, deferFn } from '@odx/angular/utils';
|