@ngx-mce/file-input 21.3.1 → 21.3.2-next.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.
|
@@ -20,10 +20,10 @@ class NgxMatInputMixinBase {
|
|
|
20
20
|
_defaultErrorStateMatcher = null;
|
|
21
21
|
}
|
|
22
22
|
class NgxMatFileInputIcon {
|
|
23
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
24
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxMatFileInputIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgxMatFileInputIcon, isStandalone: true, selector: "[ngxMatFileInputIcon]", ngImport: i0 });
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxMatFileInputIcon, decorators: [{
|
|
27
27
|
type: Directive,
|
|
28
28
|
args: [{
|
|
29
29
|
selector: '[ngxMatFileInputIcon]',
|
|
@@ -226,15 +226,15 @@ class NgxMatFileInputComponent extends NgxMatInputMixinBase {
|
|
|
226
226
|
}
|
|
227
227
|
this._inputValueRef().nativeElement.value = text;
|
|
228
228
|
}
|
|
229
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
230
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
229
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxMatFileInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
230
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.14", type: NgxMatFileInputComponent, isStandalone: true, selector: "ngx-mat-file-input", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: false, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngx-mat-file-input" }, providers: [
|
|
231
231
|
{
|
|
232
232
|
provide: MatFormFieldControl,
|
|
233
233
|
useExisting: forwardRef(() => NgxMatFileInputComponent),
|
|
234
234
|
},
|
|
235
235
|
], viewQueries: [{ propertyName: "_inputFileRef", first: true, predicate: ["inputFile"], descendants: true, isSignal: true }, { propertyName: "_inputValueRef", first: true, predicate: ["inputValue"], descendants: true, isSignal: true }], exportAs: ["ngx-mat-file-input"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<input\n #inputValue\n autocomplete=\"off\"\n class=\"mat-mdc-input-element mat-mdc-form-field-input-control mdc-text-field__input\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [attr.readonly]=\"readonly || null\"\n [attr.aria-describedby]=\"_ariaDescribedby || null\"\n [attr.aria-invalid]=\"errorState\"\n [attr.aria-required]=\"required.toString()\"\n/>\n<div class=\"mat-mdc-form-field-suffix\">\n <button\n matSuffix\n mat-icon-button\n [color]=\"color()\"\n class=\"button-browse\"\n (click)=\"openFilePicker($event)\"\n type=\"button\"\n [disabled]=\"disabled\"\n >\n <ng-content select=\"[ngxMatFileInputIcon]\">\n <mat-icon class=\"ngx-mat-file-input--default-icon\">attach_file</mat-icon>\n </ng-content>\n </button>\n</div>\n<input\n type=\"file\"\n #inputFile\n (change)=\"handleFiles($event.target.files!)\"\n class=\"input-file\"\n [multiple]=\"multiple\"\n [accept]=\"accept\"\n/>\n", styles: [".mat-mdc-form-field-appearance-outline .mat-form-field-prefix .ngx-mat-file-input--default-icon,.mat-mdc-form-field-appearance-outline .mat-form-field-suffix .ngx-mat-file-input--default-icon{width:1em}.mat-mdc-form-field:not(.mat-form-field-appearance-outline) .mat-form-field-prefix .ngx-mat-file-input--default-icon,.mat-mdc-form-field:not(.mat-form-field-appearance-outline) .mat-form-field-suffix .ngx-mat-file-input--default-icon{display:block;width:1.5em;height:1.5em}.mat-mdc-form-field:not(.mat-form-field-appearance-outline) .mat-form-field-prefix .mat-icon-button .ngx-mat-file-input--default-icon,.mat-mdc-form-field:not(.mat-form-field-appearance-outline) .mat-form-field-suffix .mat-icon-button .ngx-mat-file-input--default-icon{margin:auto}.ngx-mat-file-input{display:flex;line-height:18px;align-items:center}.ngx-mat-file-input .input-file{display:block;visibility:hidden;width:0;height:0}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
236
236
|
}
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxMatFileInputComponent, decorators: [{
|
|
238
238
|
type: Component,
|
|
239
239
|
args: [{ selector: 'ngx-mat-file-input', encapsulation: ViewEncapsulation.None, host: {
|
|
240
240
|
class: 'ngx-mat-file-input',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-mce-file-input.mjs","sources":["../../../projects/file-input/src/lib/file-input.component.ts","../../../projects/file-input/src/lib/file-input.component.html","../../../projects/file-input/src/lib/file-input-helper.ts","../../../projects/file-input/src/lib/validators/max-size.validator.ts","../../../projects/file-input/src/lib/validators/accept.validator.ts","../../../projects/file-input/src/public-api.ts","../../../projects/file-input/src/ngx-mce-file-input.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Platform } from '@angular/cdk/platform';\n\nimport {\n ChangeDetectorRef,\n Component,\n Directive,\n DoCheck,\n ElementRef,\n forwardRef,\n inject,\n Input,\n input,\n OnChanges,\n OnDestroy,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ErrorStateMatcher, ThemePalette } from '@angular/material/core';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Subject } from 'rxjs';\nimport { FileOrArrayFile } from './file-input-type';\n\nlet nextUniqueId = 0;\n\nclass NgxMatInputMixinBase {\n\n readonly stateChanges = new Subject<void>();\n\n protected ngControl: NgControl | null = null;\n protected _parentForm: NgForm | null = null;\n protected _parentFormGroup: FormGroupDirective | null = null;\n protected _defaultErrorStateMatcher: ErrorStateMatcher | null = null;\n\n}\n\n@Directive({\n selector: '[ngxMatFileInputIcon]',\n})\nexport class NgxMatFileInputIcon {}\n\n@Component({\n selector: 'ngx-mat-file-input',\n templateUrl: 'file-input.component.html',\n styleUrls: ['file-input.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ngx-mat-file-input',\n },\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: forwardRef(() => NgxMatFileInputComponent),\n },\n ],\n exportAs: 'ngx-mat-file-input',\n imports: [MatIconModule, MatButtonModule],\n})\nexport class NgxMatFileInputComponent\n extends NgxMatInputMixinBase\n implements MatFormFieldControl<FileOrArrayFile>, OnChanges, OnDestroy, DoCheck, ControlValueAccessor\n{\n private _inputFileRef = viewChild<ElementRef>('inputFile');\n private _inputValueRef = viewChild<ElementRef>('inputValue');\n\n readonly color = input<ThemePalette>('primary');\n\n public fileNames = \"\";\n\n protected _uid = `ngx-mat-fileinput-${nextUniqueId++}`;\n _ariaDescribedby = \"\";\n\n override stateChanges: Subject<void> = new Subject<void>();\n focused = false;\n errorState = false;\n controlType = 'ngx-mat-file-input';\n autofilled = false;\n\n /** Function when touched */\n _onTouched = () => {\n // Intentionally empty.\n };\n\n /** Function when changed */\n _onChange: (value: FileOrArrayFile) => void = () => {\n // Intentionally empty.\n };\n\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n @Input()\n get id(): string {\n return this._id;\n }\n set id(value: string) {\n this._id = value || this._uid;\n }\n protected _id = \"\";\n\n @Input()\n get multiple(): boolean {\n return this._multiple;\n }\n set multiple(value: boolean) {\n this._multiple = coerceBooleanProperty(value);\n }\n protected _multiple = false;\n\n @Input()\n placeholder = 'Choose a file';\n separator = input<string>(',');\n\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n }\n protected _required = false;\n\n @Input() errorStateMatcher: ErrorStateMatcher | null = null;\n\n @Input()\n get value(): FileOrArrayFile | null {\n return this._value;\n }\n set value(value: FileOrArrayFile) {\n this._value = value;\n }\n protected _value: FileOrArrayFile | null = null;\n\n @Input()\n get readonly(): boolean {\n return this._readonly;\n }\n set readonly(value: boolean) {\n this._readonly = coerceBooleanProperty(value);\n }\n private _readonly = true;\n\n /**\n * Limiting accepted file types\n * Example: accept=\"image/png, image/jpeg\" or accept=\".png, .jpg, .jpeg\" — Accept PNG or JPEG files.\n */\n @Input()\n get accept(): string {\n return this._accept;\n }\n set accept(value: string) {\n this._accept = value;\n }\n private _accept = \"\";\n\n protected _elementRef = inject(ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>);\n protected _platform = inject(Platform);\n private _cd = inject(ChangeDetectorRef);\n\n override ngControl = inject(NgControl, { optional: true, self: true });\n protected override _parentForm = inject(NgForm, { optional: true });\n protected override _parentFormGroup = inject(FormGroupDirective, { optional: true });\n protected override _defaultErrorStateMatcher = inject(ErrorStateMatcher);\n\n constructor() {\n super();\n\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n this.updateErrorState();\n }\n }\n\n updateErrorState() {\n const control = this.ngControl ? this.ngControl.control : null;\n\n this.errorState = (this.errorStateMatcher ?? this._defaultErrorStateMatcher).isErrorState(\n control,\n this._parentForm,\n );\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: FileOrArrayFile): void {\n this._updateInputValue(value);\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: FileOrArrayFile) => void): void {\n this._onChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.stateChanges.next();\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this._inputValueRef()?.nativeElement.focus(options);\n }\n\n _focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n /** Mark the field as touched */\n _markAsTouched() {\n this._onTouched();\n this._cd.markForCheck();\n this.stateChanges.next();\n }\n\n protected _isBadInput() {\n const validity = (this._inputValueRef()?.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n get empty(): boolean {\n return !this._inputValueRef()?.nativeElement.value && !this._isBadInput() && !this.autofilled;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n openFilePicker(event?: MouseEvent) {\n this._inputFileRef()?.nativeElement.click();\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n this._markAsTouched();\n }\n\n handleFiles(filelist: FileList) {\n if (filelist.length > 0) {\n const files: File[] = [];\n for (let i = 0; i < filelist.length; i++) {\n const f = filelist.item(i);\n if (f)\n files.push(f);\n }\n this._updateInputValue(files);\n this._resetInputFile();\n this._onChange(this.multiple ? files : files[0]);\n }\n }\n\n /** Handles a click on the control's container. */\n onContainerClick(_: MouseEvent) {\n // Intentionally empty.\n }\n\n private _resetInputFile() {\n this._inputFileRef()!.nativeElement.value = '';\n }\n\n private _updateInputValue(files: FileOrArrayFile) {\n let text = null;\n if (files) {\n if (Array.isArray(files)) {\n text = this._multiple ? files.map((x) => x.name).join(this.separator()) : files[0].name;\n } else {\n text = files.name != null ? files.name : null;\n }\n }\n\n this._inputValueRef()!.nativeElement.value = text;\n }\n}\n","<input\n #inputValue\n autocomplete=\"off\"\n class=\"mat-mdc-input-element mat-mdc-form-field-input-control mdc-text-field__input\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [attr.readonly]=\"readonly || null\"\n [attr.aria-describedby]=\"_ariaDescribedby || null\"\n [attr.aria-invalid]=\"errorState\"\n [attr.aria-required]=\"required.toString()\"\n/>\n<div class=\"mat-mdc-form-field-suffix\">\n <button\n matSuffix\n mat-icon-button\n [color]=\"color()\"\n class=\"button-browse\"\n (click)=\"openFilePicker($event)\"\n type=\"button\"\n [disabled]=\"disabled\"\n >\n <ng-content select=\"[ngxMatFileInputIcon]\">\n <mat-icon class=\"ngx-mat-file-input--default-icon\">attach_file</mat-icon>\n </ng-content>\n </button>\n</div>\n<input\n type=\"file\"\n #inputFile\n (change)=\"handleFiles($event.target.files!)\"\n class=\"input-file\"\n [multiple]=\"multiple\"\n [accept]=\"accept\"\n/>\n","export function calculFileSize(number: number): string {\n if (number < 1024) {\n return number + 'bytes';\n } else if (number >= 1024 && number < 1048576) {\n return (number / 1024).toFixed(1) + 'KB';\n } else if (number >= 1048576) {\n return (number / 1048576).toFixed(1) + 'MB';\n }\n return `${number}`;\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\n/**\n * Validator for size of file\n * @param max Max of size of file (in bytes)\n */\nexport function MaxSizeValidator(max: number): ValidatorFn {\n return (ctrl: AbstractControl): ValidationErrors | null => {\n max = Number(max);\n if (isNaN(max)) {\n throw 'MaxSizeValidator: max of size of file is invalid';\n }\n if (!ctrl.value) return null;\n let files: File[] = ctrl.value;\n if (!Array.isArray(ctrl.value)) {\n files = [ctrl.value];\n }\n if (!files.length) return null;\n const add = (a: number, b: number): number => a + b;\n const sumSize = files.map((x) => x.size).reduce(add);\n if (sumSize > max) {\n return {\n maxSize: true,\n };\n }\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\n/**\n * Validator for input file accept\n * @param accept Allowable type of file\n */\nexport function AcceptValidator(accept: string): ValidatorFn {\n return (ctrl: AbstractControl): ValidationErrors | null => {\n if (!accept) {\n throw 'AcceptValidator: allowable type of file can not be empty';\n }\n\n if (ctrl.value == null) return null;\n\n if (!accept.includes(ctrl.value.type)) {\n return {\n accept: true,\n };\n }\n\n return null;\n };\n}\n","/*\n * Public API Surface of file-input\n */\n\nexport * from './lib/file-input.component';\n\nexport * from './lib/file-input-type';\nexport * from './lib/file-input-helper';\nexport * from './lib/validators';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA0BA,IAAI,YAAY,GAAG,CAAC;AAEpB,MAAM,oBAAoB,CAAA;AAEf,IAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;IAEjC,SAAS,GAAqB,IAAI;IAClC,WAAW,GAAkB,IAAI;IACjC,gBAAgB,GAA8B,IAAI;IAClD,yBAAyB,GAA6B,IAAI;AAErE;MAKY,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AAClC,iBAAA;;AAoBK,MAAO,wBACX,SAAQ,oBAAoB,CAAA;AAGpB,IAAA,aAAa,GAAG,SAAS,CAAa,WAAW,oFAAC;AAClD,IAAA,cAAc,GAAG,SAAS,CAAa,YAAY,qFAAC;AAEnD,IAAA,KAAK,GAAG,KAAK,CAAe,SAAS,4EAAC;IAExC,SAAS,GAAG,EAAE;AAEX,IAAA,IAAI,GAAG,CAAA,kBAAA,EAAqB,YAAY,EAAE,EAAE;IACtD,gBAAgB,GAAG,EA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AK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QACtB;QACA,IAAI,CAAC,KAAK,CAAC,MAAM;AAAE,YAAA,OAAO,IAAI;AAC9B,QAAA,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,CAAS,KAAa,CAAC,GAAG,CAAC;QACnD,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;AACpD,QAAA,IAAI,OAAO,GAAG,GAAG,EAAE;YACjB,OAAO;AACL,gBAAA,OAAO,EAAE,IAAI;aACd;QACH;AACA,QAAA,OAAO,IAAI;AACb,IAAA,CAAC;AACH;;ACzBA;;;AAGG;AACG,SAAU,eAAe,CAAC,MAAc,EAAA;IAC5C,OAAO,CAAC,IAAqB,KAA6B;QACxD,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,MAAM,0DAA0D;QAClE;AAEA,QAAA,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI;AAAE,YAAA,OAAO,IAAI;AAEnC,QAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YACrC,OAAO;AACL,gBAAA,MAAM,EAAE,IAAI;aACb;QACH;AAEA,QAAA,OAAO,IAAI;AACb,IAAA,CAAC;AACH;;ACtBA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-mce-file-input.mjs","sources":["../../../projects/file-input/src/lib/file-input.component.ts","../../../projects/file-input/src/lib/file-input.component.html","../../../projects/file-input/src/lib/file-input-helper.ts","../../../projects/file-input/src/lib/validators/max-size.validator.ts","../../../projects/file-input/src/lib/validators/accept.validator.ts","../../../projects/file-input/src/public-api.ts","../../../projects/file-input/src/ngx-mce-file-input.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Platform } from '@angular/cdk/platform';\n\nimport {\n ChangeDetectorRef,\n Component,\n Directive,\n DoCheck,\n ElementRef,\n forwardRef,\n inject,\n Input,\n input,\n OnChanges,\n OnDestroy,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ErrorStateMatcher, ThemePalette } from '@angular/material/core';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Subject } from 'rxjs';\nimport { FileOrArrayFile } from './file-input-type';\n\nlet nextUniqueId = 0;\n\nclass NgxMatInputMixinBase {\n\n readonly stateChanges = new Subject<void>();\n\n protected ngControl: NgControl | null = null;\n protected _parentForm: NgForm | null = null;\n protected _parentFormGroup: FormGroupDirective | null = null;\n protected _defaultErrorStateMatcher: ErrorStateMatcher | null = null;\n\n}\n\n@Directive({\n selector: '[ngxMatFileInputIcon]',\n})\nexport class NgxMatFileInputIcon {}\n\n@Component({\n selector: 'ngx-mat-file-input',\n templateUrl: 'file-input.component.html',\n styleUrls: ['file-input.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ngx-mat-file-input',\n },\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: forwardRef(() => NgxMatFileInputComponent),\n },\n ],\n exportAs: 'ngx-mat-file-input',\n imports: [MatIconModule, MatButtonModule],\n})\nexport class NgxMatFileInputComponent\n extends NgxMatInputMixinBase\n implements MatFormFieldControl<FileOrArrayFile>, OnChanges, OnDestroy, DoCheck, ControlValueAccessor\n{\n private _inputFileRef = viewChild<ElementRef>('inputFile');\n private _inputValueRef = viewChild<ElementRef>('inputValue');\n\n readonly color = input<ThemePalette>('primary');\n\n public fileNames = \"\";\n\n protected _uid = `ngx-mat-fileinput-${nextUniqueId++}`;\n _ariaDescribedby = \"\";\n\n override stateChanges: Subject<void> = new Subject<void>();\n focused = false;\n errorState = false;\n controlType = 'ngx-mat-file-input';\n autofilled = false;\n\n /** Function when touched */\n _onTouched = () => {\n // Intentionally empty.\n };\n\n /** Function when changed */\n _onChange: (value: FileOrArrayFile) => void = () => {\n // Intentionally empty.\n };\n\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n @Input()\n get id(): string {\n return this._id;\n }\n set id(value: string) {\n this._id = value || this._uid;\n }\n protected _id = \"\";\n\n @Input()\n get multiple(): boolean {\n return this._multiple;\n }\n set multiple(value: boolean) {\n this._multiple = coerceBooleanProperty(value);\n }\n protected _multiple = false;\n\n @Input()\n placeholder = 'Choose a file';\n separator = input<string>(',');\n\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n }\n protected _required = false;\n\n @Input() errorStateMatcher: ErrorStateMatcher | null = null;\n\n @Input()\n get value(): FileOrArrayFile | null {\n return this._value;\n }\n set value(value: FileOrArrayFile) {\n this._value = value;\n }\n protected _value: FileOrArrayFile | null = null;\n\n @Input()\n get readonly(): boolean {\n return this._readonly;\n }\n set readonly(value: boolean) {\n this._readonly = coerceBooleanProperty(value);\n }\n private _readonly = true;\n\n /**\n * Limiting accepted file types\n * Example: accept=\"image/png, image/jpeg\" or accept=\".png, .jpg, .jpeg\" — Accept PNG or JPEG files.\n */\n @Input()\n get accept(): string {\n return this._accept;\n }\n set accept(value: string) {\n this._accept = value;\n }\n private _accept = \"\";\n\n protected _elementRef = inject(ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>);\n protected _platform = inject(Platform);\n private _cd = inject(ChangeDetectorRef);\n\n override ngControl = inject(NgControl, { optional: true, self: true });\n protected override _parentForm = inject(NgForm, { optional: true });\n protected override _parentFormGroup = inject(FormGroupDirective, { optional: true });\n protected override _defaultErrorStateMatcher = inject(ErrorStateMatcher);\n\n constructor() {\n super();\n\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n this.updateErrorState();\n }\n }\n\n updateErrorState() {\n const control = this.ngControl ? this.ngControl.control : null;\n\n this.errorState = (this.errorStateMatcher ?? this._defaultErrorStateMatcher).isErrorState(\n control,\n this._parentForm,\n );\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: FileOrArrayFile): void {\n this._updateInputValue(value);\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: FileOrArrayFile) => void): void {\n this._onChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.stateChanges.next();\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this._inputValueRef()?.nativeElement.focus(options);\n }\n\n _focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n /** Mark the field as touched */\n _markAsTouched() {\n this._onTouched();\n this._cd.markForCheck();\n this.stateChanges.next();\n }\n\n protected _isBadInput() {\n const validity = (this._inputValueRef()?.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n get empty(): boolean {\n return !this._inputValueRef()?.nativeElement.value && !this._isBadInput() && !this.autofilled;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n openFilePicker(event?: MouseEvent) {\n this._inputFileRef()?.nativeElement.click();\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n this._markAsTouched();\n }\n\n handleFiles(filelist: FileList) {\n if (filelist.length > 0) {\n const files: File[] = [];\n for (let i = 0; i < filelist.length; i++) {\n const f = filelist.item(i);\n if (f)\n files.push(f);\n }\n this._updateInputValue(files);\n this._resetInputFile();\n this._onChange(this.multiple ? files : files[0]);\n }\n }\n\n /** Handles a click on the control's container. */\n onContainerClick(_: MouseEvent) {\n // Intentionally empty.\n }\n\n private _resetInputFile() {\n this._inputFileRef()!.nativeElement.value = '';\n }\n\n private _updateInputValue(files: FileOrArrayFile) {\n let text = null;\n if (files) {\n if (Array.isArray(files)) {\n text = this._multiple ? files.map((x) => x.name).join(this.separator()) : files[0].name;\n } else {\n text = files.name != null ? files.name : null;\n }\n }\n\n this._inputValueRef()!.nativeElement.value = text;\n }\n}\n","<input\n #inputValue\n autocomplete=\"off\"\n class=\"mat-mdc-input-element mat-mdc-form-field-input-control mdc-text-field__input\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [attr.readonly]=\"readonly || null\"\n [attr.aria-describedby]=\"_ariaDescribedby || null\"\n [attr.aria-invalid]=\"errorState\"\n [attr.aria-required]=\"required.toString()\"\n/>\n<div class=\"mat-mdc-form-field-suffix\">\n <button\n matSuffix\n mat-icon-button\n [color]=\"color()\"\n class=\"button-browse\"\n (click)=\"openFilePicker($event)\"\n type=\"button\"\n [disabled]=\"disabled\"\n >\n <ng-content select=\"[ngxMatFileInputIcon]\">\n <mat-icon class=\"ngx-mat-file-input--default-icon\">attach_file</mat-icon>\n </ng-content>\n </button>\n</div>\n<input\n type=\"file\"\n #inputFile\n (change)=\"handleFiles($event.target.files!)\"\n class=\"input-file\"\n [multiple]=\"multiple\"\n [accept]=\"accept\"\n/>\n","export function calculFileSize(number: number): string {\n if (number < 1024) {\n return number + 'bytes';\n } else if (number >= 1024 && number < 1048576) {\n return (number / 1024).toFixed(1) + 'KB';\n } else if (number >= 1048576) {\n return (number / 1048576).toFixed(1) + 'MB';\n }\n return `${number}`;\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\n/**\n * Validator for size of file\n * @param max Max of size of file (in bytes)\n */\nexport function MaxSizeValidator(max: number): ValidatorFn {\n return (ctrl: AbstractControl): ValidationErrors | null => {\n max = Number(max);\n if (isNaN(max)) {\n throw 'MaxSizeValidator: max of size of file is invalid';\n }\n if (!ctrl.value) return null;\n let files: File[] = ctrl.value;\n if (!Array.isArray(ctrl.value)) {\n files = [ctrl.value];\n }\n if (!files.length) return null;\n const add = (a: number, b: number): number => a + b;\n const sumSize = files.map((x) => x.size).reduce(add);\n if (sumSize > max) {\n return {\n maxSize: true,\n };\n }\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\n/**\n * Validator for input file accept\n * @param accept Allowable type of file\n */\nexport function AcceptValidator(accept: string): ValidatorFn {\n return (ctrl: AbstractControl): ValidationErrors | null => {\n if (!accept) {\n throw 'AcceptValidator: allowable type of file can not be empty';\n }\n\n if (ctrl.value == null) return null;\n\n if (!accept.includes(ctrl.value.type)) {\n return {\n accept: true,\n };\n }\n\n return null;\n };\n}\n","/*\n * Public API Surface of file-input\n */\n\nexport * from './lib/file-input.component';\n\nexport * from './lib/file-input-type';\nexport * from './lib/file-input-helper';\nexport * from './lib/validators';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA0BA,IAAI,YAAY,GAAG,CAAC;AAEpB,MAAM,oBAAoB,CAAA;AAEf,IAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;IAEjC,SAAS,GAAqB,IAAI;IAClC,WAAW,GAAkB,IAAI;IACjC,gBAAgB,GAA8B,IAAI;IAClD,yBAAyB,GAA6B,IAAI;AAErE;MAKY,mBAAmB,CAAA;wGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAnB,mBAAmB,EAAA,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