@3kles/kles-material-dynamicforms 14.0.1 → 14.0.3
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/README.md +24 -24
- package/esm2020/3kles-kles-material-dynamicforms.mjs +4 -4
- package/esm2020/lib/decorators/component.decorator.mjs +7 -7
- package/esm2020/lib/directive/dynamic-component.directive.mjs +44 -44
- package/esm2020/lib/directive/dynamic-field.directive.mjs +50 -50
- package/esm2020/lib/dynamic-form.component.mjs +251 -247
- package/esm2020/lib/enums/type.enum.mjs +19 -19
- package/esm2020/lib/fields/array.component.mjs +57 -53
- package/esm2020/lib/fields/badge.component.mjs +40 -40
- package/esm2020/lib/fields/button-form.component.mjs +44 -44
- package/esm2020/lib/fields/button-submit.component.mjs +38 -38
- package/esm2020/lib/fields/button-toogle-group.component.mjs +51 -51
- package/esm2020/lib/fields/buttonchecker-form.component.mjs +44 -44
- package/esm2020/lib/fields/buttonfile-form.component.mjs +42 -42
- package/esm2020/lib/fields/checkbox.component.mjs +50 -50
- package/esm2020/lib/fields/chip.component.mjs +41 -41
- package/esm2020/lib/fields/color.component.mjs +84 -84
- package/esm2020/lib/fields/date.component.mjs +52 -52
- package/esm2020/lib/fields/field.abstract.mjs +66 -57
- package/esm2020/lib/fields/group.component.mjs +48 -46
- package/esm2020/lib/fields/icon.component.mjs +28 -28
- package/esm2020/lib/fields/input.clearable.component.mjs +112 -112
- package/esm2020/lib/fields/input.component.mjs +158 -158
- package/esm2020/lib/fields/label.component.mjs +40 -40
- package/esm2020/lib/fields/line-break.component.mjs +23 -23
- package/esm2020/lib/fields/link.component.mjs +32 -32
- package/esm2020/lib/fields/list-field.component.mjs +114 -113
- package/esm2020/lib/fields/radio.component.mjs +49 -49
- package/esm2020/lib/fields/select.component.mjs +211 -210
- package/esm2020/lib/fields/select.search.component.mjs +307 -307
- package/esm2020/lib/fields/selection-list.component.mjs +63 -63
- package/esm2020/lib/fields/slide-toggle.component.mjs +43 -43
- package/esm2020/lib/fields/text.component.mjs +40 -40
- package/esm2020/lib/fields/textarea.component.mjs +56 -56
- package/esm2020/lib/forms/button-control.component.mjs +115 -115
- package/esm2020/lib/forms/buttonchecker-control.component.mjs +85 -85
- package/esm2020/lib/forms/buttonfile-control.component.mjs +118 -118
- package/esm2020/lib/interfaces/component.interface.mjs +2 -2
- package/esm2020/lib/interfaces/directive.interface.mjs +2 -0
- package/esm2020/lib/interfaces/field.config.interface.mjs +2 -2
- package/esm2020/lib/interfaces/field.interface.mjs +2 -2
- package/esm2020/lib/interfaces/validator.interface.mjs +2 -2
- package/esm2020/lib/kles-material-dynamicforms.module.mjs +191 -191
- package/esm2020/lib/matcher/form-error.matcher.mjs +16 -16
- package/esm2020/lib/modules/material.module.mjs +278 -278
- package/esm2020/lib/pipe/array.pipe.mjs +22 -22
- package/esm2020/lib/pipe/transform.pipe.mjs +27 -27
- package/esm2020/lib/validators/autocomplete.validator.mjs +23 -23
- package/esm2020/public-api.mjs +59 -58
- package/fesm2015/3kles-kles-material-dynamicforms.mjs +2695 -2673
- package/fesm2015/3kles-kles-material-dynamicforms.mjs.map +1 -1
- package/fesm2020/3kles-kles-material-dynamicforms.mjs +2691 -2670
- package/fesm2020/3kles-kles-material-dynamicforms.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/decorators/component.decorator.d.ts +8 -8
- package/lib/directive/dynamic-component.directive.d.ts +16 -16
- package/lib/directive/dynamic-field.directive.d.ts +18 -18
- package/lib/dynamic-form.component.d.ts +31 -31
- package/lib/enums/type.enum.d.ts +17 -17
- package/lib/fields/array.component.d.ts +11 -11
- package/lib/fields/badge.component.d.ts +9 -9
- package/lib/fields/button-form.component.d.ts +9 -9
- package/lib/fields/button-submit.component.d.ts +9 -9
- package/lib/fields/button-toogle-group.component.d.ts +11 -11
- package/lib/fields/buttonchecker-form.component.d.ts +9 -9
- package/lib/fields/buttonfile-form.component.d.ts +9 -9
- package/lib/fields/checkbox.component.d.ts +9 -9
- package/lib/fields/chip.component.d.ts +9 -9
- package/lib/fields/color.component.d.ts +10 -10
- package/lib/fields/date.component.d.ts +9 -9
- package/lib/fields/field.abstract.d.ts +21 -18
- package/lib/fields/group.component.d.ts +11 -11
- package/lib/fields/icon.component.d.ts +9 -9
- package/lib/fields/input.clearable.component.d.ts +8 -8
- package/lib/fields/input.component.d.ts +15 -15
- package/lib/fields/label.component.d.ts +9 -9
- package/lib/fields/line-break.component.d.ts +9 -9
- package/lib/fields/link.component.d.ts +9 -9
- package/lib/fields/list-field.component.d.ts +19 -18
- package/lib/fields/radio.component.d.ts +9 -9
- package/lib/fields/select.component.d.ts +19 -18
- package/lib/fields/select.search.component.d.ts +22 -22
- package/lib/fields/selection-list.component.d.ts +11 -11
- package/lib/fields/slide-toggle.component.d.ts +9 -9
- package/lib/fields/text.component.d.ts +9 -9
- package/lib/fields/textarea.component.d.ts +9 -9
- package/lib/forms/button-control.component.d.ts +36 -36
- package/lib/forms/buttonchecker-control.component.d.ts +14 -14
- package/lib/forms/buttonfile-control.component.d.ts +20 -20
- package/lib/interfaces/component.interface.d.ts +5 -5
- package/lib/interfaces/directive.interface.d.ts +3 -0
- package/lib/interfaces/field.config.interface.d.ts +58 -54
- package/lib/interfaces/field.interface.d.ts +7 -7
- package/lib/interfaces/validator.interface.d.ts +5 -5
- package/lib/kles-material-dynamicforms.module.d.ts +47 -47
- package/lib/matcher/form-error.matcher.d.ts +9 -9
- package/lib/modules/material.module.d.ts +42 -42
- package/lib/pipe/array.pipe.d.ts +7 -7
- package/lib/pipe/transform.pipe.d.ts +10 -10
- package/lib/validators/autocomplete.validator.d.ts +3 -3
- package/package.json +1 -1
- package/public-api.d.ts +54 -53
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
import { KlesFieldAbstract } from './field.abstract';
|
|
2
|
-
import { Component } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "@angular/forms";
|
|
6
|
-
import * as i3 from "@angular/flex-layout/extended";
|
|
7
|
-
import * as i4 from "@angular/material/form-field";
|
|
8
|
-
import * as i5 from "@angular/material/input";
|
|
9
|
-
import * as i6 from "@angular/material/tooltip";
|
|
10
|
-
import * as i7 from "ngx-color-picker";
|
|
11
|
-
import * as i8 from "@ngx-translate/core";
|
|
12
|
-
export class KlesFormColorComponent extends KlesFieldAbstract {
|
|
13
|
-
ngOnInit() { super.ngOnInit(); }
|
|
14
|
-
invertColor(hex, bw) {
|
|
15
|
-
if (hex.indexOf('#') === 0) {
|
|
16
|
-
hex = hex.slice(1);
|
|
17
|
-
}
|
|
18
|
-
// convert 3-digit hex to 6-digits.
|
|
19
|
-
if (hex.length === 3) {
|
|
20
|
-
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
|
21
|
-
}
|
|
22
|
-
if (hex.length !== 6) {
|
|
23
|
-
return '#000000';
|
|
24
|
-
}
|
|
25
|
-
let r = parseInt(hex.slice(0, 2), 16);
|
|
26
|
-
let g = parseInt(hex.slice(2, 4), 16);
|
|
27
|
-
let b = parseInt(hex.slice(4, 6), 16);
|
|
28
|
-
if (bw) {
|
|
29
|
-
return (r * 0.299 + g * 0.587 + b * 0.114) > 186
|
|
30
|
-
? '#000000'
|
|
31
|
-
: '#FFFFFF';
|
|
32
|
-
}
|
|
33
|
-
// invert color components
|
|
34
|
-
const r1 = (255 - r).toString(16);
|
|
35
|
-
const g1 = (255 - g).toString(16);
|
|
36
|
-
const b1 = (255 - b).toString(16);
|
|
37
|
-
// pad each with zeros and return
|
|
38
|
-
return "#" + r1 + g1 + b1;
|
|
39
|
-
}
|
|
40
|
-
ngOnDestroy() {
|
|
41
|
-
super.ngOnDestroy();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
KlesFormColorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
45
|
-
KlesFormColorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
46
|
-
<mat-form-field [formGroup]="group" class="form-element">
|
|
47
|
-
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [placeholder]="field.placeholder | translate"
|
|
48
|
-
[colorPicker]="group.get(field.name).value"
|
|
49
|
-
[value]="group.get(field.name).value"
|
|
50
|
-
(colorPickerChange)="group.get(field.name).setValue($event)"
|
|
51
|
-
class="colorPicker"
|
|
52
|
-
[style.background]="group.get(field.name).value"
|
|
53
|
-
[style.color]="invertColor(group.get(field.name).value,true)"
|
|
54
|
-
[formControlName]="field.name">
|
|
55
|
-
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
56
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
57
|
-
</ng-container>
|
|
58
|
-
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
59
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
60
|
-
</ng-container>
|
|
61
|
-
</mat-form-field>
|
|
62
|
-
`, isInline: true, styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i4.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i7.ColorPickerDirective, selector: "[colorPicker]", inputs: ["cpWidth", "cpHeight", "cpToggle", "cpDisabled", "cpIgnoredElements", "cpFallbackColor", "cpColorMode", "cpCmykEnabled", "cpOutputFormat", "cpAlphaChannel", "cpDisableInput", "cpDialogDisplay", "cpSaveClickOutside", "cpCloseClickOutside", "cpUseRootViewContainer", "cpPosition", "cpPositionOffset", "cpPositionRelativeToArrow", "cpOKButton", "cpOKButtonText", "cpOKButtonClass", "cpCancelButton", "cpCancelButtonText", "cpCancelButtonClass", "cpPresetLabel", "cpPresetColorsClass", "cpMaxPresetColorsLength", "cpPresetEmptyMessage", "cpPresetEmptyMessageClass", "cpAddColorButton", "cpAddColorButtonText", "cpAddColorButtonClass", "cpRemoveColorButtonClass", "colorPicker", "cpPresetColors"], outputs: ["cpInputChange", "cpToggleChange", "cpSliderChange", "cpSliderDragEnd", "cpSliderDragStart", "colorPickerOpen", "colorPickerClose", "colorPickerCancel", "colorPickerSelect", "colorPickerChange", "cpCmykColorChange", "cpPresetColorsChange"], exportAs: ["ngxColorPicker"] }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] });
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
64
|
-
type: Component,
|
|
65
|
-
args: [{ selector: 'kles-form-color', template: `
|
|
66
|
-
<mat-form-field [formGroup]="group" class="form-element">
|
|
67
|
-
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [placeholder]="field.placeholder | translate"
|
|
68
|
-
[colorPicker]="group.get(field.name).value"
|
|
69
|
-
[value]="group.get(field.name).value"
|
|
70
|
-
(colorPickerChange)="group.get(field.name).setValue($event)"
|
|
71
|
-
class="colorPicker"
|
|
72
|
-
[style.background]="group.get(field.name).value"
|
|
73
|
-
[style.color]="invertColor(group.get(field.name).value,true)"
|
|
74
|
-
[formControlName]="field.name">
|
|
75
|
-
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
76
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
77
|
-
</ng-container>
|
|
78
|
-
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
79
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
80
|
-
</ng-container>
|
|
81
|
-
</mat-form-field>
|
|
82
|
-
`, styles: ["mat-form-field{width:100%}\n"] }]
|
|
83
|
-
}] });
|
|
84
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { KlesFieldAbstract } from './field.abstract';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@angular/forms";
|
|
6
|
+
import * as i3 from "@angular/flex-layout/extended";
|
|
7
|
+
import * as i4 from "@angular/material/form-field";
|
|
8
|
+
import * as i5 from "@angular/material/input";
|
|
9
|
+
import * as i6 from "@angular/material/tooltip";
|
|
10
|
+
import * as i7 from "ngx-color-picker";
|
|
11
|
+
import * as i8 from "@ngx-translate/core";
|
|
12
|
+
export class KlesFormColorComponent extends KlesFieldAbstract {
|
|
13
|
+
ngOnInit() { super.ngOnInit(); }
|
|
14
|
+
invertColor(hex, bw) {
|
|
15
|
+
if (hex.indexOf('#') === 0) {
|
|
16
|
+
hex = hex.slice(1);
|
|
17
|
+
}
|
|
18
|
+
// convert 3-digit hex to 6-digits.
|
|
19
|
+
if (hex.length === 3) {
|
|
20
|
+
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
|
21
|
+
}
|
|
22
|
+
if (hex.length !== 6) {
|
|
23
|
+
return '#000000';
|
|
24
|
+
}
|
|
25
|
+
let r = parseInt(hex.slice(0, 2), 16);
|
|
26
|
+
let g = parseInt(hex.slice(2, 4), 16);
|
|
27
|
+
let b = parseInt(hex.slice(4, 6), 16);
|
|
28
|
+
if (bw) {
|
|
29
|
+
return (r * 0.299 + g * 0.587 + b * 0.114) > 186
|
|
30
|
+
? '#000000'
|
|
31
|
+
: '#FFFFFF';
|
|
32
|
+
}
|
|
33
|
+
// invert color components
|
|
34
|
+
const r1 = (255 - r).toString(16);
|
|
35
|
+
const g1 = (255 - g).toString(16);
|
|
36
|
+
const b1 = (255 - b).toString(16);
|
|
37
|
+
// pad each with zeros and return
|
|
38
|
+
return "#" + r1 + g1 + b1;
|
|
39
|
+
}
|
|
40
|
+
ngOnDestroy() {
|
|
41
|
+
super.ngOnDestroy();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
KlesFormColorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: KlesFormColorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
KlesFormColorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: KlesFormColorComponent, selector: "kles-form-color", usesInheritance: true, ngImport: i0, template: `
|
|
46
|
+
<mat-form-field [formGroup]="group" class="form-element">
|
|
47
|
+
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [placeholder]="field.placeholder | translate"
|
|
48
|
+
[colorPicker]="group.get(field.name).value"
|
|
49
|
+
[value]="group.get(field.name).value"
|
|
50
|
+
(colorPickerChange)="group.get(field.name).setValue($event)"
|
|
51
|
+
class="colorPicker"
|
|
52
|
+
[style.background]="group.get(field.name).value"
|
|
53
|
+
[style.color]="invertColor(group.get(field.name).value,true)"
|
|
54
|
+
[formControlName]="field.name">
|
|
55
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
56
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
57
|
+
</ng-container>
|
|
58
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
59
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
60
|
+
</ng-container>
|
|
61
|
+
</mat-form-field>
|
|
62
|
+
`, isInline: true, styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i4.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i7.ColorPickerDirective, selector: "[colorPicker]", inputs: ["cpWidth", "cpHeight", "cpToggle", "cpDisabled", "cpIgnoredElements", "cpFallbackColor", "cpColorMode", "cpCmykEnabled", "cpOutputFormat", "cpAlphaChannel", "cpDisableInput", "cpDialogDisplay", "cpSaveClickOutside", "cpCloseClickOutside", "cpUseRootViewContainer", "cpPosition", "cpPositionOffset", "cpPositionRelativeToArrow", "cpOKButton", "cpOKButtonText", "cpOKButtonClass", "cpCancelButton", "cpCancelButtonText", "cpCancelButtonClass", "cpPresetLabel", "cpPresetColorsClass", "cpMaxPresetColorsLength", "cpPresetEmptyMessage", "cpPresetEmptyMessageClass", "cpAddColorButton", "cpAddColorButtonText", "cpAddColorButtonClass", "cpRemoveColorButtonClass", "colorPicker", "cpPresetColors"], outputs: ["cpInputChange", "cpToggleChange", "cpSliderChange", "cpSliderDragEnd", "cpSliderDragStart", "colorPickerOpen", "colorPickerClose", "colorPickerCancel", "colorPickerSelect", "colorPickerChange", "cpCmykColorChange", "cpPresetColorsChange"], exportAs: ["ngxColorPicker"] }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] });
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: KlesFormColorComponent, decorators: [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{ selector: 'kles-form-color', template: `
|
|
66
|
+
<mat-form-field [formGroup]="group" class="form-element">
|
|
67
|
+
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [placeholder]="field.placeholder | translate"
|
|
68
|
+
[colorPicker]="group.get(field.name).value"
|
|
69
|
+
[value]="group.get(field.name).value"
|
|
70
|
+
(colorPickerChange)="group.get(field.name).setValue($event)"
|
|
71
|
+
class="colorPicker"
|
|
72
|
+
[style.background]="group.get(field.name).value"
|
|
73
|
+
[style.color]="invertColor(group.get(field.name).value,true)"
|
|
74
|
+
[formControlName]="field.name">
|
|
75
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
76
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
77
|
+
</ng-container>
|
|
78
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
79
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
80
|
+
</ng-container>
|
|
81
|
+
</mat-form-field>
|
|
82
|
+
`, styles: ["mat-form-field{width:100%}\n"] }]
|
|
83
|
+
}] });
|
|
84
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sb3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2xlcy1tYXRlcmlhbC1keW5hbWljZm9ybXMvc3JjL2xpYi9maWVsZHMvY29sb3IuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQ3JELE9BQU8sRUFBVSxTQUFTLEVBQWEsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7Ozs7QUF1QjdELE1BQU0sT0FBTyxzQkFBdUIsU0FBUSxpQkFBaUI7SUFHekQsUUFBUSxLQUFLLEtBQUssQ0FBQyxRQUFRLEVBQUUsQ0FBQyxDQUFDLENBQUM7SUFFaEMsV0FBVyxDQUFDLEdBQUcsRUFBRSxFQUFFO1FBQ2YsSUFBSSxHQUFHLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsRUFBRTtZQUN4QixHQUFHLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0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4gJyMwMDAwMDAnO1xyXG4gICAgICAgIH1cclxuICAgICAgICBsZXQgciA9IHBhcnNlSW50KGhleC5zbGljZSgwLCAyKSwgMTYpO1xyXG4gICAgICAgIGxldCBnID0gcGFyc2VJbnQoaGV4LnNsaWNlKDIsIDQpLCAxNik7XHJcbiAgICAgICAgbGV0IGIgPSBwYXJzZUludChoZXguc2xpY2UoNCwgNiksIDE2KTtcclxuICAgICAgICBpZiAoYncpIHtcclxuICAgICAgICAgICAgcmV0dXJuIChyICogMC4yOTkgKyBnICogMC41ODcgKyBiICogMC4xMTQpID4gMTg2XHJcbiAgICAgICAgICAgICAgICA/ICcjMDAwMDAwJ1xyXG4gICAgICAgICAgICAgICAgOiAnI0ZGRkZGRic7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIC8vIGludmVydCBjb2xvciBjb21wb25lbnRzXHJcbiAgICAgICAgY29uc3QgcjEgPSAoMjU1IC0gcikudG9TdHJpbmcoMTYpO1xyXG4gICAgICAgIGNvbnN0IGcxID0gKDI1NSAtIGcpLnRvU3RyaW5nKDE2KTtcclxuICAgICAgICBjb25zdCBiMSA9ICgyNTUgLSBiKS50b1N0cmluZygxNik7XHJcbiAgICAgICAgLy8gcGFkIGVhY2ggd2l0aCB6ZXJvcyBhbmQgcmV0dXJuXHJcbiAgICAgICAgcmV0dXJuIFwiI1wiICsgcjEgKyBnMSArIGIxO1xyXG4gICAgfVxyXG5cclxuICAgIG5nT25EZXN0cm95KCk6IHZvaWQge1xyXG4gICAgICAgIHN1cGVyLm5nT25EZXN0cm95KCk7XHJcbiAgICB9XHJcbn1cclxuIl19
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { Component } from "@angular/core";
|
|
2
|
-
import { KlesFieldAbstract } from './field.abstract';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "@angular/forms";
|
|
6
|
-
import * as i3 from "@angular/flex-layout/extended";
|
|
7
|
-
import * as i4 from "@angular/material/form-field";
|
|
8
|
-
import * as i5 from "@angular/material/input";
|
|
9
|
-
import * as i6 from "@angular/material/datepicker";
|
|
10
|
-
import * as i7 from "@angular/material/tooltip";
|
|
11
|
-
import * as i8 from "@ngx-translate/core";
|
|
12
|
-
export class KlesFormDateComponent extends KlesFieldAbstract {
|
|
13
|
-
ngOnInit() { super.ngOnInit(); }
|
|
14
|
-
ngOnDestroy() {
|
|
15
|
-
super.ngOnDestroy();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
KlesFormDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
19
|
-
KlesFormDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
20
|
-
<mat-form-field class="demo-full-width margin-top" [color]="field.color" [formGroup]="group">
|
|
21
|
-
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [matDatepicker]="picker" [formControlName]="field.name" [placeholder]="field.placeholder | translate">
|
|
22
|
-
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
|
23
|
-
<mat-datepicker #picker></mat-datepicker>
|
|
24
|
-
<mat-hint></mat-hint>
|
|
25
|
-
|
|
26
|
-
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
27
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
28
|
-
</ng-container>
|
|
29
|
-
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
30
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
31
|
-
</ng-container>
|
|
32
|
-
</mat-form-field>
|
|
33
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i4.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] });
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
35
|
-
type: Component,
|
|
36
|
-
args: [{ selector: "kles-form-datepicker", template: `
|
|
37
|
-
<mat-form-field class="demo-full-width margin-top" [color]="field.color" [formGroup]="group">
|
|
38
|
-
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [matDatepicker]="picker" [formControlName]="field.name" [placeholder]="field.placeholder | translate">
|
|
39
|
-
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
|
40
|
-
<mat-datepicker #picker></mat-datepicker>
|
|
41
|
-
<mat-hint></mat-hint>
|
|
42
|
-
|
|
43
|
-
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
44
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
45
|
-
</ng-container>
|
|
46
|
-
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
47
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
48
|
-
</ng-container>
|
|
49
|
-
</mat-form-field>
|
|
50
|
-
` }]
|
|
51
|
-
}] });
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component } from "@angular/core";
|
|
2
|
+
import { KlesFieldAbstract } from './field.abstract';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@angular/forms";
|
|
6
|
+
import * as i3 from "@angular/flex-layout/extended";
|
|
7
|
+
import * as i4 from "@angular/material/form-field";
|
|
8
|
+
import * as i5 from "@angular/material/input";
|
|
9
|
+
import * as i6 from "@angular/material/datepicker";
|
|
10
|
+
import * as i7 from "@angular/material/tooltip";
|
|
11
|
+
import * as i8 from "@ngx-translate/core";
|
|
12
|
+
export class KlesFormDateComponent extends KlesFieldAbstract {
|
|
13
|
+
ngOnInit() { super.ngOnInit(); }
|
|
14
|
+
ngOnDestroy() {
|
|
15
|
+
super.ngOnDestroy();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
KlesFormDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: KlesFormDateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
KlesFormDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: KlesFormDateComponent, selector: "kles-form-datepicker", usesInheritance: true, ngImport: i0, template: `
|
|
20
|
+
<mat-form-field class="demo-full-width margin-top" [color]="field.color" [formGroup]="group">
|
|
21
|
+
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [matDatepicker]="picker" [formControlName]="field.name" [placeholder]="field.placeholder | translate">
|
|
22
|
+
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
|
23
|
+
<mat-datepicker #picker></mat-datepicker>
|
|
24
|
+
<mat-hint></mat-hint>
|
|
25
|
+
|
|
26
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
27
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
28
|
+
</ng-container>
|
|
29
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
30
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
31
|
+
</ng-container>
|
|
32
|
+
</mat-form-field>
|
|
33
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i4.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: KlesFormDateComponent, decorators: [{
|
|
35
|
+
type: Component,
|
|
36
|
+
args: [{ selector: "kles-form-datepicker", template: `
|
|
37
|
+
<mat-form-field class="demo-full-width margin-top" [color]="field.color" [formGroup]="group">
|
|
38
|
+
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [matDatepicker]="picker" [formControlName]="field.name" [placeholder]="field.placeholder | translate">
|
|
39
|
+
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
|
40
|
+
<mat-datepicker #picker></mat-datepicker>
|
|
41
|
+
<mat-hint></mat-hint>
|
|
42
|
+
|
|
43
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
44
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
45
|
+
</ng-container>
|
|
46
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
47
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
48
|
+
</ng-container>
|
|
49
|
+
</mat-form-field>
|
|
50
|
+
` }]
|
|
51
|
+
}] });
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rbGVzLW1hdGVyaWFsLWR5bmFtaWNmb3Jtcy9zcmMvbGliL2ZpZWxkcy9kYXRlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFxQixNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQzs7Ozs7Ozs7OztBQXFCckQsTUFBTSxPQUFPLHFCQUFzQixTQUFRLGlCQUFpQjtJQUN4RCxRQUFRLEtBQUssS0FBSyxDQUFDLFFBQVEsRUFBRSxDQUFDLENBQUMsQ0FBQztJQUVoQyxXQUFXO1FBQ1AsS0FBSyxDQUFDLFdBQVcsRUFBRSxDQUFDO0lBQ3hCLENBQUM7O2tIQUxRLHFCQUFxQjtzR0FBckIscUJBQXFCLG1GQW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
|
|
@@ -1,57 +1,66 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import { takeUntil } from 'rxjs/operators';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class KlesFieldAbstract {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import { Directive, HostBinding } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { takeUntil } from 'rxjs/operators';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class KlesFieldAbstract {
|
|
6
|
+
constructor(viewRef) {
|
|
7
|
+
this.viewRef = viewRef;
|
|
8
|
+
this._onDestroy = new Subject();
|
|
9
|
+
}
|
|
10
|
+
ngOnInit() {
|
|
11
|
+
// this.applyPipeTransform();
|
|
12
|
+
if (this.field.valueChanges) {
|
|
13
|
+
this.field.valueChanges(this.field, this.group, this.siblingFields);
|
|
14
|
+
}
|
|
15
|
+
this.group.controls[this.field.name]?.valueChanges
|
|
16
|
+
.pipe(takeUntil(this._onDestroy))
|
|
17
|
+
.subscribe(val => {
|
|
18
|
+
if (this.field.valueChanges) {
|
|
19
|
+
this.field.valueChanges(this.field, this.group, this.siblingFields, val);
|
|
20
|
+
}
|
|
21
|
+
// this.applyPipeTransform();
|
|
22
|
+
});
|
|
23
|
+
if (this.field.directive) {
|
|
24
|
+
this.directive = new this.field.directive(this.viewRef, this);
|
|
25
|
+
this.directive.ngOnInit();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
ngAfterViewInit() {
|
|
29
|
+
}
|
|
30
|
+
ngOnDestroy() {
|
|
31
|
+
this.directive?.ngOnDestroy();
|
|
32
|
+
this._onDestroy.next();
|
|
33
|
+
this._onDestroy.complete();
|
|
34
|
+
}
|
|
35
|
+
applyPipeTransform() {
|
|
36
|
+
if (this.group && this.field) {
|
|
37
|
+
const control = this.group.controls[this.field.name];
|
|
38
|
+
if (control) {
|
|
39
|
+
const val = this.group.controls[this.field.name].value;
|
|
40
|
+
if (this.field.pipeTransform) {
|
|
41
|
+
this.field.pipeTransform.forEach(p => {
|
|
42
|
+
let pipeVal = control.value;
|
|
43
|
+
if (p.options) {
|
|
44
|
+
p.options.forEach(opt => {
|
|
45
|
+
pipeVal = p.pipe.transform(val, opt);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
pipeVal = p.pipe.transform(val);
|
|
50
|
+
}
|
|
51
|
+
control.patchValue(pipeVal, { onlySelf: true, emitEvent: false });
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
KlesFieldAbstract.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: KlesFieldAbstract, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
59
|
+
KlesFieldAbstract.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: KlesFieldAbstract, host: { properties: { "attr.klesDirective": "this.directive" } }, ngImport: i0 });
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: KlesFieldAbstract, decorators: [{
|
|
61
|
+
type: Directive
|
|
62
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { directive: [{
|
|
63
|
+
type: HostBinding,
|
|
64
|
+
args: ['attr.klesDirective']
|
|
65
|
+
}] } });
|
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmllbGQuYWJzdHJhY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rbGVzLW1hdGVyaWFsLWR5bmFtaWNmb3Jtcy9zcmMvbGliL2ZpZWxkcy9maWVsZC5hYnN0cmFjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxPQUFPLEVBQW9DLFNBQVMsRUFBb0IsV0FBVyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNHLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDL0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDOztBQUczQyxNQUFNLE9BQWdCLGlCQUFpQjtJQVNuQyxZQUFzQixPQUF5QjtRQUF6QixZQUFPLEdBQVAsT0FBTyxDQUFrQjtRQUZyQyxlQUFVLEdBQUcsSUFBSSxPQUFPLEVBQVEsQ0FBQztJQUkzQyxDQUFDO0lBRUQsUUFBUTtRQUNKLDZCQUE2QjtRQUM3QixJQUFJLElBQUksQ0FBQyxLQUFLLENBQUMsWUFBWSxFQUFFO1lBQ3pCLElBQUksQ0FBQyxLQUFLLENBQUMsWUFBWSxDQUFDLElB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AgICAgICAgdGhpcy5kaXJlY3RpdmUubmdPbkluaXQoKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgbmdBZnRlclZpZXdJbml0KCk6IHZvaWQge1xyXG5cclxuICAgIH1cclxuXHJcbiAgICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcclxuICAgICAgICB0aGlzLmRpcmVjdGl2ZT8ubmdPbkRlc3Ryb3koKTtcclxuICAgICAgICB0aGlzLl9vbkRlc3Ryb3kubmV4dCgpO1xyXG4gICAgICAgIHRoaXMuX29uRGVzdHJveS5jb21wbGV0ZSgpO1xyXG4gICAgfVxyXG5cclxuICAgIGFwcGx5UGlwZVRyYW5zZm9ybSgpIHtcclxuICAgICAgICBpZiAodGhpcy5ncm91cCAmJiB0aGlzLmZpZWxkKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGNvbnRyb2wgPSB0aGlzLmdyb3VwLmNvbnRyb2xzW3RoaXMuZmllbGQubmFtZV07XHJcbiAgICAgICAgICAgIGlmIChjb250cm9sKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCB2YWwgPSB0aGlzLmdyb3VwLmNvbnRyb2xzW3RoaXMuZmllbGQubmFtZV0udmFsdWU7XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5maWVsZC5waXBlVHJhbnNmb3JtKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5maWVsZC5waXBlVHJhbnNmb3JtLmZvckVhY2gocCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwaXBlVmFsID0gY29udHJvbC52YWx1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHAub3B0aW9ucykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5vcHRpb25zLmZvckVhY2gob3B0ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaXBlVmFsID0gcC5waXBlLnRyYW5zZm9ybSh2YWwsIG9wdCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpcGVWYWwgPSBwLnBpcGUudHJhbnNmb3JtKHZhbCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5wYXRjaFZhbHVlKHBpcGVWYWwsIHsgb25seVNlbGY6IHRydWUsIGVtaXRFdmVudDogZmFsc2UgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuIl19
|