@ngil/form-inputs 0.2.0 → 5.0.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/fesm2022/ngil-form-inputs.mjs +82 -227
- package/fesm2022/ngil-form-inputs.mjs.map +1 -1
- package/package.json +6 -8
- package/types/ngil-form-inputs.d.ts +166 -0
- package/esm2022/index.mjs +0 -11
- package/esm2022/lib/components/input/input.component.mjs +0 -55
- package/esm2022/lib/components/overlay/overlay-toggle.directive.mjs +0 -57
- package/esm2022/lib/components/overlay/overlay.component.mjs +0 -106
- package/esm2022/lib/components/select/select.component.mjs +0 -69
- package/esm2022/lib/components/select-options/select-options.component.mjs +0 -58
- package/esm2022/lib/components/textarea/textarea.component.mjs +0 -45
- package/esm2022/lib/components/time-picker/time-picker.component.mjs +0 -65
- package/esm2022/lib/components/time-picker/time-picker.directive.mjs +0 -114
- package/esm2022/lib/components/time-picker/time-picker.model.mjs +0 -2
- package/esm2022/lib/components/time-picker-overlay/picker-toggle.mjs +0 -24
- package/esm2022/lib/components/time-picker-overlay/time-picker-overlay.component.mjs +0 -114
- package/esm2022/lib/directives/number-rotation.directive.mjs +0 -102
- package/esm2022/lib/ngil-ui-form.module.mjs +0 -68
- package/esm2022/ngil-form-inputs.mjs +0 -5
- package/index.d.ts +0 -10
- package/lib/components/input/input.component.d.ts +0 -14
- package/lib/components/overlay/overlay-toggle.directive.d.ts +0 -16
- package/lib/components/overlay/overlay.component.d.ts +0 -22
- package/lib/components/select/select.component.d.ts +0 -16
- package/lib/components/select-options/select-options.component.d.ts +0 -17
- package/lib/components/textarea/textarea.component.d.ts +0 -12
- package/lib/components/time-picker/time-picker.component.d.ts +0 -19
- package/lib/components/time-picker/time-picker.directive.d.ts +0 -28
- package/lib/components/time-picker/time-picker.model.d.ts +0 -5
- package/lib/components/time-picker-overlay/picker-toggle.d.ts +0 -8
- package/lib/components/time-picker-overlay/time-picker-overlay.component.d.ts +0 -26
- package/lib/directives/number-rotation.directive.d.ts +0 -26
- package/lib/ngil-ui-form.module.d.ts +0 -20
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, forwardRef,
|
|
3
|
-
import * as
|
|
2
|
+
import { EventEmitter, forwardRef, Output, Input, ChangeDetectionStrategy, Component, ViewChild, Optional, HostListener, ViewEncapsulation, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormControl, NG_VALUE_ACCESSOR, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import * as i1$1 from '@ngil/form-cva';
|
|
5
6
|
import { AbstractInputComponent } from '@ngil/form-cva';
|
|
6
7
|
import { takeUntil } from 'rxjs/operators';
|
|
7
|
-
import * as
|
|
8
|
+
import * as i2 from '@angular/common';
|
|
8
9
|
import { CommonModule } from '@angular/common';
|
|
9
|
-
import * as
|
|
10
|
-
import {
|
|
11
|
-
import { DomPortal, ComponentPortal } from '@angular/cdk/portal';
|
|
10
|
+
import * as i3 from '@ngil/components';
|
|
11
|
+
import { NgilOverlayComponent, NgilOverlayToggleDirective } from '@ngil/components';
|
|
12
12
|
import { Subject, takeUntil as takeUntil$1 } from 'rxjs';
|
|
13
|
+
import * as i1$2 from '@angular/cdk/overlay';
|
|
14
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
13
15
|
|
|
14
16
|
class NgilInputComponent extends AbstractInputComponent {
|
|
15
17
|
constructor() {
|
|
@@ -35,16 +37,16 @@ class NgilInputComponent extends AbstractInputComponent {
|
|
|
35
37
|
this.onChange(value);
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: NgilInputComponent, isStandalone: false, selector: "ngil-input", inputs: { type: "type" }, outputs: { changed: "changed" }, providers: [
|
|
40
42
|
{
|
|
41
43
|
provide: NG_VALUE_ACCESSOR,
|
|
42
44
|
useExisting: forwardRef(() => NgilInputComponent),
|
|
43
45
|
multi: true
|
|
44
46
|
}
|
|
45
|
-
], usesInheritance: true, ngImport: i0, template: "
|
|
47
|
+
], usesInheritance: true, ngImport: i0, template: "@if (model$ | async; as model) {\r\n <div class=\"ngil-input\" [class.ngil-input--error]=\"!!model.errorMessage\">\r\n <label class=\"ngil-input__label\" [for]=\"formControlName\">\r\n <ng-content select=\"[labelPrefix]\"></ng-content>\r\n <span> {{ label }}{{ required ? '*' : '' }} </span>\r\n <ng-content select=\"[labelSuffix]\"></ng-content>\r\n </label>\r\n <div class=\"ngil-input__field\">\r\n <ng-content select=\"[prefix]\"></ng-content>\r\n <input\r\n class=\"ngil-input__input\"\r\n [id]=\"formControlName\"\r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [formControl]=\"control\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <ng-content select=\"[suffix]\"></ng-content>\r\n </div>\r\n <ng-content select=\"[hint]\"></ng-content>\r\n <small class=\"ngil-input__error-message\">{{ model.errorMessage }}</small>\r\n </div>\r\n }\r\n", styles: [":host{display:flex;width:100%;flex-direction:column;margin:.25rem 0 2rem;min-width:200px}:host .ngil-input{flex-grow:1;position:relative}:host .ngil-input--error{color:red}:host .ngil-input--error .ngil-input__input{border-color:red}:host .ngil-input__label{display:flex;gap:.5rem}:host .ngil-input__input{width:100%;outline:none;border:1px solid black;border-radius:3px;padding:.25rem}:host .ngil-input__field{display:flex;gap:.5rem;align-items:center}:host .ngil-input__error-message{position:absolute;margin:.1rem 0;height:1rem;font-size:85%}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
46
48
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilInputComponent, decorators: [{
|
|
48
50
|
type: Component,
|
|
49
51
|
args: [{ selector: 'ngil-input', providers: [
|
|
50
52
|
{
|
|
@@ -52,113 +54,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
52
54
|
useExisting: forwardRef(() => NgilInputComponent),
|
|
53
55
|
multi: true
|
|
54
56
|
}
|
|
55
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "
|
|
57
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (model$ | async; as model) {\r\n <div class=\"ngil-input\" [class.ngil-input--error]=\"!!model.errorMessage\">\r\n <label class=\"ngil-input__label\" [for]=\"formControlName\">\r\n <ng-content select=\"[labelPrefix]\"></ng-content>\r\n <span> {{ label }}{{ required ? '*' : '' }} </span>\r\n <ng-content select=\"[labelSuffix]\"></ng-content>\r\n </label>\r\n <div class=\"ngil-input__field\">\r\n <ng-content select=\"[prefix]\"></ng-content>\r\n <input\r\n class=\"ngil-input__input\"\r\n [id]=\"formControlName\"\r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [formControl]=\"control\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <ng-content select=\"[suffix]\"></ng-content>\r\n </div>\r\n <ng-content select=\"[hint]\"></ng-content>\r\n <small class=\"ngil-input__error-message\">{{ model.errorMessage }}</small>\r\n </div>\r\n }\r\n", styles: [":host{display:flex;width:100%;flex-direction:column;margin:.25rem 0 2rem;min-width:200px}:host .ngil-input{flex-grow:1;position:relative}:host .ngil-input--error{color:red}:host .ngil-input--error .ngil-input__input{border-color:red}:host .ngil-input__label{display:flex;gap:.5rem}:host .ngil-input__input{width:100%;outline:none;border:1px solid black;border-radius:3px;padding:.25rem}:host .ngil-input__field{display:flex;gap:.5rem;align-items:center}:host .ngil-input__error-message{position:absolute;margin:.1rem 0;height:1rem;font-size:85%}\n"] }]
|
|
56
58
|
}], propDecorators: { type: [{
|
|
57
59
|
type: Input
|
|
58
60
|
}], changed: [{
|
|
59
61
|
type: Output
|
|
60
62
|
}] } });
|
|
61
63
|
|
|
62
|
-
class NgilOverlayComponent {
|
|
63
|
-
constructor(overlay) {
|
|
64
|
-
this.overlay = overlay;
|
|
65
|
-
this.overwriteConfig = {};
|
|
66
|
-
this.destroy$ = new Subject();
|
|
67
|
-
this.maxHeight = 500;
|
|
68
|
-
this.isOpened = false;
|
|
69
|
-
}
|
|
70
|
-
open() {
|
|
71
|
-
this.overlayRef = this.overlay.create(this.getOverlayConfig());
|
|
72
|
-
const portal = new DomPortal(this.el);
|
|
73
|
-
this.overlayRef.attach(portal);
|
|
74
|
-
this.overlayRef
|
|
75
|
-
.backdropClick()
|
|
76
|
-
.pipe(takeUntil$1(this.destroy$))
|
|
77
|
-
.subscribe(() => {
|
|
78
|
-
this.close();
|
|
79
|
-
});
|
|
80
|
-
this.isOpened = true;
|
|
81
|
-
}
|
|
82
|
-
getOverlayConfig() {
|
|
83
|
-
return {
|
|
84
|
-
positionStrategy: this.getStrategy(),
|
|
85
|
-
hasBackdrop: true,
|
|
86
|
-
backdropClass: this.origin ? 'cdk-overlay-transparent-backdrop' : 'cdk-overlay-dark-backdrop',
|
|
87
|
-
panelClass: ['ngil-overlay-panel'],
|
|
88
|
-
maxHeight: this.maxHeight,
|
|
89
|
-
minWidth: this.origin?.nativeElement.offsetWidth,
|
|
90
|
-
...this.overwriteConfig
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
getStrategy() {
|
|
94
|
-
if (!this.origin) {
|
|
95
|
-
return this.overlay.position().global().centerHorizontally().centerVertically();
|
|
96
|
-
}
|
|
97
|
-
const primaryX = 'start';
|
|
98
|
-
const secondaryX = primaryX === 'start' ? 'end' : 'start';
|
|
99
|
-
const primaryY = 'top';
|
|
100
|
-
const secondaryY = 'bottom';
|
|
101
|
-
return this.overlay
|
|
102
|
-
.position()
|
|
103
|
-
.flexibleConnectedTo(this.origin)
|
|
104
|
-
.withPositions([
|
|
105
|
-
{
|
|
106
|
-
originX: primaryX,
|
|
107
|
-
originY: secondaryY,
|
|
108
|
-
overlayX: primaryX,
|
|
109
|
-
overlayY: primaryY
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
originX: primaryX,
|
|
113
|
-
originY: primaryY,
|
|
114
|
-
overlayX: primaryX,
|
|
115
|
-
overlayY: secondaryY
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
originX: secondaryX,
|
|
119
|
-
originY: secondaryY,
|
|
120
|
-
overlayX: secondaryX,
|
|
121
|
-
overlayY: primaryY
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
originX: secondaryX,
|
|
125
|
-
originY: primaryY,
|
|
126
|
-
overlayX: secondaryX,
|
|
127
|
-
overlayY: secondaryY
|
|
128
|
-
}
|
|
129
|
-
]);
|
|
130
|
-
}
|
|
131
|
-
close() {
|
|
132
|
-
this.destroy$.next();
|
|
133
|
-
this.overlayRef?.dispose();
|
|
134
|
-
this.overlayRef = undefined;
|
|
135
|
-
this.isOpened = false;
|
|
136
|
-
}
|
|
137
|
-
toggle() {
|
|
138
|
-
if (this.isOpened) {
|
|
139
|
-
this.close();
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
this.open();
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
ngOnDestroy() {
|
|
146
|
-
this.destroy$.next();
|
|
147
|
-
this.destroy$.complete();
|
|
148
|
-
}
|
|
149
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgilOverlayComponent, deps: [{ token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
150
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: NgilOverlayComponent, selector: "ngil-overlay", inputs: { overwriteConfig: "overwriteConfig" }, viewQueries: [{ propertyName: "el", first: true, predicate: ["contentWrapper"], descendants: true }], ngImport: i0, template: "<div class=\"ngil-overlay-content\" #contentWrapper>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["ngil-overlay{display:none}.ngil-overlay-panel .ngil-overlay-content{display:flex;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
151
|
-
}
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgilOverlayComponent, decorators: [{
|
|
153
|
-
type: Component,
|
|
154
|
-
args: [{ selector: 'ngil-overlay', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ngil-overlay-content\" #contentWrapper>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["ngil-overlay{display:none}.ngil-overlay-panel .ngil-overlay-content{display:flex;width:100%}\n"] }]
|
|
155
|
-
}], ctorParameters: () => [{ type: i1$1.Overlay }], propDecorators: { el: [{
|
|
156
|
-
type: ViewChild,
|
|
157
|
-
args: ['contentWrapper']
|
|
158
|
-
}], overwriteConfig: [{
|
|
159
|
-
type: Input
|
|
160
|
-
}] } });
|
|
161
|
-
|
|
162
64
|
class NgilSelectOptionsComponent {
|
|
163
65
|
constructor() {
|
|
164
66
|
this.selectedItems = null;
|
|
@@ -193,12 +95,12 @@ class NgilSelectOptionsComponent {
|
|
|
193
95
|
this.destroy$.next();
|
|
194
96
|
this.destroy$.complete();
|
|
195
97
|
}
|
|
196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
197
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilSelectOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
99
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: NgilSelectOptionsComponent, isStandalone: false, selector: "ngil-select-options", inputs: { selectedItems: "selectedItems", items: "items", displayKey: "displayKey", multiple: "multiple", display: "display" }, outputs: { itemSelected: "itemSelected" }, ngImport: i0, template: "@if (display) {\r\n <div class=\"ngil-dropdown\" role=\"listbox\" data-test=\"ngil-select-options-list\">\r\n @for (item of items; track item) {\r\n <div\r\n role=\"option\"\r\n class=\"ngil-dropdown__item\"\r\n data-test=\"ngil-select-option\"\r\n [attr.value]=\"item\"\r\n [attr.displayValue]=\"displayKey ? item[displayKey] : item\"\r\n (click)=\"onItemSelected(item)\"\r\n [class.ngil-dropdown__item--selected]=\"isSelected(item)\"\r\n >\r\n {{ displayKey ? item[displayKey] : item }}\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{display:flex;width:100%;flex-direction:column;min-width:200px;background:#fff;border:1px solid #000;overflow-y:auto}:host .ngil-dropdown__item{line-height:1.5rem;padding:.25rem .5rem}:host .ngil-dropdown__item:hover{background:#d3d3d3}:host .ngil-dropdown__item--selected{background:#708090}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
198
100
|
}
|
|
199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilSelectOptionsComponent, decorators: [{
|
|
200
102
|
type: Component,
|
|
201
|
-
args: [{ selector: 'ngil-select-options', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ngil-dropdown\"
|
|
103
|
+
args: [{ selector: 'ngil-select-options', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (display) {\r\n <div class=\"ngil-dropdown\" role=\"listbox\" data-test=\"ngil-select-options-list\">\r\n @for (item of items; track item) {\r\n <div\r\n role=\"option\"\r\n class=\"ngil-dropdown__item\"\r\n data-test=\"ngil-select-option\"\r\n [attr.value]=\"item\"\r\n [attr.displayValue]=\"displayKey ? item[displayKey] : item\"\r\n (click)=\"onItemSelected(item)\"\r\n [class.ngil-dropdown__item--selected]=\"isSelected(item)\"\r\n >\r\n {{ displayKey ? item[displayKey] : item }}\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{display:flex;width:100%;flex-direction:column;min-width:200px;background:#fff;border:1px solid #000;overflow-y:auto}:host .ngil-dropdown__item{line-height:1.5rem;padding:.25rem .5rem}:host .ngil-dropdown__item:hover{background:#d3d3d3}:host .ngil-dropdown__item--selected{background:#708090}\n"] }]
|
|
202
104
|
}], propDecorators: { selectedItems: [{
|
|
203
105
|
type: Input
|
|
204
106
|
}], items: [{
|
|
@@ -213,67 +115,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
213
115
|
type: Output
|
|
214
116
|
}] } });
|
|
215
117
|
|
|
216
|
-
class OverlayToggleDirective {
|
|
217
|
-
set ngilOverlayToggle(overlay) {
|
|
218
|
-
this.overlay = overlay;
|
|
219
|
-
}
|
|
220
|
-
set isOverlayOrigin(isOrigin) {
|
|
221
|
-
this.isOrigin = isOrigin;
|
|
222
|
-
this.setOverlayOrigin();
|
|
223
|
-
}
|
|
224
|
-
constructor(elementRef) {
|
|
225
|
-
this.elementRef = elementRef;
|
|
226
|
-
this.isOrigin = true;
|
|
227
|
-
this.onClick = (event) => {
|
|
228
|
-
if (!this.overlay) {
|
|
229
|
-
throw new Error(`The overlay is not defined. The overlay component should be provided in the directive input
|
|
230
|
-
|
|
231
|
-
<my-element [ngilOverlayToggle]="overlay"></my-element>
|
|
232
|
-
<ngil-overlay #overlay>...</ngil-overlay>
|
|
233
|
-
`);
|
|
234
|
-
}
|
|
235
|
-
if (!this.overlay.isOpened) {
|
|
236
|
-
this.overlay.open();
|
|
237
|
-
}
|
|
238
|
-
event.stopPropagation();
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
ngOnInit() {
|
|
242
|
-
this.setOverlayOrigin();
|
|
243
|
-
}
|
|
244
|
-
setOverlayOrigin() {
|
|
245
|
-
if (this.isOrigin && this.overlay) {
|
|
246
|
-
this.overlay.origin = this.elementRef;
|
|
247
|
-
}
|
|
248
|
-
else if (this.overlay) {
|
|
249
|
-
this.overlay.origin = undefined;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: OverlayToggleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
253
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.2", type: OverlayToggleDirective, selector: "[ngilOverlayToggle]", inputs: { ngilOverlayToggle: "ngilOverlayToggle", isOverlayOrigin: "isOverlayOrigin" }, host: { listeners: { "click": "onClick($event)" } }, exportAs: ["ngilOverlayToggle"], ngImport: i0 }); }
|
|
254
|
-
}
|
|
255
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: OverlayToggleDirective, decorators: [{
|
|
256
|
-
type: Directive,
|
|
257
|
-
args: [{
|
|
258
|
-
selector: '[ngilOverlayToggle]',
|
|
259
|
-
exportAs: 'ngilOverlayToggle'
|
|
260
|
-
}]
|
|
261
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { ngilOverlayToggle: [{
|
|
262
|
-
type: Input
|
|
263
|
-
}], isOverlayOrigin: [{
|
|
264
|
-
type: Input
|
|
265
|
-
}], onClick: [{
|
|
266
|
-
type: HostListener,
|
|
267
|
-
args: ['click', ['$event']]
|
|
268
|
-
}] } });
|
|
269
|
-
|
|
270
118
|
class NgilSelectComponent extends AbstractInputComponent {
|
|
271
|
-
constructor() {
|
|
272
|
-
super(...arguments);
|
|
273
|
-
this.multiple = false;
|
|
274
|
-
this.items = [];
|
|
275
|
-
this.value = null;
|
|
276
|
-
}
|
|
277
119
|
get displayValue() {
|
|
278
120
|
if (Array.isArray(this.value)) {
|
|
279
121
|
return this.value.map(item => (this.displayKey ? item[this.displayKey] : item)).join(',');
|
|
@@ -283,8 +125,16 @@ class NgilSelectComponent extends AbstractInputComponent {
|
|
|
283
125
|
}
|
|
284
126
|
return this.value;
|
|
285
127
|
}
|
|
128
|
+
constructor(cdr, errorMessagesService, controlContainer) {
|
|
129
|
+
super(errorMessagesService, controlContainer);
|
|
130
|
+
this.cdr = cdr;
|
|
131
|
+
this.multiple = false;
|
|
132
|
+
this.items = [];
|
|
133
|
+
this.value = null;
|
|
134
|
+
}
|
|
286
135
|
writeValue(value) {
|
|
287
136
|
this.value = value;
|
|
137
|
+
this.cdr.markForCheck();
|
|
288
138
|
}
|
|
289
139
|
onItemSelected(item) {
|
|
290
140
|
this.value = item;
|
|
@@ -298,16 +148,16 @@ class NgilSelectComponent extends AbstractInputComponent {
|
|
|
298
148
|
isArray(item) {
|
|
299
149
|
return Array.isArray(item);
|
|
300
150
|
}
|
|
301
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
302
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.NgilErrorMessagesService }, { token: i1.ControlContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
152
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: NgilSelectComponent, isStandalone: false, selector: "ngil-select", inputs: { multiple: "multiple", items: "items", displayKey: "displayKey" }, providers: [
|
|
303
153
|
{
|
|
304
154
|
provide: NG_VALUE_ACCESSOR,
|
|
305
155
|
useExisting: forwardRef(() => NgilSelectComponent),
|
|
306
156
|
multi: true
|
|
307
157
|
}
|
|
308
|
-
], viewQueries: [{ propertyName: "overlay", first: true, predicate: NgilOverlayComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "
|
|
158
|
+
], viewQueries: [{ propertyName: "overlay", first: true, predicate: NgilOverlayComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (model$ | async; as model) {\r\n <div class=\"ngil-select\" [class.ngil-select--error]=\"!!model.errorMessage\">\r\n <label class=\"ngil-select__label\" [for]=\"formControlName\">{{ label }}{{ required ? '*' : '' }}</label>\r\n <div class=\"ngil-select__field\">\r\n <div class=\"ngil-select__field-content\">\r\n <input\r\n class=\"ngil-select__input\"\r\n [value]=\"displayValue\"\r\n [disabled]=\"disabled\"\r\n (keydown)=\"$event.preventDefault(); overlay.toggle()\"\r\n [id]=\"formControlName\"\r\n (blur)=\"onBlur()\"\r\n [ngilOverlayToggle]=\"overlay\"\r\n />\r\n </div>\r\n <ng-content select=\"[suffix]\"></ng-content>\r\n </div>\r\n <small class=\"ngil-select__error-message\">{{ model.errorMessage }}</small>\r\n </div>\r\n <ngil-overlay #overlay [overwriteConfig]=\"{ maxHeight: 500 }\">\r\n <ngil-select-options\r\n ngilOverlay\r\n class=\"ngil-select__dropdown\"\r\n data-test=\"ngil-select-options\"\r\n [display]=\"overlay.isOpened\"\r\n [multiple]=\"multiple\"\r\n [items]=\"items\"\r\n [displayKey]=\"displayKey\"\r\n [selectedItems]=\"value\"\r\n (itemSelected)=\"onItemSelected($event)\"\r\n ></ngil-select-options>\r\n </ngil-overlay>\r\n }\r\n", styles: [":host{display:flex;width:100%;flex-direction:column;margin:.25rem 0 2rem;min-width:200px}:host .ngil-select{flex-grow:1;position:relative}:host .ngil-select--error{color:red}:host .ngil-select--error .ngil-select__input{border-color:red}:host .ngil-select__label{display:block}:host .ngil-select__input{width:100%;outline:none;border:1px solid black;border-radius:3px;padding:.25rem;overflow:hidden}:host .ngil-select__field{display:flex}:host .ngil-select__field-content{flex-grow:1}:host .ngil-select__error-message{position:absolute;margin:.1rem 0;height:1rem;font-size:85%}:host .ngil-select__dropdown{width:100%}:host .hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3.NgilOverlayToggleDirective, selector: "[ngilOverlayToggle]", inputs: ["ngilOverlayToggle", "isOverlayOrigin"], exportAs: ["ngilOverlayToggle"] }, { kind: "component", type: i3.NgilOverlayComponent, selector: "ngil-overlay", inputs: ["overwriteConfig", "positions"] }, { kind: "component", type: NgilSelectOptionsComponent, selector: "ngil-select-options", inputs: ["selectedItems", "items", "displayKey", "multiple", "display"], outputs: ["itemSelected"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
309
159
|
}
|
|
310
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilSelectComponent, decorators: [{
|
|
311
161
|
type: Component,
|
|
312
162
|
args: [{ selector: 'ngil-select', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
313
163
|
{
|
|
@@ -315,8 +165,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
315
165
|
useExisting: forwardRef(() => NgilSelectComponent),
|
|
316
166
|
multi: true
|
|
317
167
|
}
|
|
318
|
-
], template: "
|
|
319
|
-
}],
|
|
168
|
+
], standalone: false, template: "@if (model$ | async; as model) {\r\n <div class=\"ngil-select\" [class.ngil-select--error]=\"!!model.errorMessage\">\r\n <label class=\"ngil-select__label\" [for]=\"formControlName\">{{ label }}{{ required ? '*' : '' }}</label>\r\n <div class=\"ngil-select__field\">\r\n <div class=\"ngil-select__field-content\">\r\n <input\r\n class=\"ngil-select__input\"\r\n [value]=\"displayValue\"\r\n [disabled]=\"disabled\"\r\n (keydown)=\"$event.preventDefault(); overlay.toggle()\"\r\n [id]=\"formControlName\"\r\n (blur)=\"onBlur()\"\r\n [ngilOverlayToggle]=\"overlay\"\r\n />\r\n </div>\r\n <ng-content select=\"[suffix]\"></ng-content>\r\n </div>\r\n <small class=\"ngil-select__error-message\">{{ model.errorMessage }}</small>\r\n </div>\r\n <ngil-overlay #overlay [overwriteConfig]=\"{ maxHeight: 500 }\">\r\n <ngil-select-options\r\n ngilOverlay\r\n class=\"ngil-select__dropdown\"\r\n data-test=\"ngil-select-options\"\r\n [display]=\"overlay.isOpened\"\r\n [multiple]=\"multiple\"\r\n [items]=\"items\"\r\n [displayKey]=\"displayKey\"\r\n [selectedItems]=\"value\"\r\n (itemSelected)=\"onItemSelected($event)\"\r\n ></ngil-select-options>\r\n </ngil-overlay>\r\n }\r\n", styles: [":host{display:flex;width:100%;flex-direction:column;margin:.25rem 0 2rem;min-width:200px}:host .ngil-select{flex-grow:1;position:relative}:host .ngil-select--error{color:red}:host .ngil-select--error .ngil-select__input{border-color:red}:host .ngil-select__label{display:block}:host .ngil-select__input{width:100%;outline:none;border:1px solid black;border-radius:3px;padding:.25rem;overflow:hidden}:host .ngil-select__field{display:flex}:host .ngil-select__field-content{flex-grow:1}:host .ngil-select__error-message{position:absolute;margin:.1rem 0;height:1rem;font-size:85%}:host .ngil-select__dropdown{width:100%}:host .hidden{display:none}\n"] }]
|
|
169
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.NgilErrorMessagesService }, { type: i1.ControlContainer, decorators: [{
|
|
170
|
+
type: Optional
|
|
171
|
+
}] }], propDecorators: { overlay: [{
|
|
320
172
|
type: ViewChild,
|
|
321
173
|
args: [NgilOverlayComponent]
|
|
322
174
|
}], multiple: [{
|
|
@@ -345,16 +197,16 @@ class NgilTextareaComponent extends AbstractInputComponent {
|
|
|
345
197
|
this.onChange(value);
|
|
346
198
|
}
|
|
347
199
|
}
|
|
348
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
349
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
201
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: NgilTextareaComponent, isStandalone: false, selector: "ngil-textarea", providers: [
|
|
350
202
|
{
|
|
351
203
|
provide: NG_VALUE_ACCESSOR,
|
|
352
204
|
useExisting: forwardRef(() => NgilTextareaComponent),
|
|
353
205
|
multi: true
|
|
354
206
|
}
|
|
355
|
-
], usesInheritance: true, ngImport: i0, template: "
|
|
207
|
+
], usesInheritance: true, ngImport: i0, template: "@if (model$ | async; as model) {\r\n <div class=\"ngil-textarea\" [class.ngil-textarea--error]=\"!!model.errorMessage\">\r\n <label class=\"ngil-textarea__label\" [for]=\"formControlName\">{{ label }}{{ required ? '*' : '' }}</label>\r\n <div class=\"ngil-textarea__field\">\r\n <textarea\r\n class=\"ngil-textarea__input\"\r\n [id]=\"formControlName\"\r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [formControl]=\"control\"\r\n (blur)=\"onBlur()\"\r\n >\r\n </textarea>\r\n <ng-content select=\"[suffix]\"></ng-content>\r\n </div>\r\n <small class=\"ngil-textarea__error-message\">{{ model.errorMessage }}</small>\r\n </div>\r\n}\r\n", styles: [":host{display:flex;width:100%;flex-direction:column;margin:.25rem 0 2rem;min-width:200px}:host .ngil-textarea{flex-grow:1;position:relative}:host .ngil-textarea--error{color:red}:host .ngil-textarea--error .ngil-textarea__input{border-color:red}:host .ngil-textarea__label{display:block}:host .ngil-textarea__input{width:100%;outline:none;border:1px solid black;border-radius:3px;padding:.25rem;height:4rem}:host .ngil-textarea__field{display:flex}:host .ngil-textarea__error-message{position:absolute;margin:.1rem 0;height:1rem;font-size:85%}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
356
208
|
}
|
|
357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilTextareaComponent, decorators: [{
|
|
358
210
|
type: Component,
|
|
359
211
|
args: [{ selector: 'ngil-textarea', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
360
212
|
{
|
|
@@ -362,7 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
362
214
|
useExisting: forwardRef(() => NgilTextareaComponent),
|
|
363
215
|
multi: true
|
|
364
216
|
}
|
|
365
|
-
], template: "
|
|
217
|
+
], standalone: false, template: "@if (model$ | async; as model) {\r\n <div class=\"ngil-textarea\" [class.ngil-textarea--error]=\"!!model.errorMessage\">\r\n <label class=\"ngil-textarea__label\" [for]=\"formControlName\">{{ label }}{{ required ? '*' : '' }}</label>\r\n <div class=\"ngil-textarea__field\">\r\n <textarea\r\n class=\"ngil-textarea__input\"\r\n [id]=\"formControlName\"\r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [formControl]=\"control\"\r\n (blur)=\"onBlur()\"\r\n >\r\n </textarea>\r\n <ng-content select=\"[suffix]\"></ng-content>\r\n </div>\r\n <small class=\"ngil-textarea__error-message\">{{ model.errorMessage }}</small>\r\n </div>\r\n}\r\n", styles: [":host{display:flex;width:100%;flex-direction:column;margin:.25rem 0 2rem;min-width:200px}:host .ngil-textarea{flex-grow:1;position:relative}:host .ngil-textarea--error{color:red}:host .ngil-textarea--error .ngil-textarea__input{border-color:red}:host .ngil-textarea__label{display:block}:host .ngil-textarea__input{width:100%;outline:none;border:1px solid black;border-radius:3px;padding:.25rem;height:4rem}:host .ngil-textarea__field{display:flex}:host .ngil-textarea__error-message{position:absolute;margin:.1rem 0;height:1rem;font-size:85%}\n"] }]
|
|
366
218
|
}] });
|
|
367
219
|
|
|
368
220
|
class PickerToggleComponent {
|
|
@@ -374,12 +226,12 @@ class PickerToggleComponent {
|
|
|
374
226
|
event.stopPropagation();
|
|
375
227
|
};
|
|
376
228
|
}
|
|
377
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
378
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
229
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: PickerToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
230
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: PickerToggleComponent, isStandalone: false, selector: "ngil-picker-toggle", inputs: { picker: "picker" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<button class=\"toggle-button\" type=\"button\">\r\n <svg\r\n class=\"mat-datepicker-toggle-default-icon\"\r\n viewBox=\"0 0 24 24\"\r\n width=\"24px\"\r\n height=\"24px\"\r\n fill=\"currentColor\"\r\n focusable=\"false\"\r\n >\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"\r\n />\r\n </svg>\r\n</button>\r\n", styles: [".toggle-button{display:flex;background:none;border:none;padding:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
379
231
|
}
|
|
380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: PickerToggleComponent, decorators: [{
|
|
381
233
|
type: Component,
|
|
382
|
-
args: [{ selector: 'ngil-picker-toggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"toggle-button\" type=\"button\">\r\n <svg\r\n class=\"mat-datepicker-toggle-default-icon\"\r\n viewBox=\"0 0 24 24\"\r\n width=\"24px\"\r\n height=\"24px\"\r\n fill=\"currentColor\"\r\n focusable=\"false\"\r\n >\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"\r\n />\r\n </svg>\r\n</button>\r\n", styles: [".toggle-button{display:flex;background:none;border:none;padding:0}\n"] }]
|
|
234
|
+
args: [{ selector: 'ngil-picker-toggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<button class=\"toggle-button\" type=\"button\">\r\n <svg\r\n class=\"mat-datepicker-toggle-default-icon\"\r\n viewBox=\"0 0 24 24\"\r\n width=\"24px\"\r\n height=\"24px\"\r\n fill=\"currentColor\"\r\n focusable=\"false\"\r\n >\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"\r\n />\r\n </svg>\r\n</button>\r\n", styles: [".toggle-button{display:flex;background:none;border:none;padding:0}\n"] }]
|
|
383
235
|
}], propDecorators: { picker: [{
|
|
384
236
|
type: Input
|
|
385
237
|
}], onClick: [{
|
|
@@ -461,15 +313,16 @@ class NumberRotationDirective {
|
|
|
461
313
|
this.buttonUp?.removeEventListener('click', this.onUp);
|
|
462
314
|
this.buttonDown?.removeEventListener('click', this.onDown);
|
|
463
315
|
}
|
|
464
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
465
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NumberRotationDirective, deps: [{ token: i0.ElementRef }, { token: i1.NgControl }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
317
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.4", type: NumberRotationDirective, isStandalone: false, selector: "input[ngilNumberRotation]", inputs: { min: "min", max: "max", buttonUp: "buttonUp", buttonDown: "buttonDown" }, host: { listeners: { "keydown": "onKeyDown($event)", "input": "onInput($event)" } }, ngImport: i0 }); }
|
|
466
318
|
}
|
|
467
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NumberRotationDirective, decorators: [{
|
|
468
320
|
type: Directive,
|
|
469
321
|
args: [{
|
|
470
|
-
selector: 'input[ngilNumberRotation]'
|
|
322
|
+
selector: 'input[ngilNumberRotation]',
|
|
323
|
+
standalone: false
|
|
471
324
|
}]
|
|
472
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type:
|
|
325
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgControl }], propDecorators: { min: [{
|
|
473
326
|
type: Input
|
|
474
327
|
}], max: [{
|
|
475
328
|
type: Input
|
|
@@ -522,16 +375,16 @@ class NgilTimePickerComponent extends AbstractInputComponent {
|
|
|
522
375
|
this.formGroup.reset(this.defaultValue, { emitEvent: false });
|
|
523
376
|
}
|
|
524
377
|
}
|
|
525
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
526
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
378
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilTimePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
379
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: NgilTimePickerComponent, isStandalone: false, selector: "ngil-time-picker", providers: [
|
|
527
380
|
{
|
|
528
381
|
provide: NG_VALUE_ACCESSOR,
|
|
529
382
|
useExisting: NgilTimePickerComponent,
|
|
530
383
|
multi: true
|
|
531
384
|
}
|
|
532
|
-
], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"ngil-time-picker\">\r\n <div class=\"ngil-time-picker__field\">\r\n <button #hourButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"hour\"\r\n [buttonUp]=\"hourButtonUp\"\r\n [buttonDown]=\"hourButtonDown\"\r\n [max]=\"23\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #hourButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n\r\n <span>:</span>\r\n\r\n <div class=\"ngil-time-picker__field\">\r\n <button #minuteButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"minute\"\r\n [buttonUp]=\"minuteButtonUp\"\r\n [buttonDown]=\"minuteButtonDown\"\r\n [max]=\"59\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #minuteButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n\r\n <span>:</span>\r\n\r\n <div class=\"ngil-time-picker__field\">\r\n <button #secondButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"second\"\r\n [buttonUp]=\"secondButtonUp\"\r\n [buttonDown]=\"secondButtonDown\"\r\n [max]=\"59\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #secondButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n</form>\r\n\r\n<ng-template #arrowUp>\r\n <svg\r\n _ngcontent-vre-c235=\"\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 100 100\"\r\n xml:space=\"preserve\"\r\n class=\"ngil-time-picker__arrow\"\r\n >\r\n <polyline\r\n _ngcontent-vre-c235=\"\"\r\n fill=\"none\"\r\n stroke=\"#000000\"\r\n stroke-width=\"10\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n points=\"10, 75 50, 25 90, 75\"\r\n ></polyline>\r\n </svg>\r\n</ng-template>\r\n\r\n<ng-template #arrowDown>\r\n <svg\r\n _ngcontent-vre-c235=\"\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 100 100\"\r\n xml:space=\"preserve\"\r\n class=\"ngil-time-picker__arrow\"\r\n >\r\n <polyline\r\n _ngcontent-vre-c235=\"\"\r\n fill=\"none\"\r\n stroke=\"#000000\"\r\n stroke-width=\"10\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n points=\"10, 25 50, 75 90, 25\"\r\n ></polyline>\r\n </svg>\r\n</ng-template>\r\n", styles: [".ngil-time-picker{display:flex;align-items:center;background:#fff;border:1px solid #000;gap:.5rem;padding:.5rem}.ngil-time-picker__field{width:25px;position:relative;display:flex;flex-direction:column;align-items:center;gap:.5rem}.ngil-time-picker__input{width:calc(100% - 7px);padding:3px;text-align:center}.ngil-time-picker__button{background:none;border:none;position:relative;display:flex}.ngil-time-picker__arrow{width:18px;height:18px;cursor:pointer}\n"], dependencies: [{ kind: "directive", type:
|
|
385
|
+
], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"ngil-time-picker\">\r\n <div class=\"ngil-time-picker__field\">\r\n <button #hourButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"hour\"\r\n [buttonUp]=\"hourButtonUp\"\r\n [buttonDown]=\"hourButtonDown\"\r\n [max]=\"23\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #hourButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n\r\n <span>:</span>\r\n\r\n <div class=\"ngil-time-picker__field\">\r\n <button #minuteButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"minute\"\r\n [buttonUp]=\"minuteButtonUp\"\r\n [buttonDown]=\"minuteButtonDown\"\r\n [max]=\"59\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #minuteButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n\r\n <span>:</span>\r\n\r\n <div class=\"ngil-time-picker__field\">\r\n <button #secondButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"second\"\r\n [buttonUp]=\"secondButtonUp\"\r\n [buttonDown]=\"secondButtonDown\"\r\n [max]=\"59\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #secondButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n</form>\r\n\r\n<ng-template #arrowUp>\r\n <svg\r\n _ngcontent-vre-c235=\"\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 100 100\"\r\n xml:space=\"preserve\"\r\n class=\"ngil-time-picker__arrow\"\r\n >\r\n <polyline\r\n _ngcontent-vre-c235=\"\"\r\n fill=\"none\"\r\n stroke=\"#000000\"\r\n stroke-width=\"10\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n points=\"10, 75 50, 25 90, 75\"\r\n ></polyline>\r\n </svg>\r\n</ng-template>\r\n\r\n<ng-template #arrowDown>\r\n <svg\r\n _ngcontent-vre-c235=\"\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 100 100\"\r\n xml:space=\"preserve\"\r\n class=\"ngil-time-picker__arrow\"\r\n >\r\n <polyline\r\n _ngcontent-vre-c235=\"\"\r\n fill=\"none\"\r\n stroke=\"#000000\"\r\n stroke-width=\"10\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n points=\"10, 25 50, 75 90, 25\"\r\n ></polyline>\r\n </svg>\r\n</ng-template>\r\n", styles: [".ngil-time-picker{display:flex;align-items:center;background:#fff;border:1px solid #000;gap:.5rem;padding:.5rem}.ngil-time-picker__field{width:25px;position:relative;display:flex;flex-direction:column;align-items:center;gap:.5rem}.ngil-time-picker__input{width:calc(100% - 7px);padding:3px;text-align:center}.ngil-time-picker__button{background:none;border:none;position:relative;display:flex}.ngil-time-picker__arrow{width:18px;height:18px;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NumberRotationDirective, selector: "input[ngilNumberRotation]", inputs: ["min", "max", "buttonUp", "buttonDown"] }] }); }
|
|
533
386
|
}
|
|
534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilTimePickerComponent, decorators: [{
|
|
535
388
|
type: Component,
|
|
536
389
|
args: [{ selector: 'ngil-time-picker', providers: [
|
|
537
390
|
{
|
|
@@ -539,7 +392,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
539
392
|
useExisting: NgilTimePickerComponent,
|
|
540
393
|
multi: true
|
|
541
394
|
}
|
|
542
|
-
], template: "<form [formGroup]=\"formGroup\" class=\"ngil-time-picker\">\r\n <div class=\"ngil-time-picker__field\">\r\n <button #hourButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"hour\"\r\n [buttonUp]=\"hourButtonUp\"\r\n [buttonDown]=\"hourButtonDown\"\r\n [max]=\"23\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #hourButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n\r\n <span>:</span>\r\n\r\n <div class=\"ngil-time-picker__field\">\r\n <button #minuteButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"minute\"\r\n [buttonUp]=\"minuteButtonUp\"\r\n [buttonDown]=\"minuteButtonDown\"\r\n [max]=\"59\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #minuteButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n\r\n <span>:</span>\r\n\r\n <div class=\"ngil-time-picker__field\">\r\n <button #secondButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"second\"\r\n [buttonUp]=\"secondButtonUp\"\r\n [buttonDown]=\"secondButtonDown\"\r\n [max]=\"59\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #secondButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n</form>\r\n\r\n<ng-template #arrowUp>\r\n <svg\r\n _ngcontent-vre-c235=\"\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 100 100\"\r\n xml:space=\"preserve\"\r\n class=\"ngil-time-picker__arrow\"\r\n >\r\n <polyline\r\n _ngcontent-vre-c235=\"\"\r\n fill=\"none\"\r\n stroke=\"#000000\"\r\n stroke-width=\"10\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n points=\"10, 75 50, 25 90, 75\"\r\n ></polyline>\r\n </svg>\r\n</ng-template>\r\n\r\n<ng-template #arrowDown>\r\n <svg\r\n _ngcontent-vre-c235=\"\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 100 100\"\r\n xml:space=\"preserve\"\r\n class=\"ngil-time-picker__arrow\"\r\n >\r\n <polyline\r\n _ngcontent-vre-c235=\"\"\r\n fill=\"none\"\r\n stroke=\"#000000\"\r\n stroke-width=\"10\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n points=\"10, 25 50, 75 90, 25\"\r\n ></polyline>\r\n </svg>\r\n</ng-template>\r\n", styles: [".ngil-time-picker{display:flex;align-items:center;background:#fff;border:1px solid #000;gap:.5rem;padding:.5rem}.ngil-time-picker__field{width:25px;position:relative;display:flex;flex-direction:column;align-items:center;gap:.5rem}.ngil-time-picker__input{width:calc(100% - 7px);padding:3px;text-align:center}.ngil-time-picker__button{background:none;border:none;position:relative;display:flex}.ngil-time-picker__arrow{width:18px;height:18px;cursor:pointer}\n"] }]
|
|
395
|
+
], standalone: false, template: "<form [formGroup]=\"formGroup\" class=\"ngil-time-picker\">\r\n <div class=\"ngil-time-picker__field\">\r\n <button #hourButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"hour\"\r\n [buttonUp]=\"hourButtonUp\"\r\n [buttonDown]=\"hourButtonDown\"\r\n [max]=\"23\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #hourButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n\r\n <span>:</span>\r\n\r\n <div class=\"ngil-time-picker__field\">\r\n <button #minuteButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"minute\"\r\n [buttonUp]=\"minuteButtonUp\"\r\n [buttonDown]=\"minuteButtonDown\"\r\n [max]=\"59\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #minuteButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n\r\n <span>:</span>\r\n\r\n <div class=\"ngil-time-picker__field\">\r\n <button #secondButtonUp class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowUp\"></ng-container>\r\n </button>\r\n <input\r\n ngilNumberRotation\r\n class=\"ngil-time-picker__input\"\r\n formControlName=\"second\"\r\n [buttonUp]=\"secondButtonUp\"\r\n [buttonDown]=\"secondButtonDown\"\r\n [max]=\"59\"\r\n [min]=\"0\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <button #secondButtonDown class=\"ngil-time-picker__button\">\r\n <ng-container *ngTemplateOutlet=\"arrowDown\"></ng-container>\r\n </button>\r\n </div>\r\n</form>\r\n\r\n<ng-template #arrowUp>\r\n <svg\r\n _ngcontent-vre-c235=\"\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 100 100\"\r\n xml:space=\"preserve\"\r\n class=\"ngil-time-picker__arrow\"\r\n >\r\n <polyline\r\n _ngcontent-vre-c235=\"\"\r\n fill=\"none\"\r\n stroke=\"#000000\"\r\n stroke-width=\"10\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n points=\"10, 75 50, 25 90, 75\"\r\n ></polyline>\r\n </svg>\r\n</ng-template>\r\n\r\n<ng-template #arrowDown>\r\n <svg\r\n _ngcontent-vre-c235=\"\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 0 100 100\"\r\n xml:space=\"preserve\"\r\n class=\"ngil-time-picker__arrow\"\r\n >\r\n <polyline\r\n _ngcontent-vre-c235=\"\"\r\n fill=\"none\"\r\n stroke=\"#000000\"\r\n stroke-width=\"10\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n points=\"10, 25 50, 75 90, 25\"\r\n ></polyline>\r\n </svg>\r\n</ng-template>\r\n", styles: [".ngil-time-picker{display:flex;align-items:center;background:#fff;border:1px solid #000;gap:.5rem;padding:.5rem}.ngil-time-picker__field{width:25px;position:relative;display:flex;flex-direction:column;align-items:center;gap:.5rem}.ngil-time-picker__input{width:calc(100% - 7px);padding:3px;text-align:center}.ngil-time-picker__button{background:none;border:none;position:relative;display:flex}.ngil-time-picker__arrow{width:18px;height:18px;cursor:pointer}\n"] }]
|
|
543
396
|
}] });
|
|
544
397
|
|
|
545
398
|
class NgilTimePickerOverlayComponent {
|
|
@@ -637,16 +490,17 @@ class NgilTimePickerOverlayComponent {
|
|
|
637
490
|
]);
|
|
638
491
|
return strategy;
|
|
639
492
|
}
|
|
640
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
641
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
493
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilTimePickerOverlayComponent, deps: [{ token: i1$2.Overlay }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
494
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: NgilTimePickerOverlayComponent, isStandalone: false, selector: "ngil-time-picker-overlay", ngImport: i0, template: '', isInline: true }); }
|
|
642
495
|
}
|
|
643
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilTimePickerOverlayComponent, decorators: [{
|
|
644
497
|
type: Component,
|
|
645
498
|
args: [{
|
|
646
499
|
selector: 'ngil-time-picker-overlay',
|
|
647
|
-
template: ''
|
|
500
|
+
template: '',
|
|
501
|
+
standalone: false
|
|
648
502
|
}]
|
|
649
|
-
}], ctorParameters: () => [{ type: i1$
|
|
503
|
+
}], ctorParameters: () => [{ type: i1$2.Overlay }] });
|
|
650
504
|
|
|
651
505
|
class TimePickerDirective {
|
|
652
506
|
constructor(elementRef, inputComponent, ngControl) {
|
|
@@ -661,16 +515,20 @@ class TimePickerDirective {
|
|
|
661
515
|
}
|
|
662
516
|
};
|
|
663
517
|
this.onInput = (event) => {
|
|
664
|
-
|
|
665
|
-
this.picker?.setValue({
|
|
666
|
-
hour: +value.hour,
|
|
667
|
-
minute: +value.minute || 0,
|
|
668
|
-
second: +value.second || 0
|
|
669
|
-
});
|
|
518
|
+
this.setPickerValue(event.target.value);
|
|
670
519
|
};
|
|
671
520
|
}
|
|
672
521
|
ngOnInit() {
|
|
673
522
|
this.ngControl?.control?.setValidators([this.timeValidator()]);
|
|
523
|
+
this.setPickerValue(this.ngControl?.control?.value);
|
|
524
|
+
}
|
|
525
|
+
setPickerValue(value) {
|
|
526
|
+
const parsedValue = this.getTimePickerValue(value);
|
|
527
|
+
this.picker?.setValue({
|
|
528
|
+
hour: +parsedValue.hour,
|
|
529
|
+
minute: +parsedValue.minute || 0,
|
|
530
|
+
second: +parsedValue.second || 0
|
|
531
|
+
});
|
|
674
532
|
}
|
|
675
533
|
timeValidator() {
|
|
676
534
|
return (control) => {
|
|
@@ -729,17 +587,18 @@ class TimePickerDirective {
|
|
|
729
587
|
this.destroy$.next();
|
|
730
588
|
this.destroy$.complete();
|
|
731
589
|
}
|
|
732
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
733
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
590
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: TimePickerDirective, deps: [{ token: i0.ElementRef }, { token: NgilInputComponent, optional: true }, { token: i1.NgControl, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
591
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.4", type: TimePickerDirective, isStandalone: false, selector: "[ngilTimePicker]", inputs: { picker: "picker" }, outputs: { changed: "changed" }, host: { listeners: { "keydown": "onKeyDown($event)", "input": "onInput($event)" } }, ngImport: i0 }); }
|
|
734
592
|
}
|
|
735
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: TimePickerDirective, decorators: [{
|
|
736
594
|
type: Directive,
|
|
737
595
|
args: [{
|
|
738
|
-
selector: '[ngilTimePicker]'
|
|
596
|
+
selector: '[ngilTimePicker]',
|
|
597
|
+
standalone: false
|
|
739
598
|
}]
|
|
740
599
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NgilInputComponent, decorators: [{
|
|
741
600
|
type: Optional
|
|
742
|
-
}] }, { type:
|
|
601
|
+
}] }, { type: i1.NgControl, decorators: [{
|
|
743
602
|
type: Optional
|
|
744
603
|
}] }], propDecorators: { picker: [{
|
|
745
604
|
type: Input
|
|
@@ -754,8 +613,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
754
613
|
}] } });
|
|
755
614
|
|
|
756
615
|
class NgilUiFormModule {
|
|
757
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
758
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
616
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilUiFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
617
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: NgilUiFormModule, declarations: [NgilInputComponent,
|
|
759
618
|
NgilTimePickerComponent,
|
|
760
619
|
NgilTimePickerOverlayComponent,
|
|
761
620
|
PickerToggleComponent,
|
|
@@ -763,9 +622,7 @@ class NgilUiFormModule {
|
|
|
763
622
|
TimePickerDirective,
|
|
764
623
|
NgilSelectComponent,
|
|
765
624
|
NgilTextareaComponent,
|
|
766
|
-
NgilSelectOptionsComponent,
|
|
767
|
-
NgilOverlayComponent,
|
|
768
|
-
OverlayToggleDirective], imports: [CommonModule, ReactiveFormsModule, OverlayModule], exports: [NgilInputComponent,
|
|
625
|
+
NgilSelectOptionsComponent], imports: [CommonModule, ReactiveFormsModule, NgilOverlayToggleDirective, NgilOverlayComponent], exports: [NgilInputComponent,
|
|
769
626
|
NgilSelectComponent,
|
|
770
627
|
NgilTextareaComponent,
|
|
771
628
|
NgilTimePickerComponent,
|
|
@@ -773,12 +630,12 @@ class NgilUiFormModule {
|
|
|
773
630
|
PickerToggleComponent,
|
|
774
631
|
NumberRotationDirective,
|
|
775
632
|
TimePickerDirective] }); }
|
|
776
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
633
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilUiFormModule, imports: [CommonModule, ReactiveFormsModule, NgilOverlayComponent] }); }
|
|
777
634
|
}
|
|
778
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: NgilUiFormModule, decorators: [{
|
|
779
636
|
type: NgModule,
|
|
780
637
|
args: [{
|
|
781
|
-
imports: [CommonModule, ReactiveFormsModule,
|
|
638
|
+
imports: [CommonModule, ReactiveFormsModule, NgilOverlayToggleDirective, NgilOverlayComponent],
|
|
782
639
|
declarations: [
|
|
783
640
|
NgilInputComponent,
|
|
784
641
|
NgilTimePickerComponent,
|
|
@@ -788,9 +645,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
|
788
645
|
TimePickerDirective,
|
|
789
646
|
NgilSelectComponent,
|
|
790
647
|
NgilTextareaComponent,
|
|
791
|
-
NgilSelectOptionsComponent
|
|
792
|
-
NgilOverlayComponent,
|
|
793
|
-
OverlayToggleDirective
|
|
648
|
+
NgilSelectOptionsComponent
|
|
794
649
|
],
|
|
795
650
|
exports: [
|
|
796
651
|
NgilInputComponent,
|