@3kles/kles-material-dynamicforms 14.0.3 → 14.0.6
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 +287 -251
- package/esm2020/lib/enums/type.enum.mjs +19 -19
- package/esm2020/lib/fields/array.component.mjs +57 -57
- 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 -66
- package/esm2020/lib/fields/group.component.mjs +48 -48
- 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 -114
- package/esm2020/lib/fields/radio.component.mjs +49 -49
- package/esm2020/lib/fields/select.component.mjs +268 -211
- package/esm2020/lib/fields/select.search.component.mjs +357 -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 -2
- 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 +196 -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 -59
- package/fesm2015/3kles-kles-material-dynamicforms.mjs +2843 -2700
- package/fesm2015/3kles-kles-material-dynamicforms.mjs.map +1 -1
- package/fesm2020/3kles-kles-material-dynamicforms.mjs +2839 -2696
- 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 +32 -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 -21
- 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 -19
- package/lib/fields/radio.component.d.ts +9 -9
- package/lib/fields/select.component.d.ts +20 -19
- package/lib/fields/select.search.component.d.ts +23 -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 -3
- package/lib/interfaces/field.config.interface.d.ts +59 -58
- 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 +56 -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 -3
- package/public-api.d.ts +54 -54
|
@@ -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.7", ngImport: i0, type: KlesFormColorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
KlesFormColorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", 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.7", 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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tcbiAgICAgICAgbGV0IGcgPSBwYXJzZUludChoZXguc2xpY2UoMiwgNCksIDE2KTtcbiAgICAgICAgbGV0IGIgPSBwYXJzZUludChoZXguc2xpY2UoNCwgNiksIDE2KTtcbiAgICAgICAgaWYgKGJ3KSB7XG4gICAgICAgICAgICByZXR1cm4gKHIgKiAwLjI5OSArIGcgKiAwLjU4NyArIGIgKiAwLjExNCkgPiAxODZcbiAgICAgICAgICAgICAgICA/ICcjMDAwMDAwJ1xuICAgICAgICAgICAgICAgIDogJyNGRkZGRkYnO1xuICAgICAgICB9XG4gICAgICAgIC8vIGludmVydCBjb2xvciBjb21wb25lbnRzXG4gICAgICAgIGNvbnN0IHIxID0gKDI1NSAtIHIpLnRvU3RyaW5nKDE2KTtcbiAgICAgICAgY29uc3QgZzEgPSAoMjU1IC0gZykudG9TdHJpbmcoMTYpO1xuICAgICAgICBjb25zdCBiMSA9ICgyNTUgLSBiKS50b1N0cmluZygxNik7XG4gICAgICAgIC8vIHBhZCBlYWNoIHdpdGggemVyb3MgYW5kIHJldHVyblxuICAgICAgICByZXR1cm4gXCIjXCIgKyByMSArIGcxICsgYjE7XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKTogdm9pZCB7XG4gICAgICAgIHN1cGVyLm5nT25EZXN0cm95KCk7XG4gICAgfVxufVxuIl19
|
|
@@ -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.7", ngImport: i0, type: KlesFormDateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
KlesFormDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", 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.7", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rbGVzLW1hdGVyaWFsLWR5bmFtaWNmb3Jtcy9zcmMvbGliL2ZpZWxkcy9kYXRlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFxQixNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQzs7Ozs7Ozs7OztBQXFCckQsTUFBTSxPQUFPLHFCQUFzQixTQUFRLGlCQUFpQjtJQUN4RCxRQUFRLEtBQUssS0FBSyxDQUFDLFFBQVEsRUFBRSxDQUFDLENBQUMsQ0FBQztJQUVoQyxXQUFXO1FBQ1AsS0FBSyxDQUFDLFdBQVcsRUFBRSxDQUFDO0lBQ3hCLENBQUM7O2tIQUxRLHFCQUFxQjtzR0FBckIscUJBQXFCLG1GQWpCcEI7Ozs7Ozs7Ozs7Ozs7O0tBY1Q7MkZBR1EscUJBQXFCO2tCQW5CakMsU0FBUzsrQkFDSSxzQkFBc0IsWUFDdEI7Ozs7Ozs7Ozs7Ozs7O0tBY1QiLCJzb3VyY2VzQ29udGVudC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Jyb3IgKm5nSWY9XCJncm91cC5nZXQoZmllbGQubmFtZSkuaGFzRXJyb3IodmFsaWRhdGlvbi5uYW1lKVwiPnt7dmFsaWRhdGlvbi5tZXNzYWdlIHwgdHJhbnNsYXRlfX08L21hdC1lcnJvcj5cbiAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgIDxuZy1jb250YWluZXIgKm5nRm9yPVwibGV0IHZhbGlkYXRpb24gb2YgZmllbGQuYXN5bmNWYWxpZGF0aW9ucztcIiBuZ1Byb2plY3RBcz1cIm1hdC1lcnJvclwiPlxuICAgICAgICAgICAgPG1hdC1lcnJvciAqbmdJZj1cImdyb3VwLmdldChmaWVsZC5uYW1lKS5oYXNFcnJvcih2YWxpZGF0aW9uLm5hbWUpXCI+e3t2YWxpZGF0aW9uLm1lc3NhZ2UgfCB0cmFuc2xhdGV9fTwvbWF0LWVycm9yPlxuICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cbiAgICBgLFxuICAgIHN0eWxlczogW11cbn0pXG5leHBvcnQgY2xhc3MgS2xlc0Zvcm1EYXRlQ29tcG9uZW50IGV4dGVuZHMgS2xlc0ZpZWxkQWJzdHJhY3QgaW1wbGVtZW50cyBPbkluaXQsIE9uRGVzdHJveSB7XG4gICAgbmdPbkluaXQoKSB7IHN1cGVyLm5nT25Jbml0KCk7IH1cblxuICAgIG5nT25EZXN0cm95KCk6IHZvaWQge1xuICAgICAgICBzdXBlci5uZ09uRGVzdHJveSgpO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -1,66 +1,66 @@
|
|
|
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.
|
|
59
|
-
KlesFieldAbstract.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
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,
|
|
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.7", ngImport: i0, type: KlesFieldAbstract, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
59
|
+
KlesFieldAbstract.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: KlesFieldAbstract, host: { properties: { "attr.klesDirective": "this.directive" } }, ngImport: i0 });
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", 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,eyJ2ZXJza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lzLmdyb3VwLmNvbnRyb2xzW3RoaXMuZmllbGQubmFtZV07XG4gICAgICAgICAgICBpZiAoY29udHJvbCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IHRoaXMuZ3JvdXAuY29udHJvbHNbdGhpcy5maWVsZC5uYW1lXS52YWx1ZTtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5maWVsZC5waXBlVHJhbnNmb3JtKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZmllbGQucGlwZVRyYW5zZm9ybS5mb3JFYWNoKHAgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBpcGVWYWwgPSBjb250cm9sLnZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHAub3B0aW9ucykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAub3B0aW9ucy5mb3JFYWNoKG9wdCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpcGVWYWwgPSBwLnBpcGUudHJhbnNmb3JtKHZhbCwgb3B0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGlwZVZhbCA9IHAucGlwZS50cmFuc2Zvcm0odmFsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wucGF0Y2hWYWx1ZShwaXBlVmFsLCB7IG9ubHlTZWxmOiB0cnVlLCBlbWl0RXZlbnQ6IGZhbHNlIH0pO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
|