@tft/crispr-forms 21.0.17 → 21.1.0
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 +21 -4
- package/fesm2022/tft-crispr-forms.mjs +2071 -1
- package/fesm2022/tft-crispr-forms.mjs.map +1 -1
- package/package.json +7 -7
- package/types/tft-crispr-forms.d.ts +238 -212
- package/fesm2022/tft-crispr-forms-autocomplete-field.component-BgQZYqB0.mjs +0 -95
- package/fesm2022/tft-crispr-forms-autocomplete-field.component-BgQZYqB0.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-3aw152gK.mjs +0 -18
- package/fesm2022/tft-crispr-forms-index-3aw152gK.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BFzx83fR.mjs +0 -39
- package/fesm2022/tft-crispr-forms-index-BFzx83fR.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BMZQakFs.mjs +0 -88
- package/fesm2022/tft-crispr-forms-index-BMZQakFs.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-B_lhA83w.mjs +0 -2
- package/fesm2022/tft-crispr-forms-index-B_lhA83w.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BawhjTMp.mjs +0 -183
- package/fesm2022/tft-crispr-forms-index-BawhjTMp.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CXXD0vdZ.mjs +0 -172
- package/fesm2022/tft-crispr-forms-index-CXXD0vdZ.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CmVahfkJ.mjs +0 -24
- package/fesm2022/tft-crispr-forms-index-CmVahfkJ.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CoUwTugQ.mjs +0 -309
- package/fesm2022/tft-crispr-forms-index-CoUwTugQ.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-D99OHDPc.mjs +0 -40
- package/fesm2022/tft-crispr-forms-index-D99OHDPc.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DYWkX7D3.mjs +0 -83
- package/fesm2022/tft-crispr-forms-index-DYWkX7D3.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DysioRya.mjs +0 -39
- package/fesm2022/tft-crispr-forms-index-DysioRya.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-GlYQbbbv.mjs +0 -36
- package/fesm2022/tft-crispr-forms-index-GlYQbbbv.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-UX-Wdyk1.mjs +0 -40
- package/fesm2022/tft-crispr-forms-index-UX-Wdyk1.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-bTdYHJPk.mjs +0 -68
- package/fesm2022/tft-crispr-forms-index-bTdYHJPk.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-kah2HT_N.mjs +0 -54
- package/fesm2022/tft-crispr-forms-index-kah2HT_N.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-tft-crispr-forms-8liD7eof.mjs +0 -943
- package/fesm2022/tft-crispr-forms-tft-crispr-forms-8liD7eof.mjs.map +0 -1
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/forms';
|
|
4
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import * as i2 from '@angular/material/form-field';
|
|
6
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
7
|
-
import * as i3 from '@angular/material/input';
|
|
8
|
-
import { MatInputModule } from '@angular/material/input';
|
|
9
|
-
import * as i6 from '@tft/form-validation-handler';
|
|
10
|
-
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
11
|
-
import { a as CrisprControlComponent, I as InfoComponent, F as FieldContainerComponent } from './tft-crispr-forms-tft-crispr-forms-8liD7eof.mjs';
|
|
12
|
-
|
|
13
|
-
/* eslint-disable @nx/enforce-module-boundaries */
|
|
14
|
-
const defaultConfig = { rows: 5 };
|
|
15
|
-
class TextareaFieldComponent extends CrisprControlComponent {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.defaultConfig = defaultConfig;
|
|
19
|
-
}
|
|
20
|
-
ngOnInit() {
|
|
21
|
-
super.ngOnInit();
|
|
22
|
-
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: TextareaFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: TextareaFieldComponent, isStandalone: true, selector: "crispr-textarea-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <textarea [rows]=\"config().rows\" matInput [placeholder]=\"config().placeholder\"\n [formControlName]=\"config().controlName\">\n </textarea>\n @if (config().info) {<crispr-info [info]=\"config().info\"></crispr-info>}\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().hint && control().valid) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n\n</crispr-field-container>", styles: ["crispr-info{position:absolute;top:.75em;right:-.25em}\n"], dependencies: [{ kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
25
|
-
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: TextareaFieldComponent, decorators: [{
|
|
27
|
-
type: Component,
|
|
28
|
-
args: [{ selector: 'crispr-textarea-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
29
|
-
InfoComponent,
|
|
30
|
-
ReactiveFormsModule,
|
|
31
|
-
FieldContainerComponent,
|
|
32
|
-
MatFormFieldModule,
|
|
33
|
-
MatInputModule,
|
|
34
|
-
FormValidationHandlerModule
|
|
35
|
-
], standalone: true, template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <textarea [rows]=\"config().rows\" matInput [placeholder]=\"config().placeholder\"\n [formControlName]=\"config().controlName\">\n </textarea>\n @if (config().info) {<crispr-info [info]=\"config().info\"></crispr-info>}\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().hint && control().valid) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n\n</crispr-field-container>", styles: ["crispr-info{position:absolute;top:.75em;right:-.25em}\n"] }]
|
|
36
|
-
}] });
|
|
37
|
-
|
|
38
|
-
export { TextareaFieldComponent };
|
|
39
|
-
//# sourceMappingURL=tft-crispr-forms-index-DysioRya.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-DysioRya.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/textarea-field/textarea-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/textarea-field/textarea-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n TextareaFieldConfig,\n} from '../../utils';\nimport { CrisprControlComponent } from '../../utils/abstracts/crispr-control.abstract';\n\nconst defaultConfig: Partial<TextareaFieldConfig> = { rows: 5 };\n\n@Component({\n selector: 'crispr-textarea-field',\n templateUrl: './textarea-field.component.html',\n styleUrls: ['./textarea-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n InfoComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatFormFieldModule,\n MatInputModule,\n FormValidationHandlerModule\n ],\n standalone: true\n})\nexport class TextareaFieldComponent\n extends CrisprControlComponent<TextareaFieldConfig>\n implements OnInit\n{\n defaultConfig = defaultConfig;\n\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <textarea [rows]=\"config().rows\" matInput [placeholder]=\"config().placeholder\"\n [formControlName]=\"config().controlName\">\n </textarea>\n @if (config().info) {<crispr-info [info]=\"config().info\"></crispr-info>}\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().hint && control().valid) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n\n</crispr-field-container>"],"names":["i4"],"mappings":";;;;;;;;;;;;AAAA;AAcA,MAAM,aAAa,GAAiC,EAAE,IAAI,EAAE,CAAC,EAAE;AAiBzD,MAAO,sBACX,SAAQ,sBAA2C,CAAA;AAhBrD,IAAA,WAAA,GAAA;;QAmBE,IAAA,CAAA,aAAa,GAAG,aAAa;AAK9B,IAAA;IAHC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE;IAClB;8GARW,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAA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AAuB;wBACvB,kBAAkB;wBAClB,cAAc;wBACd;AACH,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,kuBAAA,EAAA,MAAA,EAAA,CAAA,yDAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import * as i2 from '@angular/material/slider';
|
|
4
|
-
import { MatSliderModule } from '@angular/material/slider';
|
|
5
|
-
import * as i1 from '@angular/forms';
|
|
6
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import { a as CrisprControlComponent, I as InfoComponent, F as FieldContainerComponent } from './tft-crispr-forms-tft-crispr-forms-8liD7eof.mjs';
|
|
8
|
-
|
|
9
|
-
/* eslint-disable @nx/enforce-module-boundaries */
|
|
10
|
-
const defaultConfig = {
|
|
11
|
-
displayLimits: true,
|
|
12
|
-
displayWith: (val) => val,
|
|
13
|
-
};
|
|
14
|
-
class SliderFieldComponent extends CrisprControlComponent {
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
this.defaultConfig = defaultConfig;
|
|
18
|
-
}
|
|
19
|
-
ngOnInit() {
|
|
20
|
-
super.ngOnInit();
|
|
21
|
-
}
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SliderFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: SliderFieldComponent, isStandalone: true, selector: "crispr-slider-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n @if (config().label) {\n <label>\n {{config().label}}\n @if (config().info) {\n <crispr-info [info]=\"config().info\">\n </crispr-info>\n }\n </label>\n }\n <div class=\"slider-container\">\n @if (config().displayLimits) {\n <span>\n {{config().min}}\n </span>\n }\n <mat-slider [attr.data-testid]=\"testId()\" [discrete]=\"config().discrete\"\n [displayWith]=\"config().displayWith\" class=\"example-margin\" [formGroup]=\"group()\" [max]=\"config().max\"\n [min]=\"config().min\" [step]=\"config().step\">\n <input matSliderThumb [formControlName]=\"config().controlName\">\n </mat-slider>\n @if (config().displayLimits) {\n <span>\n {{config().max}}\n </span>\n }\n </div>\n\n</crispr-field-container>", styles: [".slider-container{display:flex;align-items:center}.slider-container mat-slider{flex:1}\n"], dependencies: [{ kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: MatSliderModule }, { kind: "component", type: i2.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i2.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
24
|
-
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SliderFieldComponent, decorators: [{
|
|
26
|
-
type: Component,
|
|
27
|
-
args: [{ selector: 'crispr-slider-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
28
|
-
InfoComponent,
|
|
29
|
-
FieldContainerComponent,
|
|
30
|
-
ReactiveFormsModule,
|
|
31
|
-
MatSliderModule
|
|
32
|
-
], template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n @if (config().label) {\n <label>\n {{config().label}}\n @if (config().info) {\n <crispr-info [info]=\"config().info\">\n </crispr-info>\n }\n </label>\n }\n <div class=\"slider-container\">\n @if (config().displayLimits) {\n <span>\n {{config().min}}\n </span>\n }\n <mat-slider [attr.data-testid]=\"testId()\" [discrete]=\"config().discrete\"\n [displayWith]=\"config().displayWith\" class=\"example-margin\" [formGroup]=\"group()\" [max]=\"config().max\"\n [min]=\"config().min\" [step]=\"config().step\">\n <input matSliderThumb [formControlName]=\"config().controlName\">\n </mat-slider>\n @if (config().displayLimits) {\n <span>\n {{config().max}}\n </span>\n }\n </div>\n\n</crispr-field-container>", styles: [".slider-container{display:flex;align-items:center}.slider-container mat-slider{flex:1}\n"] }]
|
|
33
|
-
}], ctorParameters: () => [] });
|
|
34
|
-
|
|
35
|
-
export { SliderFieldComponent };
|
|
36
|
-
//# sourceMappingURL=tft-crispr-forms-index-GlYQbbbv.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-GlYQbbbv.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/slider-field/slider-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/slider-field/slider-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { MatSliderModule } from '@angular/material/slider';\n\nimport { ReactiveFormsModule } from '@angular/forms';\n// import { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n SliderFieldConfig\n} from '../../utils';\nimport { CrisprControlComponent } from '../../utils/abstracts/crispr-control.abstract';\n\nconst defaultConfig: Partial<SliderFieldConfig> = { \n displayLimits: true,\n displayWith: (val) => val,\n};\n\n\n@Component({\n selector: 'crispr-slider-field',\n templateUrl: './slider-field.component.html',\n styleUrls: ['./slider-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n InfoComponent,\n FieldContainerComponent,\n ReactiveFormsModule,\n MatSliderModule\n ]\n})\nexport class SliderFieldComponent extends CrisprControlComponent<SliderFieldConfig> implements OnInit {\n defaultConfig = defaultConfig;\n constructor() {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n @if (config().label) {\n <label>\n {{config().label}}\n @if (config().info) {\n <crispr-info [info]=\"config().info\">\n </crispr-info>\n }\n </label>\n }\n <div class=\"slider-container\">\n @if (config().displayLimits) {\n <span>\n {{config().min}}\n </span>\n }\n <mat-slider [attr.data-testid]=\"testId()\" [discrete]=\"config().discrete\"\n [displayWith]=\"config().displayWith\" class=\"example-margin\" [formGroup]=\"group()\" [max]=\"config().max\"\n [min]=\"config().min\" [step]=\"config().step\">\n <input matSliderThumb [formControlName]=\"config().controlName\">\n </mat-slider>\n @if (config().displayLimits) {\n <span>\n {{config().max}}\n </span>\n }\n </div>\n\n</crispr-field-container>"],"names":[],"mappings":";;;;;;;;AAAA;AAaA,MAAM,aAAa,GAA+B;AAChD,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,WAAW,EAAE,CAAC,GAAG,KAAK,GAAG;CAC1B;AAeK,MAAO,oBAAqB,SAAQ,sBAAyC,CAAA;AAEjF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAFT,IAAA,CAAA,aAAa,GAAG,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EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACnB,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,UAAA,EAAA,eAAA,EAAA,KAAA,EAAA,OAAA,EAAA,eAAA,EAAA,KAAA,EAAA,MAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,EAAA,WAAA,EAAA,SAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;2FAGR,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAZhC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EAAA,eAAA,EAGd,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,aAAa;wBACb,uBAAuB;wBACvB,mBAAmB;wBACnB;AACD,qBAAA,EAAA,QAAA,EAAA,m1BAAA,EAAA,MAAA,EAAA,CAAA,0FAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import * as i3 from '@angular/material/input';
|
|
4
|
-
import { MatInputModule } from '@angular/material/input';
|
|
5
|
-
import * as i1 from '@angular/forms';
|
|
6
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import * as i2 from '@angular/material/form-field';
|
|
8
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
9
|
-
import * as i6 from '@tft/form-validation-handler';
|
|
10
|
-
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
11
|
-
import { a as CrisprControlComponent, I as InfoComponent, F as FieldContainerComponent } from './tft-crispr-forms-tft-crispr-forms-8liD7eof.mjs';
|
|
12
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
|
|
14
|
-
/* eslint-disable @nx/enforce-module-boundaries */
|
|
15
|
-
class InputFieldComponent extends CrisprControlComponent {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.defaultConfig = { inputType: 'text' };
|
|
19
|
-
}
|
|
20
|
-
ngOnInit() {
|
|
21
|
-
super.ngOnInit();
|
|
22
|
-
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InputFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: InputFieldComponent, isStandalone: true, selector: "crispr-input-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n <mat-label>\n {{config().label}}\n </mat-label>\n <input [type]=\"config().inputType\" matInput [placeholder]=\"config().placeholder\"\n [formControlName]=\"config().controlName\" [min]=\"config().min\" [max]=\"config().max\"\n [maxlength]=\"config().maxLength\" [step]=\"config().step\" [autofocus]=\"config().autofocus\"\n [pattern]=\"config().pattern\" [spellcheck]=\"config().spellcheck\" [autocomplete]=\"config().autoComplete\"\n [autocapitalize]=\"config().autoCapitalize\">\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().info) {<crispr-info matSuffix [info]=\"config().info\"></crispr-info>}\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n\n\n</crispr-field-container>", styles: ["crispr-info[matSuffix]{margin-right:.75em}\n"], dependencies: [{ kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { 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: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "ngmodule", type: MatIconModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
25
|
-
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InputFieldComponent, decorators: [{
|
|
27
|
-
type: Component,
|
|
28
|
-
args: [{ selector: 'crispr-input-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
29
|
-
InfoComponent,
|
|
30
|
-
ReactiveFormsModule,
|
|
31
|
-
FieldContainerComponent,
|
|
32
|
-
MatFormFieldModule,
|
|
33
|
-
MatInputModule,
|
|
34
|
-
FormValidationHandlerModule,
|
|
35
|
-
MatIconModule
|
|
36
|
-
], template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n <mat-label>\n {{config().label}}\n </mat-label>\n <input [type]=\"config().inputType\" matInput [placeholder]=\"config().placeholder\"\n [formControlName]=\"config().controlName\" [min]=\"config().min\" [max]=\"config().max\"\n [maxlength]=\"config().maxLength\" [step]=\"config().step\" [autofocus]=\"config().autofocus\"\n [pattern]=\"config().pattern\" [spellcheck]=\"config().spellcheck\" [autocomplete]=\"config().autoComplete\"\n [autocapitalize]=\"config().autoCapitalize\">\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().info) {<crispr-info matSuffix [info]=\"config().info\"></crispr-info>}\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n\n\n</crispr-field-container>", styles: ["crispr-info[matSuffix]{margin-right:.75em}\n"] }]
|
|
37
|
-
}], ctorParameters: () => [] });
|
|
38
|
-
|
|
39
|
-
export { InputFieldComponent };
|
|
40
|
-
//# sourceMappingURL=tft-crispr-forms-index-UX-Wdyk1.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-UX-Wdyk1.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/input-field/input-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/input-field/input-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport { InputFieldConfig } from '../../utils';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CrisprControlComponent } from '../../utils/abstracts/crispr-control.abstract';\n\n@Component({\n selector: 'crispr-input-field',\n templateUrl: './input-field.component.html',\n styleUrls: ['./input-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n InfoComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatFormFieldModule,\n MatInputModule,\n FormValidationHandlerModule,\n MatIconModule\n ]\n})\nexport class InputFieldComponent extends CrisprControlComponent<InputFieldConfig> implements OnInit {\n\n defaultConfig: Partial<InputFieldConfig> = {inputType: 'text'};\n constructor() {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n <mat-label>\n {{config().label}}\n </mat-label>\n <input [type]=\"config().inputType\" matInput [placeholder]=\"config().placeholder\"\n [formControlName]=\"config().controlName\" [min]=\"config().min\" [max]=\"config().max\"\n [maxlength]=\"config().maxLength\" [step]=\"config().step\" [autofocus]=\"config().autofocus\"\n [pattern]=\"config().pattern\" [spellcheck]=\"config().spellcheck\" [autocomplete]=\"config().autoComplete\"\n [autocapitalize]=\"config().autoCapitalize\">\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().info) {<crispr-info matSuffix [info]=\"config().info\"></crispr-info>}\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n\n\n</crispr-field-container>"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AA4BM,MAAO,mBAAoB,SAAQ,sBAAwC,CAAA;AAG/E,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAFT,QAAA,IAAA,CAAA,aAAa,GAA8B,EAAC,SAAS,EAAE,MAAM,EAAC;IAG9D;IAEA,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE;IAClB;8GATW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5BhC,0iCAkByB,EAAA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,EAAA,CAAA;kBAf/B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,eAAA,EAGb,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,aAAa;wBACb,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,cAAc;wBACd,2BAA2B;wBAC3B;AACD,qBAAA,EAAA,QAAA,EAAA,0iCAAA,EAAA,MAAA,EAAA,CAAA,8CAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/material/datepicker';
|
|
4
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
5
|
-
import { MatDateFnsModule } from '@angular/material-date-fns-adapter';
|
|
6
|
-
import { of } from 'rxjs';
|
|
7
|
-
import * as i5 from '@angular/cdk/portal';
|
|
8
|
-
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
9
|
-
import * as i2 from '@angular/material/form-field';
|
|
10
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
11
|
-
import * as i1$2 from '@angular/common';
|
|
12
|
-
import { CommonModule } from '@angular/common';
|
|
13
|
-
import * as i1$1 from '@angular/forms';
|
|
14
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
15
|
-
import * as i3 from '@angular/material/input';
|
|
16
|
-
import { MatInputModule } from '@angular/material/input';
|
|
17
|
-
import * as i6 from '@tft/form-validation-handler';
|
|
18
|
-
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
19
|
-
import { a as CrisprControlComponent, F as FieldContainerComponent } from './tft-crispr-forms-tft-crispr-forms-8liD7eof.mjs';
|
|
20
|
-
|
|
21
|
-
/* eslint-disable @nx/enforce-module-boundaries */
|
|
22
|
-
const defaultConfig = {
|
|
23
|
-
startView: 'month',
|
|
24
|
-
};
|
|
25
|
-
class DatepickerFieldComponent extends CrisprControlComponent {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
this.defaultConfig = defaultConfig;
|
|
29
|
-
}
|
|
30
|
-
ngOnInit() {
|
|
31
|
-
super.ngOnInit();
|
|
32
|
-
const config = this.config();
|
|
33
|
-
this.startAt$ =
|
|
34
|
-
config.startAt instanceof Date
|
|
35
|
-
? of(config.startAt)
|
|
36
|
-
: config.startAt instanceof Function
|
|
37
|
-
? config.startAt(this.group())
|
|
38
|
-
: of(null);
|
|
39
|
-
this.dateClass = config?.cellClassFunction || null;
|
|
40
|
-
this.dateClass$ = config.dateClass
|
|
41
|
-
? config?.dateClass(this.group())
|
|
42
|
-
: of(() => '');
|
|
43
|
-
}
|
|
44
|
-
ngAfterContentInit() {
|
|
45
|
-
if (this.config().datepickerActions) {
|
|
46
|
-
this.calendarFooterPortal = new ComponentPortal(this.config().datepickerActions);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DatepickerFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: DatepickerFieldComponent, isStandalone: true, selector: "crispr-datepicker-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n <mat-form-field\n [attr.data-testid]=\"testId()\"\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <input\n matInput\n [formControlName]=\"config().controlName\"\n [min]=\"config().min\"\n [max]=\"config().max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config().datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config().touchUi\"\n [startView]=\"config().startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n @if (calendarFooterPortal) {\n <mat-datepicker-actions>\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n }\n </mat-datepicker>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i1.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatDateFnsModule }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DatepickerFieldComponent, decorators: [{
|
|
53
|
-
type: Component,
|
|
54
|
-
args: [{ selector: 'crispr-datepicker-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
55
|
-
CommonModule,
|
|
56
|
-
FieldContainerComponent,
|
|
57
|
-
MatDatepickerModule,
|
|
58
|
-
MatFormFieldModule,
|
|
59
|
-
ReactiveFormsModule,
|
|
60
|
-
MatInputModule,
|
|
61
|
-
MatDateFnsModule,
|
|
62
|
-
PortalModule,
|
|
63
|
-
FormValidationHandlerModule,
|
|
64
|
-
], standalone: true, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n <mat-form-field\n [attr.data-testid]=\"testId()\"\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <input\n matInput\n [formControlName]=\"config().controlName\"\n [min]=\"config().min\"\n [max]=\"config().max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config().datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config().touchUi\"\n [startView]=\"config().startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n @if (calendarFooterPortal) {\n <mat-datepicker-actions>\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n }\n </mat-datepicker>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>\n\n" }]
|
|
65
|
-
}] });
|
|
66
|
-
|
|
67
|
-
export { DatepickerFieldComponent };
|
|
68
|
-
//# sourceMappingURL=tft-crispr-forms-index-bTdYHJPk.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-bTdYHJPk.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/datepicker-field/datepicker-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/datepicker-field/datepicker-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n AfterContentInit,\n} from '@angular/core';\nimport {\n MatCalendarCellClassFunction,\n MatDatepickerModule,\n} from '@angular/material/datepicker';\nimport { MatDateFnsModule } from '@angular/material-date-fns-adapter';\nimport { Observable, of } from 'rxjs';\nimport { ComponentPortal, Portal, PortalModule } from '@angular/cdk/portal';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n DatepickerFieldConfig,\n} from '../../utils';\nimport { CrisprControlComponent } from '../../utils/abstracts/crispr-control.abstract';\n\nconst defaultConfig: Partial<DatepickerFieldConfig> = {\n startView: 'month',\n};\n\n@Component({\n selector: 'crispr-datepicker-field',\n templateUrl: './datepicker-field.component.html',\n styleUrls: ['./datepicker-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FieldContainerComponent,\n MatDatepickerModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n MatInputModule,\n MatDateFnsModule,\n PortalModule,\n FormValidationHandlerModule,\n ],\n standalone: true\n})\nexport class DatepickerFieldComponent\n extends CrisprControlComponent<DatepickerFieldConfig>\n implements OnInit, AfterContentInit\n{\n defaultConfig = defaultConfig;\n\n dateClass: MatCalendarCellClassFunction<Date>;\n dateClass$: Observable<MatCalendarCellClassFunction<Date>>;\n startAt$: Observable<Date>;\n\n /** A portal containing the footer component type for this calendar. */\n calendarFooterPortal: Portal<any>;\n\n ngOnInit() {\n super.ngOnInit();\n const config = this.config();\n this.startAt$ =\n config.startAt instanceof Date\n ? of(config.startAt)\n : config.startAt instanceof Function\n ? config.startAt(this.group())\n : of(null);\n this.dateClass = config?.cellClassFunction || null;\n this.dateClass$ = config.dateClass\n ? config?.dateClass(this.group())\n : of(() => '');\n }\n\n ngAfterContentInit() {\n if (this.config().datepickerActions) {\n this.calendarFooterPortal = new ComponentPortal(\n this.config().datepickerActions\n );\n }\n }\n\n // handleSelectedChange(event, picker: MatDatepicker<unknown>) {\n // console.log({event, picker})\n // if(this.config.selectedChange) {\n // this.config.selectedChange(event, picker);\n // }\n // }\n}\n","<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n <mat-form-field\n [attr.data-testid]=\"testId()\"\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <input\n matInput\n [formControlName]=\"config().controlName\"\n [min]=\"config().min\"\n [max]=\"config().max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config().datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config().touchUi\"\n [startView]=\"config().startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n @if (calendarFooterPortal) {\n <mat-datepicker-actions>\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n }\n </mat-datepicker>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>\n\n"],"names":["i4","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAyBA,MAAM,aAAa,GAAmC;AACpD,IAAA,SAAS,EAAE,OAAO;CACnB;AAoBK,MAAO,wBACX,SAAQ,sBAA6C,CAAA;AAnBvD,IAAA,WAAA,GAAA;;QAsBE,IAAA,CAAA,aAAa,GAAG,aAAa;AAsC9B,IAAA;IA7BC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE;AAChB,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;AAC5B,QAAA,IAAI,CAAC,QAAQ;YACX,MAAM,CAAC,OAAO,YAAY;AACxB,kBAAE,EAAE,CAAC,MAAM,CAAC,OAAO;AACnB,k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'@angular/core';
|
|
3
|
-
import * as i1$2 from '@angular/forms';
|
|
4
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { map, startWith } from 'rxjs/operators';
|
|
6
|
-
import * as i1 from '@angular/common';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
8
|
-
import * as i1$1 from '@angular/material/button';
|
|
9
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
10
|
-
import * as i2 from '@angular/material/icon';
|
|
11
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
-
import * as i2$1 from '@angular/material/tooltip';
|
|
13
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
14
|
-
import * as i6 from '@tft/form-validation-handler';
|
|
15
|
-
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
16
|
-
import { C as CrisprFieldComponent } from './tft-crispr-forms-tft-crispr-forms-8liD7eof.mjs';
|
|
17
|
-
|
|
18
|
-
class ButtonComponent extends CrisprFieldComponent {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.defaultConfig = {
|
|
22
|
-
buttonType: 'raised',
|
|
23
|
-
type: 'submit',
|
|
24
|
-
};
|
|
25
|
-
this.group = input(null, ...(ngDevMode ? [{ debugName: "group" }] : []));
|
|
26
|
-
}
|
|
27
|
-
get matButtonClass() {
|
|
28
|
-
return this.config().buttonType ? `mat-${this.config().buttonType}-button` : '';
|
|
29
|
-
}
|
|
30
|
-
ngOnInit() {
|
|
31
|
-
this.formValid$ = this.group().statusChanges.pipe(map((status) => status === 'VALID'), startWith(this.group().valid));
|
|
32
|
-
}
|
|
33
|
-
handleClick(group, event) {
|
|
34
|
-
if (this.config().callback) {
|
|
35
|
-
this.config().callback(group, event);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: ButtonComponent, isStandalone: true, selector: "crispr-button", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<button\n [attr.data-testid]=\"testId()\"\n [formGroup]=\"group()\"\n mat-button\n [ngClass]=\"matButtonClass\"\n [color]=\"config().color\"\n [disabled]=\"config().disabledOnInvalidForm && !(formValid$ | async)\"\n [type]=\"config().type\"\n (click)=\"handleClick(group(), $event)\"\n [matTooltip]=\"config().info?.content\"\n [matTooltipPosition]=\"config().info?.tooltipPosition || 'below'\">\n {{ config().label }}\n @if (config().icon) {<mat-icon>{{ config().icon}}</mat-icon>}\n</button>\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
40
|
-
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
42
|
-
type: Component,
|
|
43
|
-
args: [{ selector: 'crispr-button', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
44
|
-
CommonModule,
|
|
45
|
-
MatButtonModule,
|
|
46
|
-
MatIconModule,
|
|
47
|
-
MatTooltipModule,
|
|
48
|
-
ReactiveFormsModule,
|
|
49
|
-
FormValidationHandlerModule,
|
|
50
|
-
], standalone: true, template: "<button\n [attr.data-testid]=\"testId()\"\n [formGroup]=\"group()\"\n mat-button\n [ngClass]=\"matButtonClass\"\n [color]=\"config().color\"\n [disabled]=\"config().disabledOnInvalidForm && !(formValid$ | async)\"\n [type]=\"config().type\"\n (click)=\"handleClick(group(), $event)\"\n [matTooltip]=\"config().info?.content\"\n [matTooltipPosition]=\"config().info?.tooltipPosition || 'below'\">\n {{ config().label }}\n @if (config().icon) {<mat-icon>{{ config().icon}}</mat-icon>}\n</button>\n\n" }]
|
|
51
|
-
}], propDecorators: { group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }] } });
|
|
52
|
-
|
|
53
|
-
export { ButtonComponent };
|
|
54
|
-
//# sourceMappingURL=tft-crispr-forms-index-kah2HT_N.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-kah2HT_N.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/button/button.component.ts","../../../../libs/crispr-forms/src/lib/ui/button/button.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, OnInit } from '@angular/core';\nimport { ReactiveFormsModule, FormGroup } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\n// eslint-disable-next-line @nx/enforce-module-boundaries\nimport { CrisprFieldComponent, ButtonConfig } from '../../utils';\n\n@Component({\n selector: 'crispr-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n MatButtonModule,\n MatIconModule,\n MatTooltipModule,\n ReactiveFormsModule,\n FormValidationHandlerModule,\n ],\n standalone: true\n})\nexport class ButtonComponent\n extends CrisprFieldComponent<ButtonConfig>\n implements OnInit\n{\n defaultConfig: Partial<ButtonConfig> = {\n buttonType: 'raised',\n type: 'submit',\n };\n formValid$: Observable<boolean>;\n\n group = input<FormGroup>(null);\n\n get matButtonClass() {\n return this.config().buttonType ? `mat-${this.config().buttonType}-button` : '';\n }\n\n ngOnInit() {\n this.formValid$ = this.group().statusChanges.pipe(\n map((status) => status === 'VALID'),\n startWith(this.group().valid)\n );\n }\n\n handleClick(group: FormGroup, event: MouseEvent) {\n if (this.config().callback) {\n this.config().callback(group, event);\n }\n }\n}\n","<button\n [attr.data-testid]=\"testId()\"\n [formGroup]=\"group()\"\n mat-button\n [ngClass]=\"matButtonClass\"\n [color]=\"config().color\"\n [disabled]=\"config().disabledOnInvalidForm && !(formValid$ | async)\"\n [type]=\"config().type\"\n (click)=\"handleClick(group(), $event)\"\n [matTooltip]=\"config().info?.content\"\n [matTooltipPosition]=\"config().info?.tooltipPosition || 'below'\">\n {{ config().label }}\n @if (config().icon) {<mat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