@tft/crispr-forms 18.0.0 → 18.0.2
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/esm2022/src/lib/public_api.mjs +2 -1
- package/esm2022/src/lib/ui/public-api.mjs +2 -1
- package/fesm2022/{tft-crispr-forms-index-DLa8K3lm.mjs → tft-crispr-forms-index-3_zzaLSn.mjs} +3 -2
- package/fesm2022/tft-crispr-forms-index-3_zzaLSn.mjs.map +1 -0
- package/fesm2022/{tft-crispr-forms-index-CYzZB0sA.mjs → tft-crispr-forms-index-BHUGuVwS.mjs} +3 -2
- package/fesm2022/{tft-crispr-forms-index-CYzZB0sA.mjs.map → tft-crispr-forms-index-BHUGuVwS.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-DYHyL8s6.mjs → tft-crispr-forms-index-CAFXSHea.mjs} +3 -2
- package/fesm2022/tft-crispr-forms-index-CAFXSHea.mjs.map +1 -0
- package/fesm2022/{tft-crispr-forms-index-o78Cm3Kf.mjs → tft-crispr-forms-index-CN1GmYGC.mjs} +2 -2
- package/fesm2022/{tft-crispr-forms-index-o78Cm3Kf.mjs.map → tft-crispr-forms-index-CN1GmYGC.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-BwC11k3P.mjs → tft-crispr-forms-index-CvnyvJJ_.mjs} +2 -2
- package/fesm2022/{tft-crispr-forms-index-BwC11k3P.mjs.map → tft-crispr-forms-index-CvnyvJJ_.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-DhIYxOdD.mjs → tft-crispr-forms-index-DKwMd-o-.mjs} +2 -2
- package/fesm2022/{tft-crispr-forms-index-DhIYxOdD.mjs.map → tft-crispr-forms-index-DKwMd-o-.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-BVwoi2lw.mjs → tft-crispr-forms-index-De3tRDbo.mjs} +2 -2
- package/fesm2022/{tft-crispr-forms-index-BVwoi2lw.mjs.map → tft-crispr-forms-index-De3tRDbo.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-D8oUGVGX.mjs → tft-crispr-forms-index-DiNlBPaX.mjs} +3 -2
- package/fesm2022/{tft-crispr-forms-index-D8oUGVGX.mjs.map → tft-crispr-forms-index-DiNlBPaX.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-C_YTy6il.mjs → tft-crispr-forms-index-DkkAr7Yr.mjs} +2 -2
- package/fesm2022/{tft-crispr-forms-index-C_YTy6il.mjs.map → tft-crispr-forms-index-DkkAr7Yr.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-Bbcv75sh.mjs → tft-crispr-forms-index-DseuVavm.mjs} +3 -2
- package/fesm2022/tft-crispr-forms-index-DseuVavm.mjs.map +1 -0
- package/fesm2022/{tft-crispr-forms-index-CN4M4eEo.mjs → tft-crispr-forms-index-T4Ook6pV.mjs} +3 -2
- package/fesm2022/tft-crispr-forms-index-T4Ook6pV.mjs.map +1 -0
- package/fesm2022/{tft-crispr-forms-index-BDJfgpKH.mjs → tft-crispr-forms-index-cdo59qhx.mjs} +2 -2
- package/fesm2022/{tft-crispr-forms-index-BDJfgpKH.mjs.map → tft-crispr-forms-index-cdo59qhx.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-DNTOjcVZ.mjs → tft-crispr-forms-index-kJUZksiq.mjs} +2 -2
- package/fesm2022/{tft-crispr-forms-index-DNTOjcVZ.mjs.map → tft-crispr-forms-index-kJUZksiq.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-Cpu5cwLo.mjs → tft-crispr-forms-index-xbMIxY3P.mjs} +3 -2
- package/fesm2022/{tft-crispr-forms-index-Cpu5cwLo.mjs.map → tft-crispr-forms-index-xbMIxY3P.mjs.map} +1 -1
- package/fesm2022/tft-crispr-forms.mjs +133 -39
- package/fesm2022/tft-crispr-forms.mjs.map +1 -1
- package/package.json +7 -7
- package/src/lib/public_api.d.ts +1 -0
- package/src/lib/ui/public-api.d.ts +1 -0
- package/tft-crispr-forms-18.0.2.tgz +0 -0
- package/fesm2022/tft-crispr-forms-index-Bbcv75sh.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BdOC-6h3.mjs +0 -110
- package/fesm2022/tft-crispr-forms-index-BdOC-6h3.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CN4M4eEo.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DLa8K3lm.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DYHyL8s6.mjs.map +0 -1
- package/tft-crispr-forms-18.0.0.tgz +0 -0
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import * as i1 from '@angular/common';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ChangeDetectionStrategy, Optional, Self, ViewChild } from '@angular/core';
|
|
5
|
-
import * as i2 from '@angular/forms';
|
|
6
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import * as i2$1 from '@angular/material/button';
|
|
8
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
9
|
-
import * as i3$1 from '@angular/material/form-field';
|
|
10
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
11
|
-
import * as i3 from '@angular/material/icon';
|
|
12
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import * as i5 from '@angular/material/input';
|
|
14
|
-
import { MatInputModule } from '@angular/material/input';
|
|
15
|
-
import { of } from 'rxjs';
|
|
16
|
-
import { crisprControlMixin, CrisprFieldComponent, FieldContainerComponent, SelectedFileComponent, FileDropzoneDirective } from './tft-crispr-forms.mjs';
|
|
17
|
-
import * as i7 from '@tft/form-validation-handler';
|
|
18
|
-
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
19
|
-
import 'rxjs/operators';
|
|
20
|
-
import '@angular/material/progress-bar';
|
|
21
|
-
import '@angular/material/tooltip';
|
|
22
|
-
|
|
23
|
-
/* eslint-disable @nx/enforce-module-boundaries */
|
|
24
|
-
const FileUploadFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
25
|
-
class FileUploadFieldComponent extends FileUploadFieldMixin {
|
|
26
|
-
// ngControl: NgControl = null;
|
|
27
|
-
constructor(ngControl) {
|
|
28
|
-
super();
|
|
29
|
-
this.ngControl = ngControl;
|
|
30
|
-
this.defaultConfig = {
|
|
31
|
-
allowMultipleFiles: false,
|
|
32
|
-
acceptedTypes: '*.*',
|
|
33
|
-
dropZoneText: 'DROP FILE HERE',
|
|
34
|
-
selectFilesButtonType: 'button',
|
|
35
|
-
selectButtonText: 'SELECT',
|
|
36
|
-
showClearFilesButton: true,
|
|
37
|
-
clearFilesButtonText: 'CLEAR',
|
|
38
|
-
uploadButtonText: 'UPLOAD',
|
|
39
|
-
uploadButtonType: 'button',
|
|
40
|
-
showUploadProgress: false,
|
|
41
|
-
disableOnUpload: true,
|
|
42
|
-
};
|
|
43
|
-
this.isUploaded = false;
|
|
44
|
-
this.fileProgress = [];
|
|
45
|
-
if (this.ngControl != null) {
|
|
46
|
-
// Setting the value accessor directly (instead of using
|
|
47
|
-
// the providers) to avoid running into a circular import.
|
|
48
|
-
ngControl.valueAccessor = this;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
ngOnInit() {
|
|
52
|
-
super.ngOnInit();
|
|
53
|
-
this.disabled$ = this.config.disabledCallback
|
|
54
|
-
? this.config.disabledCallback(this.group)
|
|
55
|
-
: of(false);
|
|
56
|
-
}
|
|
57
|
-
filesChanged(files) {
|
|
58
|
-
if (files && files.length > 0) {
|
|
59
|
-
this.selectedFiles = files;
|
|
60
|
-
this.control.patchValue(files);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
uploadFiles() {
|
|
64
|
-
if (this.selectedFiles && this.config.uploadFiles) {
|
|
65
|
-
this.isUploaded = true;
|
|
66
|
-
this.config.uploadFiles(this.group, this.selectedFiles, this);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
resetFileInput() {
|
|
70
|
-
this.fileInputRef.nativeElement.value = '';
|
|
71
|
-
this.control.patchValue(null);
|
|
72
|
-
this.isUploaded = false;
|
|
73
|
-
}
|
|
74
|
-
writeValue(value) {
|
|
75
|
-
// clear file input
|
|
76
|
-
// this.host.nativeElement.value = '';
|
|
77
|
-
// this.file = null;
|
|
78
|
-
}
|
|
79
|
-
registerOnChange(fn) {
|
|
80
|
-
this.onChange = fn;
|
|
81
|
-
}
|
|
82
|
-
registerOnTouched(fn) { }
|
|
83
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FileUploadFieldComponent, deps: [{ token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: FileUploadFieldComponent, isStandalone: true, selector: "crispr-file-upload-field", viewQueries: [{ propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n <div *ngIf=\"!(selectedFiles?.length > 0); else selectedFileList\" class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config.disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n {{config.selectButtonText}}\n </button>\n </div>\n <ng-template #selectedFileList>\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n <crispr-selected-file\n *ngFor=\"let file of selectedFiles; let i = index;\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config.showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n </div>\n\n </div>\n </ng-template>\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n </mat-form-field>\n <div class=\"button-container\" *ngIf=\"selectedFiles?.length > 0\">\n\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config.clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n\n <button\n *ngIf=\"!!config.uploadFiles\"\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config.uploadButtonText\">\n {{ config.uploadButtonText }}\n </button>\n\n </div>\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0;display:flex;justify-content:center}:host .drop-info{display:flex;flex-direction:column;align-items:center}:host .drop-info .drop-icon{font-size:36px}:host .drop-info .mat-h2{margin:0}:host .button-container{display:flex;justify-content:flex-end;margin-top:-16px}:host .button-container button{margin-left:8px}:host .selected-files-container{width:100%}:host [matInput]{position:absolute;max-height:0;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatInputModule }, { 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: SelectedFileComponent, selector: "crispr-selected-file", inputs: ["fileName", "progress", "showProgress", "color"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "directive", type: FileDropzoneDirective, selector: "[crisprFileDropzone]", inputs: ["crisprFileDropzone"], outputs: ["fileDrop"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
85
|
-
}
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FileUploadFieldComponent, decorators: [{
|
|
87
|
-
type: Component,
|
|
88
|
-
args: [{ selector: 'crispr-file-upload-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
89
|
-
CommonModule,
|
|
90
|
-
FieldContainerComponent,
|
|
91
|
-
ReactiveFormsModule,
|
|
92
|
-
MatIconModule,
|
|
93
|
-
MatButtonModule,
|
|
94
|
-
MatFormFieldModule,
|
|
95
|
-
MatInputModule,
|
|
96
|
-
SelectedFileComponent,
|
|
97
|
-
FormValidationHandlerModule,
|
|
98
|
-
FileDropzoneDirective,
|
|
99
|
-
], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n <div *ngIf=\"!(selectedFiles?.length > 0); else selectedFileList\" class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config.disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n {{config.selectButtonText}}\n </button>\n </div>\n <ng-template #selectedFileList>\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n <crispr-selected-file\n *ngFor=\"let file of selectedFiles; let i = index;\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config.showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n </div>\n\n </div>\n </ng-template>\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n </mat-form-field>\n <div class=\"button-container\" *ngIf=\"selectedFiles?.length > 0\">\n\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config.clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n\n <button\n *ngIf=\"!!config.uploadFiles\"\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config.uploadButtonText\">\n {{ config.uploadButtonText }}\n </button>\n\n </div>\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0;display:flex;justify-content:center}:host .drop-info{display:flex;flex-direction:column;align-items:center}:host .drop-info .drop-icon{font-size:36px}:host .drop-info .mat-h2{margin:0}:host .button-container{display:flex;justify-content:flex-end;margin-top:-16px}:host .button-container button{margin-left:8px}:host .selected-files-container{width:100%}:host [matInput]{position:absolute;max-height:0;visibility:hidden}\n"] }]
|
|
100
|
-
}], ctorParameters: () => [{ type: i2.NgControl, decorators: [{
|
|
101
|
-
type: Optional
|
|
102
|
-
}, {
|
|
103
|
-
type: Self
|
|
104
|
-
}] }], propDecorators: { fileInputRef: [{
|
|
105
|
-
type: ViewChild,
|
|
106
|
-
args: ['fileInput']
|
|
107
|
-
}] } });
|
|
108
|
-
|
|
109
|
-
export { FileUploadFieldComponent };
|
|
110
|
-
//# sourceMappingURL=tft-crispr-forms-index-BdOC-6h3.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-BdOC-6h3.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/file-upload-field/file-upload-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/file-upload-field/file-upload-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n ViewChild,\n OnInit,\n ChangeDetectionStrategy,\n Optional,\n Self,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NgControl,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { Observable, of } from 'rxjs';\nimport { FileDropzoneDirective } from '../file-dropzone';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\n\nimport {\n crisprControlMixin,\n CrisprFieldComponent,\n FileUploadFieldConfig,\n} from '../../utils';\nimport { FieldContainerComponent } from '../field-container';\nimport { SelectedFileComponent } from '../selected-file';\n\nconst FileUploadFieldMixin =\n crisprControlMixin<FileUploadFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-file-upload-field',\n templateUrl: './file-upload-field.component.html',\n styleUrls: ['./file-upload-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n FieldContainerComponent,\n ReactiveFormsModule,\n MatIconModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n SelectedFileComponent,\n FormValidationHandlerModule,\n FileDropzoneDirective,\n ],\n})\nexport class FileUploadFieldComponent\n extends FileUploadFieldMixin\n implements OnInit, ControlValueAccessor\n{\n onChange: () => void;\n\n defaultConfig: Partial<FileUploadFieldConfig> = {\n allowMultipleFiles: false,\n acceptedTypes: '*.*',\n dropZoneText: 'DROP FILE HERE',\n selectFilesButtonType: 'button',\n selectButtonText: 'SELECT',\n showClearFilesButton: true,\n clearFilesButtonText: 'CLEAR',\n uploadButtonText: 'UPLOAD',\n uploadButtonType: 'button',\n showUploadProgress: false,\n disableOnUpload: true,\n };\n\n @ViewChild('fileInput') fileInputRef: ElementRef;\n\n selectedFiles: FileList;\n\n isUploaded = false;\n\n fileProgress: Observable<number>[] = [];\n disabled$: Observable<boolean>;\n\n // ngControl: NgControl = null;\n constructor(@Optional() @Self() public ngControl: NgControl) {\n super();\n if (this.ngControl != null) {\n // Setting the value accessor directly (instead of using\n // the providers) to avoid running into a circular import.\n ngControl.valueAccessor = this;\n }\n }\n\n ngOnInit() {\n super.ngOnInit();\n this.disabled$ = this.config.disabledCallback\n ? this.config.disabledCallback(this.group)\n : of(false);\n }\n\n filesChanged(files: FileList): void {\n if (files && files.length > 0) {\n this.selectedFiles = files;\n this.control.patchValue(files);\n }\n }\n\n uploadFiles() {\n if (this.selectedFiles && this.config.uploadFiles) {\n this.isUploaded = true;\n this.config.uploadFiles(this.group, this.selectedFiles, this);\n }\n }\n\n resetFileInput(): void {\n this.fileInputRef.nativeElement.value = '';\n this.control.patchValue(null);\n this.isUploaded = false;\n }\n\n writeValue(value: null) {\n // clear file input\n // this.host.nativeElement.value = '';\n // this.file = null;\n }\n\n registerOnChange(fn: () => void) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void) {}\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n <div *ngIf=\"!(selectedFiles?.length > 0); else selectedFileList\" class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config.disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n {{config.selectButtonText}}\n </button>\n </div>\n <ng-template #selectedFileList>\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n <crispr-selected-file\n *ngFor=\"let file of selectedFiles; let i = index;\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config.showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n </div>\n\n </div>\n </ng-template>\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n </mat-form-field>\n <div class=\"button-container\" *ngIf=\"selectedFiles?.length > 0\">\n\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config.clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n\n <button\n *ngIf=\"!!config.uploadFiles\"\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config.uploadButtonText\">\n {{ config.uploadButtonText }}\n </button>\n\n </div>\n</crispr-field-container>\n"],"names":["i1","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAgCA,MAAM,oBAAoB,GACxB,kBAAkB,CAAwB,oBAAoB,CAAC,CAAC;AAqB5D,MAAO,wBACX,SAAQ,oBAAoB,CAAA;;AA6B5B,IAAA,WAAA,CAAuC,SAAoB,EAAA;AACzD,QAAA,KAAK,EAAE,CAAC;QAD6B,IAAS,CAAA,SAAA,GAAT,SAAS,CAAW;AAxB3D,QAAA,IAAA,CAAA,aAAa,GAAmC;AAC9C,YAAA,kBAAkB,EAAE,KAAK;AACzB,YAAA,aAAa,EAAE,KAAK;AACpB,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,qBAAqB,EAAE,QAAQ;AAC/B,YAAA,gBAAgB,EAAE,QAAQ;AAC1B,YAAA,oBAAoB,EAAE,IAAI;AAC1B,YAAA,oBAAoB,EAAE,OAAO;AAC7B,YAAA,gBAAgB,EAAE,QAAQ;AAC1B,YAAA,gBAAgB,EAAE,QAAQ;AAC1B,YAAA,kBAAkB,EAAE,KAAK;AACzB,YAAA,eAAe,EAAE,IAAI;SACtB,CAAC;QAMF,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;QAEnB,IAAY,CAAA,YAAA,GAAyB,EAAE,CAAC;AAMtC,QAAA,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;;;AAG1B,YAAA,SAAS,CAAC,aAAa,GAAG,IAAI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A,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAC3B,qBAAqB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAGZ,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAnBpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,mBAGnB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,uBAAuB;wBACvB,mBAAmB;wBACnB,aAAa;wBACb,eAAe;wBACf,kBAAkB;wBAClB,cAAc;wBACd,qBAAqB;wBACrB,2BAA2B;wBAC3B,qBAAqB;AACtB,qBAAA,EAAA,QAAA,EAAA,4rFAAA,EAAA,MAAA,EAAA,CAAA,mfAAA,CAAA,EAAA,CAAA;;0BAgCY,QAAQ;;0BAAI,IAAI;yCAVL,YAAY,EAAA,CAAA;sBAAnC,SAAS;uBAAC,WAAW,CAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-CN4M4eEo.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/checkbox-field/checkbox-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/checkbox-field/checkbox-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n crisprControlMixin,\n CrisprFieldComponent,\n CheckboxFieldConfig,\n} from '../../utils';\nimport { InfoComponent } from '../info';\n\nconst defaultConfig: Partial<CheckboxFieldConfig> = {\n labelPosition: 'after',\n inline: false,\n};\nconst CheckboxFieldMixin =\n crisprControlMixin<CheckboxFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-checkbox-field',\n templateUrl: './checkbox-field.component.html',\n styleUrls: ['./checkbox-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n MatCheckboxModule,\n ReactiveFormsModule,\n FieldContainerComponent,\n FormValidationHandlerModule,\n ],\n})\nexport class CheckboxFieldComponent\n extends CheckboxFieldMixin\n implements OnInit\n{\n defaultConfig = defaultConfig;\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [inlineField]=\"config.inline\">\n <div\n [formGroup]=\"group\">\n <mat-checkbox\n [color]=\"config.color\"\n [labelPosition]=\"config.labelPosition\"\n [formControlName]=\"config.controlName\">\n {{config.label}}\n <crispr-info\n matSuffix *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n </mat-checkbox>\n </div>\n</crispr-field-container>\n"],"names":["i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAcA,MAAM,aAAa,GAAiC;AAClD,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,MAAM,EAAE,KAAK;CACd,CAAC;AACF,MAAM,kBAAkB,GACtB,kBAAkB,CAAsB,oBAAoB,CAAC,CAAC;AAiB1D,MAAO,sBACX,SAAQ,kBAAkB,CAAA;AAhB5B,IAAA,WAAA,GAAA;;QAmBE,IAAa,CAAA,aAAA,GAAG,aAAa,CAAC;AAI/B,KAAA;IAHC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CA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Z,aAAa;wBACb,iBAAiB;wBACjB,mBAAmB;wBACnB,uBAAuB;wBACvB,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,yeAAA,EAAA,MAAA,EAAA,CAAA,6BAAA,CAAA,EAAA,CAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-DLa8K3lm.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/divider/divider.component.ts","../../../../libs/crispr-forms/src/lib/ui/divider/divider.component.html"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { CommonModule } from '@angular/common';\n// eslint-disable-next-line @nx/enforce-module-boundaries\nimport { CrisprFieldComponent, DividerConfig } from '../../utils';\n\n@Component({\n selector: 'crispr-divider',\n templateUrl: './divider.component.html',\n styleUrls: ['./divider.component.scss'],\n standalone: true,\n imports: [CommonModule, MatDividerModule],\n})\nexport class DividerComponent\n extends CrisprFieldComponent<DividerConfig>\n implements OnInit\n{\n // TODO: pull in type after configs are better organized\n defaultConfig = {};\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<mat-divider [ngClass]=\"config.classes\"></mat-divider>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAaM,MAAO,gBACX,SAAQ,oBAAmC,CAAA;AAR7C,IAAA,WAAA,GAAA;;;QAYE,IAAa,CAAA,aAAA,GAAG,EAAE,CAAC;AAIpB,KAAA;IAHC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;8GARU,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,ECb7B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,0DAAsD,EDW1C,MAAA,EAAA,CAAA,sGAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,4HAAE,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAE7B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,cAGd,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,0DAAA,EAAA,MAAA,EAAA,CAAA,sGAAA,CAAA,EAAA,CAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-DYHyL8s6.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/button/button.component.ts","../../../../libs/crispr-forms/src/lib/ui/button/button.component.html"],"sourcesContent":["import { Component, OnInit, ChangeDetectionStrategy } 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 standalone: true,\n imports: [\n CommonModule,\n MatButtonModule,\n MatIconModule,\n MatTooltipModule,\n ReactiveFormsModule,\n FormValidationHandlerModule,\n ],\n})\nexport class ButtonComponent\n extends CrisprFieldComponent<ButtonConfig>\n implements OnInit\n{\n group: FormGroup;\n defaultConfig: Partial<ButtonConfig> = {\n buttonType: 'raised',\n type: 'submit',\n };\n formValid$: Observable<boolean>;\n\n get matButtonClass() {\n return this.config.buttonType ? `mat-${this.config.buttonType}-button` : '';\n }\n\n ngOnInit() {\n super.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 [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 <mat-icon *ngIf=\"config.icon\">\n {{ config.icon}}\n </mat-icon>\n</button>\n\n"],"names":["i4","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2BM,MAAO,eACX,SAAQ,oBAAkC,CAAA;AAhB5C,IAAA,WAAA,GAAA;;AAoBE,QAAA,IAAA,CAAA,aAAa,GAA0B;AACrC,YAAA,UAAU,EAAE,QAAQ;AACpB,YAAA,IAAI,EAAE,QAAQ;SACf,CAAC;AAoBH,KAAA;AAjBC,IAAA,IAAI,cAAc,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,CAAA,IAAA,EAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAA,OAAA,CAAS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