@smallpearl/ngx-helper 20.0.3 → 20.0.4
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/fesm2022/smallpearl-ngx-helper-entities.mjs +3 -3
- package/fesm2022/smallpearl-ngx-helper-entities.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-entity-field.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs +3 -3
- package/fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-locale.mjs +6 -6
- package/fesm2022/smallpearl-ngx-helper-locale.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-busy-wheel.mjs +9 -9
- package/fesm2022/smallpearl-ngx-helper-mat-busy-wheel.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-context-menu.mjs +3 -3
- package/fesm2022/smallpearl-ngx-helper-mat-context-menu.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-entity-crud.mjs +17 -17
- package/fesm2022/smallpearl-ngx-helper-mat-entity-crud.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-entity-list.mjs +30 -45
- package/fesm2022/smallpearl-ngx-helper-mat-entity-list.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-file-input.mjs +21 -21
- package/fesm2022/smallpearl-ngx-helper-mat-file-input.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-form-error.mjs +15 -15
- package/fesm2022/smallpearl-ngx-helper-mat-form-error.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-select-entity.mjs +106 -115
- package/fesm2022/smallpearl-ngx-helper-mat-select-entity.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-select-infinite-scroll.mjs +6 -6
- package/fesm2022/smallpearl-ngx-helper-mat-select-infinite-scroll.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-side-menu-layout.mjs +166 -140
- package/fesm2022/smallpearl-ngx-helper-mat-side-menu-layout.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-tel-input.mjs +38 -36
- package/fesm2022/smallpearl-ngx-helper-mat-tel-input.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-stationary-with-line-items.mjs +6 -6
- package/fesm2022/smallpearl-ngx-helper-stationary-with-line-items.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-utils.mjs +23 -0
- package/fesm2022/smallpearl-ngx-helper-utils.mjs.map +1 -0
- package/fesm2022/smallpearl-ngx-helper.mjs +2 -7
- package/fesm2022/smallpearl-ngx-helper.mjs.map +1 -1
- package/package.json +24 -24
- package/{mat-select-entity/index.d.ts → types/smallpearl-ngx-helper-mat-select-entity.d.ts} +2 -1
- package/types/smallpearl-ngx-helper-utils.d.ts +6 -0
- package/types/smallpearl-ngx-helper.d.ts +3 -0
- package/core/index.d.ts +0 -3
- package/fesm2022/smallpearl-ngx-helper-core.mjs +0 -8
- package/fesm2022/smallpearl-ngx-helper-core.mjs.map +0 -1
- package/index.d.ts +0 -4
- /package/{entities/index.d.ts → types/smallpearl-ngx-helper-entities.d.ts} +0 -0
- /package/{entity-field/index.d.ts → types/smallpearl-ngx-helper-entity-field.d.ts} +0 -0
- /package/{forms/index.d.ts → types/smallpearl-ngx-helper-forms.d.ts} +0 -0
- /package/{hover-dropdown/index.d.ts → types/smallpearl-ngx-helper-hover-dropdown.d.ts} +0 -0
- /package/{locale/index.d.ts → types/smallpearl-ngx-helper-locale.d.ts} +0 -0
- /package/{mat-busy-wheel/index.d.ts → types/smallpearl-ngx-helper-mat-busy-wheel.d.ts} +0 -0
- /package/{mat-context-menu/index.d.ts → types/smallpearl-ngx-helper-mat-context-menu.d.ts} +0 -0
- /package/{mat-entity-crud/index.d.ts → types/smallpearl-ngx-helper-mat-entity-crud.d.ts} +0 -0
- /package/{mat-entity-list/index.d.ts → types/smallpearl-ngx-helper-mat-entity-list.d.ts} +0 -0
- /package/{mat-file-input/index.d.ts → types/smallpearl-ngx-helper-mat-file-input.d.ts} +0 -0
- /package/{mat-form-error/index.d.ts → types/smallpearl-ngx-helper-mat-form-error.d.ts} +0 -0
- /package/{mat-select-infinite-scroll/index.d.ts → types/smallpearl-ngx-helper-mat-select-infinite-scroll.d.ts} +0 -0
- /package/{mat-side-menu-layout/index.d.ts → types/smallpearl-ngx-helper-mat-side-menu-layout.d.ts} +0 -0
- /package/{mat-tel-input/index.d.ts → types/smallpearl-ngx-helper-mat-tel-input.d.ts} +0 -0
- /package/{sideload/index.d.ts → types/smallpearl-ngx-helper-sideload.d.ts} +0 -0
- /package/{stationary-with-line-items/index.d.ts → types/smallpearl-ngx-helper-stationary-with-line-items.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smallpearl-ngx-helper-mat-file-input.mjs","sources":["../../../../projects/smallpearl/ngx-helper/mat-file-input/src/mat-file-input.component.ts","../../../../projects/smallpearl/ngx-helper/mat-file-input/smallpearl-ngx-helper-mat-file-input.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NgControl,\n ReactiveFormsModule,\n UntypedFormControl,\n Validators,\n} from '@angular/forms';\nimport {\n MAT_FORM_FIELD,\n MatFormField,\n MatFormFieldControl,\n MatFormFieldModule,\n} from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Subject, filter, takeUntil } from 'rxjs';\n\nlet nextId = 0;\n\nfunction isValidHttpUrl(urlStr: string) {\n let url: URL;\n\n try {\n url = new URL(urlStr);\n } catch (_) {\n return false;\n }\n return url.protocol === 'http:' || url.protocol === 'https:';\n}\n\nfunction isImageFileExt(filename: string): boolean {\n const IMAGE_EXTS = ['jpeg', 'jpg', 'png', 'gif', 'webp', 'bmp', 'tiff'];\n const parts = filename.split('.');\n const EXT = parts[parts.length - 1].toLowerCase();\n for (let index = 0; index < IMAGE_EXTS.length; index++) {\n const ext = IMAGE_EXTS[index];\n if (EXT === ext) {\n return true;\n }\n }\n return false;\n}\n\n@Component({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatIconModule,\n ],\n selector: 'qq-mat-file-input',\n template: `\n <div class=\"wrapper\">\n <div class=\"filename-wrapper\">\n <input\n type=\"file\"\n hidden\n [accept]=\"acceptedFileTypes\"\n [multiple]=\"false\"\n (change)=\"onFileSelected($event)\"\n #input\n />\n <div tabindex=\"0\">{{ fileName || placeholder }}</div>\n </div>\n <div class=\"thumbnail-wrapper\">\n <div\n class=\"thumbnail\"\n *ngIf=\"thumbnailImageUrl; else paperClipIcon\"\n [ngStyle]=\"{ 'background-image': 'url(' + thumbnailImageUrl + ')' }\"\n ></div>\n <ng-template #paperClipIcon>\n <mat-icon fontIcon=\"attach_file\"></mat-icon>\n </ng-template>\n </div>\n </div>\n `,\n styles: [\n `\n .wrapper {\n display: flex;\n flex-direction: row;\n cursor: pointer;\n }\n .filename-wrapper {\n flex-grow: 1 !important;\n flex-wrap: wrap;\n }\n .thumbnail-wrapper {\n }\n .thumbnail {\n display: inline-block;\n border-radius: inherit;\n background-image: linear-gradient(lightgray, gray);\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n border-radius: 50%;\n min-width: 32px;\n min-height: 32px;\n margin-top: -7px;\n margin-bottom: -9px;\n }\n .size-small {\n width: 32px;\n height: 32px;\n }\n .size-medium {\n width: 64px;\n height: 64px;\n }\n .size-large {\n width: 96px;\n height: 96px;\n }\n `,\n ],\n providers: [\n { provide: MatFormFieldControl, useExisting: QQMatFileInputComponent },\n ]\n})\nexport class QQMatFileInputComponent\n implements\n ControlValueAccessor,\n MatFormFieldControl<File[]>,\n OnInit,\n OnDestroy\n{\n // @Input() label: string = 'File';\n @Input() accept: string = '*';\n @Input() thumbnailImageUrl: string = '';\n @Input() imageFile: boolean = false;\n\n _fileName = '';\n\n @ViewChild('input', { read: ElementRef }) inputFileUpload:\n | ElementRef\n | undefined;\n fileControl = new UntypedFormControl(undefined, Validators.required);\n\n static nextId = 0;\n stateChanges = new Subject<void>();\n focused = false;\n errorState = false;\n controlType = 'lib-file-upload';\n // eslint-disable-next-line no-plusplus\n id = `lib-file-upload-${nextId++}`;\n describedBy = '';\n // eslint-disable-next-line no-underscore-dangle\n private _multiple: boolean = false;\n\n @HostBinding('attr.aria-describedby') ariaDescribedby: string | undefined;\n // @ts-ignore\n _value: File[] | null;\n\n get empty() {\n return !this.fileControl.value;\n }\n\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n\n get acceptedFileTypes() {\n if (this.imageFile) {\n return 'image/jpeg,image/png,image/gif,image/webp';\n }\n return this.accept;\n }\n\n @Input()\n get multiple(): boolean {\n // eslint-disable-next-line no-underscore-dangle\n return this._multiple;\n }\n set multiple(value: boolean | string) {\n // eslint-disable-next-line no-underscore-dangle\n this._multiple = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n @Input()\n get placeholder(): string {\n // eslint-disable-next-line no-underscore-dangle\n return this._placeholder;\n }\n set placeholder(value: string) {\n // eslint-disable-next-line no-underscore-dangle\n this._placeholder = value;\n this.stateChanges.next();\n }\n // eslint-disable-next-line no-underscore-dangle\n private _placeholder: string = '';\n @Input()\n get required(): boolean {\n // eslint-disable-next-line no-underscore-dangle\n return this._required;\n }\n set required(value: boolean) {\n if (value) {\n this.fileControl.setValidators(Validators.required);\n }\n // eslint-disable-next-line no-underscore-dangle\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n // eslint-disable-next-line no-underscore-dangle\n private _required = false;\n private _disabled = false;\n private destroy$ = new Subject<void>();\n\n @Input()\n get disabled(): boolean {\n // eslint-disable-next-line no-underscore-dangle\n return this._disabled;\n }\n set disabled(value: boolean) {\n if (value) {\n this.fileControl.disable();\n } else {\n this.fileControl.enable();\n }\n // eslint-disable-next-line no-underscore-dangle\n this._disabled = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n // @Input()\n get fileName(): string {\n return this._fileName || '';\n }\n // set fileName(filename: string) {\n // const parts = filename.split('/');\n // this._fileName = parts[parts.length - 1];\n // if (isValidHttpUrl(filename) && isImageFileExt(filename)) {\n // this.thumbnailImageUrl = filename;\n // }\n // this.stateChanges.next();\n // }\n\n @Input()\n get value(): File[] | null {\n return this.fileControl.value;\n }\n\n set value(files: File[] | string | null) {\n if (files instanceof File || Array.isArray(files)) {\n this.fileControl.setValue(files);\n } else if (typeof files == 'string') {\n const filename = files;\n const parts = filename.split('/');\n this._fileName = parts[parts.length - 1];\n if (isValidHttpUrl(filename) && isImageFileExt(filename)) {\n this.thumbnailImageUrl = filename;\n }\n }\n this.stateChanges.next();\n }\n\n constructor(\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\n @Optional() @Self() public ngControl: NgControl\n ) {\n // eslint-disable-next-line no-param-reassign\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n this.fileControl.statusChanges\n .pipe(\n takeUntil(this.destroy$),\n filter(() => this.fileControl.dirty || this.fileControl.touched)\n )\n .subscribe((status) => {\n this.errorState = status === 'INVALID';\n this.stateChanges.next();\n });\n }\n\n setDescribedByIds(ids: string[]) {\n this.describedBy = ids.join(' ');\n }\n\n @HostListener('document:keypress', ['$event'])\n handleKeyboardEvent(event: KeyboardEvent) {\n if (event.key == ' ') {\n this.onContainerClick(event);\n }\n }\n\n onContainerClick(event: MouseEvent | KeyboardEvent) {\n if (\n !this.disabled &&\n (event.target as Element).tagName.toLowerCase() !== 'input'\n ) {\n this.inputFileUpload?.nativeElement.focus();\n this.inputFileUpload?.nativeElement.click();\n this.focused = true;\n this.fileControl.markAsTouched();\n this.fileControl.updateValueAndValidity();\n this.stateChanges.next();\n }\n }\n\n writeValue(files: File[]): void {\n this.value = files;\n this.fileControl.setValue(files);\n }\n\n registerOnChange(fn: any): void {\n this.fileControl.valueChanges.subscribe(fn);\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n onTouched = () => {};\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onFileSelected(event: any) {\n // eslint-disable-next-line prefer-destructuring\n const files: File[] = event.target.files; // (event.target as HTMLInputElement)?.files\n if (files && files.length > 0) {\n this._fileName =\n files.length > 1 ? `${files.length} files to upload` : files[0].name;\n this.fileControl.setValue(files);\n this.value = files;\n if (files.length == 1 && isImageFileExt(files[0].name)) {\n this.generateLocalThumbnail(files[0]);\n }\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n ngOnInit(): void {}\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n generateLocalThumbnail(file: File) {\n this.thumbnailImageUrl = '';\n // console.log(`generateLocalThumbnail - file: ${file.name}`);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA+BA,IAAI,MAAM,GAAG,CAAC;AAEd,SAAS,cAAc,CAAC,MAAc,EAAA;AACpC,IAAA,IAAI,GAAQ;AAEZ,IAAA,IAAI;AACF,QAAA,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC;IACvB;IAAE,OAAO,CAAC,EAAE;AACV,QAAA,OAAO,KAAK;IACd;IACA,OAAO,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ;AAC9D;AAEA,SAAS,cAAc,CAAC,QAAgB,EAAA;AACtC,IAAA,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;IACvE,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CA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,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;sBAgBvC,WAAW;uBAAC,uBAAuB;;sBAmBnC;;sBAWA;;sBAYA;;sBAkBA;;sBA6BA;;sBA0CA,YAAY;uBAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAC;;;ACvS/C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"smallpearl-ngx-helper-mat-file-input.mjs","sources":["../../../../projects/smallpearl/ngx-helper/mat-file-input/src/mat-file-input.component.ts","../../../../projects/smallpearl/ngx-helper/mat-file-input/smallpearl-ngx-helper-mat-file-input.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NgControl,\n ReactiveFormsModule,\n UntypedFormControl,\n Validators,\n} from '@angular/forms';\nimport {\n MAT_FORM_FIELD,\n MatFormField,\n MatFormFieldControl,\n MatFormFieldModule,\n} from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Subject, filter, takeUntil } from 'rxjs';\n\nlet nextId = 0;\n\nfunction isValidHttpUrl(urlStr: string) {\n let url: URL;\n\n try {\n url = new URL(urlStr);\n } catch (_) {\n return false;\n }\n return url.protocol === 'http:' || url.protocol === 'https:';\n}\n\nfunction isImageFileExt(filename: string): boolean {\n const IMAGE_EXTS = ['jpeg', 'jpg', 'png', 'gif', 'webp', 'bmp', 'tiff'];\n const parts = filename.split('.');\n const EXT = parts[parts.length - 1].toLowerCase();\n for (let index = 0; index < IMAGE_EXTS.length; index++) {\n const ext = IMAGE_EXTS[index];\n if (EXT === ext) {\n return true;\n }\n }\n return false;\n}\n\n@Component({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatIconModule,\n ],\n selector: 'qq-mat-file-input',\n template: `\n <div class=\"wrapper\">\n <div class=\"filename-wrapper\">\n <input\n type=\"file\"\n hidden\n [accept]=\"acceptedFileTypes\"\n [multiple]=\"false\"\n (change)=\"onFileSelected($event)\"\n #input\n />\n <div tabindex=\"0\">{{ fileName || placeholder }}</div>\n </div>\n <div class=\"thumbnail-wrapper\">\n @if (thumbnailImageUrl) {\n <div\n class=\"thumbnail\"\n [ngStyle]=\"{ 'background-image': 'url(' + thumbnailImageUrl + ')' }\"\n ></div>\n } @else {\n <mat-icon fontIcon=\"attach_file\"></mat-icon>\n }\n </div>\n </div>\n `,\n styles: [\n `\n .wrapper {\n display: flex;\n flex-direction: row;\n cursor: pointer;\n }\n .filename-wrapper {\n flex-grow: 1 !important;\n flex-wrap: wrap;\n }\n .thumbnail-wrapper {\n }\n .thumbnail {\n display: inline-block;\n border-radius: inherit;\n background-image: linear-gradient(lightgray, gray);\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n border-radius: 50%;\n min-width: 32px;\n min-height: 32px;\n margin-top: -7px;\n margin-bottom: -9px;\n }\n .size-small {\n width: 32px;\n height: 32px;\n }\n .size-medium {\n width: 64px;\n height: 64px;\n }\n .size-large {\n width: 96px;\n height: 96px;\n }\n `,\n ],\n providers: [\n { provide: MatFormFieldControl, useExisting: QQMatFileInputComponent },\n ]\n})\nexport class QQMatFileInputComponent\n implements\n ControlValueAccessor,\n MatFormFieldControl<File[]>,\n OnInit,\n OnDestroy\n{\n // @Input() label: string = 'File';\n @Input() accept: string = '*';\n @Input() thumbnailImageUrl: string = '';\n @Input() imageFile: boolean = false;\n\n _fileName = '';\n\n @ViewChild('input', { read: ElementRef }) inputFileUpload:\n | ElementRef\n | undefined;\n fileControl = new UntypedFormControl(undefined, Validators.required);\n\n static nextId = 0;\n stateChanges = new Subject<void>();\n focused = false;\n errorState = false;\n controlType = 'lib-file-upload';\n // eslint-disable-next-line no-plusplus\n id = `lib-file-upload-${nextId++}`;\n describedBy = '';\n // eslint-disable-next-line no-underscore-dangle\n private _multiple: boolean = false;\n\n @HostBinding('attr.aria-describedby') ariaDescribedby: string | undefined;\n // @ts-ignore\n _value: File[] | null;\n\n get empty() {\n return !this.fileControl.value;\n }\n\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n\n get acceptedFileTypes() {\n if (this.imageFile) {\n return 'image/jpeg,image/png,image/gif,image/webp';\n }\n return this.accept;\n }\n\n @Input()\n get multiple(): boolean {\n // eslint-disable-next-line no-underscore-dangle\n return this._multiple;\n }\n set multiple(value: boolean | string) {\n // eslint-disable-next-line no-underscore-dangle\n this._multiple = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n @Input()\n get placeholder(): string {\n // eslint-disable-next-line no-underscore-dangle\n return this._placeholder;\n }\n set placeholder(value: string) {\n // eslint-disable-next-line no-underscore-dangle\n this._placeholder = value;\n this.stateChanges.next();\n }\n // eslint-disable-next-line no-underscore-dangle\n private _placeholder: string = '';\n @Input()\n get required(): boolean {\n // eslint-disable-next-line no-underscore-dangle\n return this._required;\n }\n set required(value: boolean) {\n if (value) {\n this.fileControl.setValidators(Validators.required);\n }\n // eslint-disable-next-line no-underscore-dangle\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n // eslint-disable-next-line no-underscore-dangle\n private _required = false;\n private _disabled = false;\n private destroy$ = new Subject<void>();\n\n @Input()\n get disabled(): boolean {\n // eslint-disable-next-line no-underscore-dangle\n return this._disabled;\n }\n set disabled(value: boolean) {\n if (value) {\n this.fileControl.disable();\n } else {\n this.fileControl.enable();\n }\n // eslint-disable-next-line no-underscore-dangle\n this._disabled = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n // @Input()\n get fileName(): string {\n return this._fileName || '';\n }\n // set fileName(filename: string) {\n // const parts = filename.split('/');\n // this._fileName = parts[parts.length - 1];\n // if (isValidHttpUrl(filename) && isImageFileExt(filename)) {\n // this.thumbnailImageUrl = filename;\n // }\n // this.stateChanges.next();\n // }\n\n @Input()\n get value(): File[] | null {\n return this.fileControl.value;\n }\n\n set value(files: File[] | string | null) {\n if (files instanceof File || Array.isArray(files)) {\n this.fileControl.setValue(files);\n } else if (typeof files == 'string') {\n const filename = files;\n const parts = filename.split('/');\n this._fileName = parts[parts.length - 1];\n if (isValidHttpUrl(filename) && isImageFileExt(filename)) {\n this.thumbnailImageUrl = filename;\n }\n }\n this.stateChanges.next();\n }\n\n constructor(\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\n @Optional() @Self() public ngControl: NgControl\n ) {\n // eslint-disable-next-line no-param-reassign\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n this.fileControl.statusChanges\n .pipe(\n takeUntil(this.destroy$),\n filter(() => this.fileControl.dirty || this.fileControl.touched)\n )\n .subscribe((status) => {\n this.errorState = status === 'INVALID';\n this.stateChanges.next();\n });\n }\n\n setDescribedByIds(ids: string[]) {\n this.describedBy = ids.join(' ');\n }\n\n @HostListener('document:keypress', ['$event'])\n handleKeyboardEvent(event: KeyboardEvent) {\n if (event.key == ' ') {\n this.onContainerClick(event);\n }\n }\n\n onContainerClick(event: MouseEvent | KeyboardEvent) {\n if (\n !this.disabled &&\n (event.target as Element).tagName.toLowerCase() !== 'input'\n ) {\n this.inputFileUpload?.nativeElement.focus();\n this.inputFileUpload?.nativeElement.click();\n this.focused = true;\n this.fileControl.markAsTouched();\n this.fileControl.updateValueAndValidity();\n this.stateChanges.next();\n }\n }\n\n writeValue(files: File[]): void {\n this.value = files;\n this.fileControl.setValue(files);\n }\n\n registerOnChange(fn: any): void {\n this.fileControl.valueChanges.subscribe(fn);\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n onTouched = () => {};\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onFileSelected(event: any) {\n // eslint-disable-next-line prefer-destructuring\n const files: File[] = event.target.files; // (event.target as HTMLInputElement)?.files\n if (files && files.length > 0) {\n this._fileName =\n files.length > 1 ? `${files.length} files to upload` : files[0].name;\n this.fileControl.setValue(files);\n this.value = files;\n if (files.length == 1 && isImageFileExt(files[0].name)) {\n this.generateLocalThumbnail(files[0]);\n }\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n ngOnInit(): void {}\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n generateLocalThumbnail(file: File) {\n this.thumbnailImageUrl = '';\n // console.log(`generateLocalThumbnail - file: ${file.name}`);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA+BA,IAAI,MAAM,GAAG,CAAC;AAEd,SAAS,cAAc,CAAC,MAAc,EAAA;AACpC,IAAA,IAAI,GAAQ;AAEZ,IAAA,IAAI;AACF,QAAA,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC;IACvB;IAAE,OAAO,CAAC,EAAE;AACV,QAAA,OAAO,KAAK;IACd;IACA,OAAO,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ;AAC9D;AAEA,SAAS,cAAc,CAAC,QAAgB,EAAA;AACtC,IAAA,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;IACvE,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC;AACjC,IAAA,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE;AACjD,IAAA,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;AACtD,QAAA,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC;AAC7B,QAAA,IAAI,GAAG,KAAK,GAAG,EAAE;AACf,YAAA,OAAO,IAAI;QACb;IACF;AACA,IAAA,OAAO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WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAwER,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBA7EnC,SAAS;AACG,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACL,YAAY;wBACZ,mBAAmB;wBACnB,kBAAkB;wBAClB,aAAa;AAChB,qBAAA,EAAA,QAAA,EACS,mBAAmB,EAAA,QAAA,EACnB;;;;;;;;;;;;;;;;;;;;;;;;KAwBT,EAAA,SAAA,EAyCU;AACP,wBAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,yBAAyB,EAAE;AACzE,qBAAA,EAAA,MAAA,EAAA,CAAA,meAAA,CAAA,EAAA;;0BA6IA;;0BAAY,MAAM;2BAAC,cAAc;;0BACjC;;0BAAY;;sBApId;;sBACA;;sBACA;;sBAIA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;sBAgBvC,WAAW;uBAAC,uBAAuB;;sBAmBnC;;sBAWA;;sBAYA;;sBAkBA;;sBA6BA;;sBA0CA,YAAY;uBAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAC;;;ACvS/C;;AAEG;;;;"}
|
|
@@ -15,10 +15,10 @@ class NgxMatErrorControl {
|
|
|
15
15
|
get() {
|
|
16
16
|
return this.matFormField?._control;
|
|
17
17
|
}
|
|
18
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
19
|
-
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
18
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxMatErrorControl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxMatErrorControl });
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxMatErrorControl, decorators: [{
|
|
22
22
|
type: Injectable
|
|
23
23
|
}] });
|
|
24
24
|
/**
|
|
@@ -60,15 +60,15 @@ class NgxMatErrorDef {
|
|
|
60
60
|
}
|
|
61
61
|
return input?.control ?? undefined;
|
|
62
62
|
}
|
|
63
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
64
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
63
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxMatErrorDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
64
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.2", type: NgxMatErrorDef, isStandalone: true, selector: "[ngxMatErrorDef]", inputs: { ngxMatErrorDefFor: "ngxMatErrorDefFor", ngxMatErrorDefWithControl: "ngxMatErrorDefWithControl" }, providers: [
|
|
65
65
|
{
|
|
66
66
|
provide: NGX_MAT_ERROR_DEF,
|
|
67
67
|
useExisting: NgxMatErrorDef,
|
|
68
68
|
},
|
|
69
69
|
], ngImport: i0 });
|
|
70
70
|
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxMatErrorDef, decorators: [{
|
|
72
72
|
type: Directive,
|
|
73
73
|
args: [{
|
|
74
74
|
selector: '[ngxMatErrorDef]',
|
|
@@ -240,8 +240,8 @@ class NgxMatErrors {
|
|
|
240
240
|
ngOnDestroy() {
|
|
241
241
|
this.controlChangedSubject.complete();
|
|
242
242
|
}
|
|
243
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
244
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
243
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxMatErrors, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
244
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", type: NgxMatErrors, isStandalone: true, selector: "ngx-mat-errors, [ngx-mat-errors]", inputs: { control: ["ngx-mat-errors", "control"] }, host: { classAttribute: "ngx-mat-errors" }, providers: [provideDefaultNgxMatErrorControl()], queries: [{ propertyName: "customErrorMessages", predicate: NGX_MAT_ERROR_DEF, descendants: true }], ngImport: i0, template: `<ng-template #defaultTemplate let-error>{{ error[0] }}</ng-template
|
|
245
245
|
>@if( error$ | async; as error) {
|
|
246
246
|
<ng-template
|
|
247
247
|
[ngTemplateOutlet]="error.template ?? defaultTemplate"
|
|
@@ -249,7 +249,7 @@ class NgxMatErrors {
|
|
|
249
249
|
></ng-template>
|
|
250
250
|
}`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
251
251
|
}
|
|
252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxMatErrors, decorators: [{
|
|
253
253
|
type: Component,
|
|
254
254
|
args: [{
|
|
255
255
|
selector: 'ngx-mat-errors, [ngx-mat-errors]',
|
|
@@ -471,15 +471,15 @@ class NgxMatErrorsForDateRangePicker extends NgxMatErrorControl {
|
|
|
471
471
|
._control;
|
|
472
472
|
return [_startInput, _endInput];
|
|
473
473
|
}
|
|
474
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
475
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
474
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxMatErrorsForDateRangePicker, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
475
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.2", type: NgxMatErrorsForDateRangePicker, isStandalone: true, selector: "[ngx-mat-errors][forDateRangePicker]", host: { classAttribute: "ngx-mat-errors-for-date-range-picker" }, providers: [
|
|
476
476
|
{
|
|
477
477
|
provide: NgxMatErrorControl,
|
|
478
478
|
useExisting: NgxMatErrorsForDateRangePicker,
|
|
479
479
|
},
|
|
480
480
|
], usesInheritance: true, ngImport: i0 });
|
|
481
481
|
}
|
|
482
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxMatErrorsForDateRangePicker, decorators: [{
|
|
483
483
|
type: Directive,
|
|
484
484
|
args: [{
|
|
485
485
|
selector: '[ngx-mat-errors][forDateRangePicker]',
|
|
@@ -504,8 +504,8 @@ class NgxErrorList extends NgxMatErrors {
|
|
|
504
504
|
set control(control) {
|
|
505
505
|
super.control = control;
|
|
506
506
|
}
|
|
507
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
508
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
507
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxErrorList, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
508
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", type: NgxErrorList, isStandalone: true, selector: "ngx-error-list, [ngx-error-list]", inputs: { control: ["ngx-error-list", "control"] }, host: { classAttribute: "ngx-error-list" }, providers: [provideDefaultNgxMatErrorControl()], usesInheritance: true, ngImport: i0, template: `<ng-template #defaultTemplate let-error>
|
|
509
509
|
<ul>
|
|
510
510
|
@if (isArray(error)) {
|
|
511
511
|
@for (item of error; track $index) {
|
|
@@ -523,7 +523,7 @@ class NgxErrorList extends NgxMatErrors {
|
|
|
523
523
|
></ng-template>
|
|
524
524
|
}`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
525
525
|
}
|
|
526
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NgxErrorList, decorators: [{
|
|
527
527
|
type: Component,
|
|
528
528
|
args: [{
|
|
529
529
|
selector: 'ngx-error-list, [ngx-error-list]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smallpearl-ngx-helper-mat-form-error.mjs","sources":["../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-mat-error-control.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-mat-error-def.directive.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/coerce-to-observable.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/distinct-until-error-changed.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/find-error-for-control.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/get-abstract-controls.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/get-control-with-error.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-mat-errors.component.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/en.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/hu.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/pt-br.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/zh-hans.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/zh-hant.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-mat-errors-for-date-range-picker.directive.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-error-list.component.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/smallpearl-ngx-helper-mat-form-error.ts"],"sourcesContent":["import { Injectable, type Provider, inject } from '@angular/core';\nimport { MAT_FORM_FIELD } from '@angular/material/form-field';\nimport type { FormFieldControl } from './types';\n\n/**\n * This class contains the logic of getting the default control of a MatFormField.\n * Extend it to implement a custom getter method.\n */\n@Injectable()\nexport class NgxMatErrorControl {\n protected readonly matFormField = inject(MAT_FORM_FIELD, { optional: true });\n public get(): undefined | FormFieldControl | FormFieldControl[] {\n return this.matFormField?._control;\n }\n}\n\n/**\n * Provides the default control accessor of a MatFormField.\n */\nexport function provideDefaultNgxMatErrorControl(): Provider {\n return {\n provide: NgxMatErrorControl,\n };\n}\n","import {\n Directive,\n InjectionToken,\n Input,\n TemplateRef,\n inject,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlContainer,\n type AbstractControlDirective,\n} from '@angular/forms';\n\nexport interface INgxMatErrorDef {\n ngxMatErrorDefFor: string;\n ngxMatErrorDefWithControl?:\n | AbstractControlDirective\n | AbstractControl\n | string\n | null;\n template: TemplateRef<any>;\n control?: AbstractControl;\n}\n\n/**\n * Lightweight injection token. When NgxMatErrorDef is not used, only this token will remain, the directive will be tree-shaken.\n */\nexport const NGX_MAT_ERROR_DEF = new InjectionToken<INgxMatErrorDef>(\n 'NGX_MAT_ERROR_DEF'\n);\n\n@Directive({\n selector: '[ngxMatErrorDef]',\n standalone: true,\n providers: [\n {\n provide: NGX_MAT_ERROR_DEF,\n useExisting: NgxMatErrorDef,\n },\n ],\n})\nexport class NgxMatErrorDef implements INgxMatErrorDef {\n /**\n * Specify the error key to be used for error matching.\n * @required\n */\n @Input({\n required: true,\n })\n public ngxMatErrorDefFor!: string;\n\n /**\n * Specify the control to be used for error matching.\n * @optional\n */\n @Input()\n public ngxMatErrorDefWithControl?:\n | AbstractControlDirective\n | AbstractControl\n | string\n | null = undefined;\n public readonly template = inject(TemplateRef);\n private readonly controlContainer = inject(ControlContainer, {\n optional: true,\n skipSelf: true,\n });\n\n public get control(): AbstractControl | undefined {\n const input = this.ngxMatErrorDefWithControl;\n if (typeof input === 'string') {\n return this.controlContainer?.control?.get(input) ?? undefined;\n }\n if (input instanceof AbstractControl) {\n return input;\n }\n return input?.control ?? undefined;\n }\n}\n","import { type Observable, isObservable, of, } from 'rxjs';\nimport type { ErrorMessages } from '../types';\n\nexport function coerceToObservable(\n errorMessages: ErrorMessages | Observable<ErrorMessages>\n): Observable<ErrorMessages> {\n if (isObservable(errorMessages)) {\n return errorMessages;\n }\n return of(errorMessages);\n}\n","import type { ErrorTemplate } from '../types';\n\nexport function distinctUntilErrorChanged<P extends ErrorTemplate>(\n prev: P,\n curr: P\n) {\n if (prev === curr) {\n return true;\n }\n if (!prev || !curr) {\n return false;\n }\n if (prev.template !== curr.template) {\n return false;\n }\n return prev.$implicit === curr.$implicit;\n}\n","import type { AbstractControl } from '@angular/forms';\nimport type { INgxMatErrorDef } from '../ngx-mat-error-def.directive';\nimport { ErrorMessages } from '../types';\n\n/**\n * Finds the error key or custom error for a control. The original function\n * has been modified\n * @returns INgxMatErrorDef | undefined\n */\nexport function findErrorsForControl(\n control: AbstractControl,\n messages: ErrorMessages,\n customErrorMessages: readonly INgxMatErrorDef[]\n): string[] | INgxMatErrorDef {\n const errorKeys = Object.keys(control.errors!);\n return (\n customErrorMessages.find((customErrorMessage) =>\n errorKeys.some((error) => {\n if (error !== customErrorMessage.ngxMatErrorDefFor) {\n return false;\n }\n return (\n !customErrorMessage.control || customErrorMessage.control === control\n );\n })\n ) ?? errorKeys.filter((key) => key in messages)\n );\n}\n","import { coerceArray } from '@angular/cdk/coercion';\nimport { AbstractControl, AbstractControlDirective } from '@angular/forms';\nimport type { NgxMatErrorControls } from '../types';\n\nexport function getAbstractControls(\n controls: NgxMatErrorControls\n): AbstractControl[] | undefined {\n if (!controls) {\n return;\n }\n const _controls = coerceArray(controls)\n .map((control) =>\n !control\n ? undefined\n : control instanceof AbstractControlDirective\n ? control.control\n : control instanceof AbstractControl\n ? control\n : control.ngControl?.control\n )\n .filter(<T>(control: T): control is NonNullable<T> => control != null);\n return _controls.length ? _controls : undefined;\n}\n","import type { AbstractControl } from '@angular/forms';\nimport {\n type Observable,\n pairwise,\n filter,\n merge,\n startWith,\n map,\n combineLatest,\n} from 'rxjs';\n\nexport function getControlWithError(\n controls: AbstractControl[]\n): Observable<AbstractControl | undefined> {\n const controlChanges = controls.map((control) => {\n const fromPendingStates = control.statusChanges.pipe(\n pairwise(),\n filter(([previous, current]) => {\n return previous === 'PENDING' && current !== 'PENDING';\n })\n );\n const invalidState = control.statusChanges.pipe(\n filter(state => state === 'INVALID')\n );\n return merge(control.valueChanges, fromPendingStates, invalidState).pipe(\n // return merge(control.valueChanges, fromPendingStates).pipe(\n startWith(null as any),\n map(() => control)\n );\n });\n return combineLatest(controlChanges).pipe(\n map((control) => control.find((control) => !!control.errors))\n );\n}\n","import { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n InjectionToken,\n Input,\n ViewEncapsulation,\n inject,\n type OnDestroy,\n type QueryList,\n} from '@angular/core';\nimport {\n ReplaySubject,\n combineLatest,\n distinctUntilChanged,\n map,\n of,\n startWith,\n switchMap,\n type Observable,\n} from 'rxjs';\nimport {\n NgxMatErrorControl,\n provideDefaultNgxMatErrorControl,\n} from './ngx-mat-error-control';\nimport {\n NGX_MAT_ERROR_DEF,\n type INgxMatErrorDef,\n} from './ngx-mat-error-def.directive';\nimport type {\n ErrorMessages,\n ErrorTemplate,\n NgxMatErrorControls,\n} from './types';\nimport { coerceToObservable } from './utils/coerce-to-observable';\nimport { distinctUntilErrorChanged } from './utils/distinct-until-error-changed';\nimport { findErrorsForControl } from './utils/find-error-for-control';\nimport { getAbstractControls } from './utils/get-abstract-controls';\nimport { getControlWithError } from './utils/get-control-with-error';\n\n/**\n * Default error messages for form controls. These messages can be overridden\n * by providing custom messages using the {@link NGX_MAT_ERROR_ADDL_OPTIONS}\n * injection token. Typically, this is initialized in the root module\n * (or AppComponent) of the application, providing the app with a global set\n * of validation error messages.\n *\n * Messages specific to each form can be provided using the\n * {@link NGX_MAT_ERROR_ADDL_OPTIONS} injection token (see below).\n */\nexport const NGX_MAT_ERROR_DEFAULT_OPTIONS = new InjectionToken<\n ErrorMessages | Observable<ErrorMessages>\n>('NGX_MAT_ERROR_DEFAULT_OPTIONS');\n\n/**\n * Additional error messages to be merged with the default error messages.\n * These messages will override the default messages if the same key is\n * provided. This is useful for adding custom error messages specific to a\n * form, without having to redefine all the default messages.\n *\n * Typically, this is provided in the component or module where the form\n * is defined.\n */\nexport const NGX_MAT_ERROR_ADDL_OPTIONS = new InjectionToken<\n ErrorMessages | Observable<ErrorMessages>\n>('NGX_MAT_ERROR_ADDL_OPTIONS');\n\n@Component({\n selector: 'ngx-mat-errors, [ngx-mat-errors]',\n template: `<ng-template #defaultTemplate let-error>{{ error[0] }}</ng-template\n >@if( error$ | async; as error) {\n <ng-template\n [ngTemplateOutlet]=\"error.template ?? defaultTemplate\"\n [ngTemplateOutletContext]=\"error\"\n ></ng-template>\n }`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AsyncPipe, NgTemplateOutlet],\n host: {\n class: 'ngx-mat-errors',\n },\n providers: [provideDefaultNgxMatErrorControl()]\n})\nexport class NgxMatErrors implements OnDestroy {\n private readonly messages$ = coerceToObservable(\n inject(NGX_MAT_ERROR_DEFAULT_OPTIONS)\n );\n private readonly addlMessages$ = coerceToObservable(\n inject(NGX_MAT_ERROR_ADDL_OPTIONS, {optional: true}) ?? of({})\n );\n\n private readonly defaultControl = inject(NgxMatErrorControl, {\n host: true,\n });\n private readonly controlChangedSubject =\n new ReplaySubject<NgxMatErrorControls>(1);\n\n protected error$!: Observable<ErrorTemplate>;\n\n // ContentChildren is set before ngAfterContentInit which is before ngAfterViewInit.\n // Before ngAfterViewInit lifecycle hook we can modify the error$ observable without needing another change detection cycle.\n // This elaborates the need of rxjs defer;\n @ContentChildren(NGX_MAT_ERROR_DEF, { descendants: true })\n protected set customErrorMessages(queryList: QueryList<INgxMatErrorDef>) {\n const firstControlWithError$ = this.controlChangedSubject.pipe(\n switchMap((_controls) => {\n const controls = getAbstractControls(\n _controls || this.defaultControl.get()\n );\n if (!controls) {\n return of(null);\n }\n return getControlWithError(controls);\n })\n ),\n customErrorMessages$ = (\n queryList.changes as Observable<QueryList<INgxMatErrorDef>>\n ).pipe(startWith(queryList));\n this.error$ = combineLatest([\n firstControlWithError$,\n customErrorMessages$,\n this.messages$,\n this.addlMessages$,\n ]).pipe(\n map(([controlWithError, customErrorMessages, messages, addlMessages]) => {\n if (!controlWithError) {\n return;\n }\n const allMessages = { ...messages, ...addlMessages };\n const errors = controlWithError.errors!,\n errorsOrErrorDef = findErrorsForControl(\n controlWithError,\n allMessages,\n customErrorMessages.toArray()\n );\n if (!errorsOrErrorDef) {\n return;\n }\n // errorsOrErrorDef: INgxMatErrorDef\n if (typeof errorsOrErrorDef === 'object' && !Array.isArray(errorsOrErrorDef)) {\n return {\n template: errorsOrErrorDef.template,\n $implicit: errors[errorsOrErrorDef.ngxMatErrorDefFor],\n };\n }\n // errorsOrErrorDef: string[]\n const msgs = errorsOrErrorDef.map(key => {\n const message = allMessages[key];\n return typeof message === 'function'\n ? message(errors[key])\n : message\n });\n return {\n template: undefined,\n $implicit: msgs\n };\n }),\n distinctUntilChanged(distinctUntilErrorChanged)\n );\n }\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n /**\n * @deprecated will be changed to a signal and it won't be possible to set the property from TS.\n * Instead of setting it in a directive, the directive should extend the {@link NgxMatErrorControl } class\n * and provide itself as it.\n */\n @Input('ngx-mat-errors')\n public set control(control: NgxMatErrorControls) {\n this.controlChangedSubject.next(control);\n }\n\n /** @ignore */\n public ngOnDestroy(): void {\n this.controlChangedSubject.complete();\n }\n}\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\nimport type {\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n ParseError,\n StartDateError,\n} from '../types';\n\nexport function errorMessagesEnFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) =>\n `Please enter a value greater than or equal to ${error.min}.`,\n max: (error: MaxError) =>\n `Please enter a value less than or equal to ${error.max}.`,\n required: `This field is required.`,\n email: `Please enter a valid email address.`,\n minlength: (error: LengthError) =>\n `Please enter at least ${error.requiredLength} characters.`,\n maxlength: (error: LengthError) =>\n `Please enter no more than ${error.requiredLength} characters.`,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n return `Please enter a date greater than or equal to ${\n formatted ?? error.min\n }.`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n return `Please enter a date less than or equal to ${\n formatted ?? error.max\n }.`;\n },\n matDatepickerParse: (error: ParseError) => `Invalid date format.`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `Start date cannot be after end date.`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `End date cannot be before start date.`,\n matDatepickerFilter: 'This date is filtered out.',\n matTimepickerParse: (error: ParseError) => `Invalid time format.`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `Please enter a time greater than or equal to ${\n formatted ?? error.min\n }.`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `Please enter a time less than or equal to ${\n formatted ?? error.max\n }.`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_EN: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesEnFactory,\n deps: [LOCALE_ID],\n};\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport type {\n ParseError,\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n StartDateError,\n} from '../types';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\n\nexport function errorMessagesHuFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) => `Nem lehet kisebb, mint ${error.min}.`,\n max: (error: MaxError) => `Nem lehet nagyobb, mint ${error.max}.`,\n required: `Kötelező mező.`,\n email: `Nem érvényes e-mail cím.`,\n minlength: (error: LengthError) =>\n `Legalább ${error.requiredLength} karakter hosszú lehet.`,\n maxlength: (error: LengthError) =>\n `Legfeljebb ${error.requiredLength} karakter hosszú lehet.`,\n server: (error: string) => error,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n // In Hungarian date ends with '.'\n return `Nem lehet korábbi dátum, mint ${formatted ?? error.min}`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n // In Hungarian date ends with '.'\n return `Nem lehet későbbi dátum, mint ${formatted ?? error.max}`;\n },\n matDatepickerParse: (error: ParseError) => `Érvénytelen dátum.`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `A kezdő dátum nem lehet a vég dátum után.`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `A vég dátum nem lehet a kezdő dátum előtt.`,\n matDatepickerFilter: 'Ez a dátum nem engedélyezett.',\n matTimepickerParse: (error: ParseError) => `Érvénytelen idő.`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `Nem lehet korábbi idő, mint ${\n formatted ?? error.min\n }.`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `Nem lehet későbbi idő, mint ${\n formatted ?? error.max\n }.`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_HU: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesHuFactory,\n deps: [LOCALE_ID],\n};\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport type {\n ParseError,\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n StartDateError,\n} from '../types';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\n\nexport function errorMessagesPtBtFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) => `Informe um valor igual ou maior a ${error.min}.`,\n max: (error: MaxError) => `Informe um valor igual ou menor a ${error.max}.`,\n required: `Campo obrigatório.`,\n email: `Informe um endereço de email válido.`,\n minlength: (error: LengthError) =>\n `Informe pelo menos ${error.requiredLength} caracteres.`,\n maxlength: (error: LengthError) =>\n `O campo não pode ter mais que ${error.requiredLength} caracteres.`,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n return `Informe uma data maior ou igual a ${formatted ?? error.min}.`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n return `Informe uma data menor ou igual a ${formatted ?? error.max}.`;\n },\n matDatepickerParse: (error: ParseError) => `Formato de data inválido.`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `A data de início não pode ser posterior à data de término.`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `A data de término não pode ser anterior à data de início.`,\n matDatepickerFilter: 'Esta data é filtrada.',\n matTimepickerParse: (error: ParseError) => `Formato de hora inválido.`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `Insira um horário maior ou igual a ${\n formatted ?? error.min\n }.`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `Insira um horário menor ou igual a ${\n formatted ?? error.max\n }.`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_PT_BR: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesPtBtFactory,\n deps: [LOCALE_ID],\n};\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\nimport type {\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n ParseError,\n StartDateError,\n} from '../types';\n\nexport function errorMessagesZhHansFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) => `请输入大于或等于 ${error.min} 的数值。`,\n max: (error: MaxError) => `请输入小于或等于 ${error.max} 的数值。`,\n required: `此字段为必填。`,\n email: `请输入有效的电子邮件地址。`,\n minlength: (error: LengthError) =>\n `请至少输入 ${error.requiredLength} 个字符。`,\n maxlength: (error: LengthError) =>\n `请勿输入超过 ${error.requiredLength} 个字符。`,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n return `请输入大于或等于 ${formatted ?? error.min} 的日期。`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n return `请输入小于或等于 ${formatted ?? error.max} 的日期。`;\n },\n matDatepickerParse: (error: ParseError) => `无效的日期格式。`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `开始日期不可晚于结束日期。`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `结束日期不可早于开始日期。`,\n matDatepickerFilter: '此日期不可选择。',\n matTimepickerParse: (error: ParseError) => `无效的时间格式。`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `请输入大于或等于 ${formatted ?? error.min} 的时间。`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `请输入小于或等于 ${formatted ?? error.max} 的时间。`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_ZH_HANS: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesZhHansFactory,\n deps: [LOCALE_ID],\n};\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\nimport type {\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n ParseError,\n StartDateError,\n} from '../types';\n\nexport function errorMessagesZhHantFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) => `請輸入大於或等於 ${error.min} 的數值。`,\n max: (error: MaxError) => `請輸入小於或等於 ${error.max} 的數值。`,\n required: `此欄位為必填。`,\n email: `請輸入有效的電子郵件地址。`,\n minlength: (error: LengthError) =>\n `請至少輸入 ${error.requiredLength} 個字元。`,\n maxlength: (error: LengthError) =>\n `請勿輸入超過 ${error.requiredLength} 個字元。`,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n return `請輸入大於或等於 ${formatted ?? error.min} 的日期。`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n return `請輸入小於或等於 ${formatted ?? error.max} 的日期。`;\n },\n matDatepickerParse: (error: ParseError) => `無效的日期格式。`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `開始日期不可晚於結束日期。`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `結束日期不可早於開始日期。`,\n matDatepickerFilter: '此日期不可選取。',\n matTimepickerParse: (error: ParseError) => `無效的時間格式。`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `請輸入大於或等於 ${formatted ?? error.min} 的時間。`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `請輸入小於或等於 ${formatted ?? error.max} 的時間。`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_ZH_HANT: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesZhHantFactory,\n deps: [LOCALE_ID],\n};\n","import { Directive } from '@angular/core';\nimport type { MatDateRangeInput } from '@angular/material/datepicker';\nimport { NgxMatErrorControl } from './ngx-mat-error-control';\n\n@Directive({\n selector: '[ngx-mat-errors][forDateRangePicker]',\n standalone: true,\n host: {\n class: 'ngx-mat-errors-for-date-range-picker',\n },\n providers: [\n {\n provide: NgxMatErrorControl,\n useExisting: NgxMatErrorsForDateRangePicker,\n },\n ],\n})\nexport class NgxMatErrorsForDateRangePicker<D> extends NgxMatErrorControl {\n /** Returns start and end controls of the date range picker. */\n public override get() {\n const { _startInput, _endInput } = this.matFormField!\n ._control as MatDateRangeInput<D>;\n return [_startInput, _endInput];\n }\n}\n","import { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { NgxMatErrors } from './ngx-mat-errors.component';\nimport { provideDefaultNgxMatErrorControl } from './ngx-mat-error-control';\nimport { NgxMatErrorControls } from './types';\n\n@Component({\n selector: 'ngx-error-list, [ngx-error-list]',\n template: `<ng-template #defaultTemplate let-error>\n <ul>\n @if (isArray(error)) {\n @for (item of error; track $index) {\n <li>{{item}}</li>\n }\n } @else {\n <li>{{ error }}</li>\n }\n </ul>\n </ng-template\n >@if( error$ | async; as error) {\n <ng-template\n [ngTemplateOutlet]=\"error.template ?? defaultTemplate\"\n [ngTemplateOutletContext]=\"error\"\n ></ng-template>\n }`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AsyncPipe, NgTemplateOutlet],\n host: {\n class: 'ngx-error-list',\n },\n providers: [provideDefaultNgxMatErrorControl()]\n})\nexport class NgxErrorList extends NgxMatErrors {\n\n isArray(e: string|string[]) {\n // console.log(`NgxErrorList - isArray.e: ${e}`);\n return typeof e !== 'string' && Array.isArray(e);\n }\n\n @Input('ngx-error-list')\n public override set control(control: NgxMatErrorControls) {\n super.control = control;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;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,CAAC;AACtC,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,gBAAgB;AAC1B,qBAAA;AACD,oBAAA,SAAS,EAAE,CAAC,gCAAgC,EAAE;AACjD,iBAAA;;sBAQE,KAAK;uBAAC,gBAAgB;;;ACxCzB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"smallpearl-ngx-helper-mat-form-error.mjs","sources":["../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-mat-error-control.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-mat-error-def.directive.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/coerce-to-observable.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/distinct-until-error-changed.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/find-error-for-control.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/get-abstract-controls.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/utils/get-control-with-error.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-mat-errors.component.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/en.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/hu.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/pt-br.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/zh-hans.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/locales/zh-hant.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-mat-errors-for-date-range-picker.directive.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/src/ngx-error-list.component.ts","../../../../projects/smallpearl/ngx-helper/mat-form-error/smallpearl-ngx-helper-mat-form-error.ts"],"sourcesContent":["import { Injectable, type Provider, inject } from '@angular/core';\nimport { MAT_FORM_FIELD } from '@angular/material/form-field';\nimport type { FormFieldControl } from './types';\n\n/**\n * This class contains the logic of getting the default control of a MatFormField.\n * Extend it to implement a custom getter method.\n */\n@Injectable()\nexport class NgxMatErrorControl {\n protected readonly matFormField = inject(MAT_FORM_FIELD, { optional: true });\n public get(): undefined | FormFieldControl | FormFieldControl[] {\n return this.matFormField?._control;\n }\n}\n\n/**\n * Provides the default control accessor of a MatFormField.\n */\nexport function provideDefaultNgxMatErrorControl(): Provider {\n return {\n provide: NgxMatErrorControl,\n };\n}\n","import {\n Directive,\n InjectionToken,\n Input,\n TemplateRef,\n inject,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlContainer,\n type AbstractControlDirective,\n} from '@angular/forms';\n\nexport interface INgxMatErrorDef {\n ngxMatErrorDefFor: string;\n ngxMatErrorDefWithControl?:\n | AbstractControlDirective\n | AbstractControl\n | string\n | null;\n template: TemplateRef<any>;\n control?: AbstractControl;\n}\n\n/**\n * Lightweight injection token. When NgxMatErrorDef is not used, only this token will remain, the directive will be tree-shaken.\n */\nexport const NGX_MAT_ERROR_DEF = new InjectionToken<INgxMatErrorDef>(\n 'NGX_MAT_ERROR_DEF'\n);\n\n@Directive({\n selector: '[ngxMatErrorDef]',\n standalone: true,\n providers: [\n {\n provide: NGX_MAT_ERROR_DEF,\n useExisting: NgxMatErrorDef,\n },\n ],\n})\nexport class NgxMatErrorDef implements INgxMatErrorDef {\n /**\n * Specify the error key to be used for error matching.\n * @required\n */\n @Input({\n required: true,\n })\n public ngxMatErrorDefFor!: string;\n\n /**\n * Specify the control to be used for error matching.\n * @optional\n */\n @Input()\n public ngxMatErrorDefWithControl?:\n | AbstractControlDirective\n | AbstractControl\n | string\n | null = undefined;\n public readonly template = inject(TemplateRef);\n private readonly controlContainer = inject(ControlContainer, {\n optional: true,\n skipSelf: true,\n });\n\n public get control(): AbstractControl | undefined {\n const input = this.ngxMatErrorDefWithControl;\n if (typeof input === 'string') {\n return this.controlContainer?.control?.get(input) ?? undefined;\n }\n if (input instanceof AbstractControl) {\n return input;\n }\n return input?.control ?? undefined;\n }\n}\n","import { type Observable, isObservable, of, } from 'rxjs';\nimport type { ErrorMessages } from '../types';\n\nexport function coerceToObservable(\n errorMessages: ErrorMessages | Observable<ErrorMessages>\n): Observable<ErrorMessages> {\n if (isObservable(errorMessages)) {\n return errorMessages;\n }\n return of(errorMessages);\n}\n","import type { ErrorTemplate } from '../types';\n\nexport function distinctUntilErrorChanged<P extends ErrorTemplate>(\n prev: P,\n curr: P\n) {\n if (prev === curr) {\n return true;\n }\n if (!prev || !curr) {\n return false;\n }\n if (prev.template !== curr.template) {\n return false;\n }\n return prev.$implicit === curr.$implicit;\n}\n","import type { AbstractControl } from '@angular/forms';\nimport type { INgxMatErrorDef } from '../ngx-mat-error-def.directive';\nimport { ErrorMessages } from '../types';\n\n/**\n * Finds the error key or custom error for a control. The original function\n * has been modified\n * @returns INgxMatErrorDef | undefined\n */\nexport function findErrorsForControl(\n control: AbstractControl,\n messages: ErrorMessages,\n customErrorMessages: readonly INgxMatErrorDef[]\n): string[] | INgxMatErrorDef {\n const errorKeys = Object.keys(control.errors!);\n return (\n customErrorMessages.find((customErrorMessage) =>\n errorKeys.some((error) => {\n if (error !== customErrorMessage.ngxMatErrorDefFor) {\n return false;\n }\n return (\n !customErrorMessage.control || customErrorMessage.control === control\n );\n })\n ) ?? errorKeys.filter((key) => key in messages)\n );\n}\n","import { coerceArray } from '@angular/cdk/coercion';\nimport { AbstractControl, AbstractControlDirective } from '@angular/forms';\nimport type { NgxMatErrorControls } from '../types';\n\nexport function getAbstractControls(\n controls: NgxMatErrorControls\n): AbstractControl[] | undefined {\n if (!controls) {\n return;\n }\n const _controls = coerceArray(controls)\n .map((control) =>\n !control\n ? undefined\n : control instanceof AbstractControlDirective\n ? control.control\n : control instanceof AbstractControl\n ? control\n : control.ngControl?.control\n )\n .filter(<T>(control: T): control is NonNullable<T> => control != null);\n return _controls.length ? _controls : undefined;\n}\n","import type { AbstractControl } from '@angular/forms';\nimport {\n type Observable,\n pairwise,\n filter,\n merge,\n startWith,\n map,\n combineLatest,\n} from 'rxjs';\n\nexport function getControlWithError(\n controls: AbstractControl[]\n): Observable<AbstractControl | undefined> {\n const controlChanges = controls.map((control) => {\n const fromPendingStates = control.statusChanges.pipe(\n pairwise(),\n filter(([previous, current]) => {\n return previous === 'PENDING' && current !== 'PENDING';\n })\n );\n const invalidState = control.statusChanges.pipe(\n filter(state => state === 'INVALID')\n );\n return merge(control.valueChanges, fromPendingStates, invalidState).pipe(\n // return merge(control.valueChanges, fromPendingStates).pipe(\n startWith(null as any),\n map(() => control)\n );\n });\n return combineLatest(controlChanges).pipe(\n map((control) => control.find((control) => !!control.errors))\n );\n}\n","import { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n InjectionToken,\n Input,\n ViewEncapsulation,\n inject,\n type OnDestroy,\n type QueryList,\n} from '@angular/core';\nimport {\n ReplaySubject,\n combineLatest,\n distinctUntilChanged,\n map,\n of,\n startWith,\n switchMap,\n type Observable,\n} from 'rxjs';\nimport {\n NgxMatErrorControl,\n provideDefaultNgxMatErrorControl,\n} from './ngx-mat-error-control';\nimport {\n NGX_MAT_ERROR_DEF,\n type INgxMatErrorDef,\n} from './ngx-mat-error-def.directive';\nimport type {\n ErrorMessages,\n ErrorTemplate,\n NgxMatErrorControls,\n} from './types';\nimport { coerceToObservable } from './utils/coerce-to-observable';\nimport { distinctUntilErrorChanged } from './utils/distinct-until-error-changed';\nimport { findErrorsForControl } from './utils/find-error-for-control';\nimport { getAbstractControls } from './utils/get-abstract-controls';\nimport { getControlWithError } from './utils/get-control-with-error';\n\n/**\n * Default error messages for form controls. These messages can be overridden\n * by providing custom messages using the {@link NGX_MAT_ERROR_ADDL_OPTIONS}\n * injection token. Typically, this is initialized in the root module\n * (or AppComponent) of the application, providing the app with a global set\n * of validation error messages.\n *\n * Messages specific to each form can be provided using the\n * {@link NGX_MAT_ERROR_ADDL_OPTIONS} injection token (see below).\n */\nexport const NGX_MAT_ERROR_DEFAULT_OPTIONS = new InjectionToken<\n ErrorMessages | Observable<ErrorMessages>\n>('NGX_MAT_ERROR_DEFAULT_OPTIONS');\n\n/**\n * Additional error messages to be merged with the default error messages.\n * These messages will override the default messages if the same key is\n * provided. This is useful for adding custom error messages specific to a\n * form, without having to redefine all the default messages.\n *\n * Typically, this is provided in the component or module where the form\n * is defined.\n */\nexport const NGX_MAT_ERROR_ADDL_OPTIONS = new InjectionToken<\n ErrorMessages | Observable<ErrorMessages>\n>('NGX_MAT_ERROR_ADDL_OPTIONS');\n\n@Component({\n selector: 'ngx-mat-errors, [ngx-mat-errors]',\n template: `<ng-template #defaultTemplate let-error>{{ error[0] }}</ng-template\n >@if( error$ | async; as error) {\n <ng-template\n [ngTemplateOutlet]=\"error.template ?? defaultTemplate\"\n [ngTemplateOutletContext]=\"error\"\n ></ng-template>\n }`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AsyncPipe, NgTemplateOutlet],\n host: {\n class: 'ngx-mat-errors',\n },\n providers: [provideDefaultNgxMatErrorControl()]\n})\nexport class NgxMatErrors implements OnDestroy {\n private readonly messages$ = coerceToObservable(\n inject(NGX_MAT_ERROR_DEFAULT_OPTIONS)\n );\n private readonly addlMessages$ = coerceToObservable(\n inject(NGX_MAT_ERROR_ADDL_OPTIONS, {optional: true}) ?? of({})\n );\n\n private readonly defaultControl = inject(NgxMatErrorControl, {\n host: true,\n });\n private readonly controlChangedSubject =\n new ReplaySubject<NgxMatErrorControls>(1);\n\n protected error$!: Observable<ErrorTemplate>;\n\n // ContentChildren is set before ngAfterContentInit which is before ngAfterViewInit.\n // Before ngAfterViewInit lifecycle hook we can modify the error$ observable without needing another change detection cycle.\n // This elaborates the need of rxjs defer;\n @ContentChildren(NGX_MAT_ERROR_DEF, { descendants: true })\n protected set customErrorMessages(queryList: QueryList<INgxMatErrorDef>) {\n const firstControlWithError$ = this.controlChangedSubject.pipe(\n switchMap((_controls) => {\n const controls = getAbstractControls(\n _controls || this.defaultControl.get()\n );\n if (!controls) {\n return of(null);\n }\n return getControlWithError(controls);\n })\n ),\n customErrorMessages$ = (\n queryList.changes as Observable<QueryList<INgxMatErrorDef>>\n ).pipe(startWith(queryList));\n this.error$ = combineLatest([\n firstControlWithError$,\n customErrorMessages$,\n this.messages$,\n this.addlMessages$,\n ]).pipe(\n map(([controlWithError, customErrorMessages, messages, addlMessages]) => {\n if (!controlWithError) {\n return;\n }\n const allMessages = { ...messages, ...addlMessages };\n const errors = controlWithError.errors!,\n errorsOrErrorDef = findErrorsForControl(\n controlWithError,\n allMessages,\n customErrorMessages.toArray()\n );\n if (!errorsOrErrorDef) {\n return;\n }\n // errorsOrErrorDef: INgxMatErrorDef\n if (typeof errorsOrErrorDef === 'object' && !Array.isArray(errorsOrErrorDef)) {\n return {\n template: errorsOrErrorDef.template,\n $implicit: errors[errorsOrErrorDef.ngxMatErrorDefFor],\n };\n }\n // errorsOrErrorDef: string[]\n const msgs = errorsOrErrorDef.map(key => {\n const message = allMessages[key];\n return typeof message === 'function'\n ? message(errors[key])\n : message\n });\n return {\n template: undefined,\n $implicit: msgs\n };\n }),\n distinctUntilChanged(distinctUntilErrorChanged)\n );\n }\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n /**\n * @deprecated will be changed to a signal and it won't be possible to set the property from TS.\n * Instead of setting it in a directive, the directive should extend the {@link NgxMatErrorControl } class\n * and provide itself as it.\n */\n @Input('ngx-mat-errors')\n public set control(control: NgxMatErrorControls) {\n this.controlChangedSubject.next(control);\n }\n\n /** @ignore */\n public ngOnDestroy(): void {\n this.controlChangedSubject.complete();\n }\n}\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\nimport type {\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n ParseError,\n StartDateError,\n} from '../types';\n\nexport function errorMessagesEnFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) =>\n `Please enter a value greater than or equal to ${error.min}.`,\n max: (error: MaxError) =>\n `Please enter a value less than or equal to ${error.max}.`,\n required: `This field is required.`,\n email: `Please enter a valid email address.`,\n minlength: (error: LengthError) =>\n `Please enter at least ${error.requiredLength} characters.`,\n maxlength: (error: LengthError) =>\n `Please enter no more than ${error.requiredLength} characters.`,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n return `Please enter a date greater than or equal to ${\n formatted ?? error.min\n }.`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n return `Please enter a date less than or equal to ${\n formatted ?? error.max\n }.`;\n },\n matDatepickerParse: (error: ParseError) => `Invalid date format.`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `Start date cannot be after end date.`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `End date cannot be before start date.`,\n matDatepickerFilter: 'This date is filtered out.',\n matTimepickerParse: (error: ParseError) => `Invalid time format.`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `Please enter a time greater than or equal to ${\n formatted ?? error.min\n }.`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `Please enter a time less than or equal to ${\n formatted ?? error.max\n }.`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_EN: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesEnFactory,\n deps: [LOCALE_ID],\n};\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport type {\n ParseError,\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n StartDateError,\n} from '../types';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\n\nexport function errorMessagesHuFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) => `Nem lehet kisebb, mint ${error.min}.`,\n max: (error: MaxError) => `Nem lehet nagyobb, mint ${error.max}.`,\n required: `Kötelező mező.`,\n email: `Nem érvényes e-mail cím.`,\n minlength: (error: LengthError) =>\n `Legalább ${error.requiredLength} karakter hosszú lehet.`,\n maxlength: (error: LengthError) =>\n `Legfeljebb ${error.requiredLength} karakter hosszú lehet.`,\n server: (error: string) => error,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n // In Hungarian date ends with '.'\n return `Nem lehet korábbi dátum, mint ${formatted ?? error.min}`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n // In Hungarian date ends with '.'\n return `Nem lehet későbbi dátum, mint ${formatted ?? error.max}`;\n },\n matDatepickerParse: (error: ParseError) => `Érvénytelen dátum.`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `A kezdő dátum nem lehet a vég dátum után.`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `A vég dátum nem lehet a kezdő dátum előtt.`,\n matDatepickerFilter: 'Ez a dátum nem engedélyezett.',\n matTimepickerParse: (error: ParseError) => `Érvénytelen idő.`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `Nem lehet korábbi idő, mint ${\n formatted ?? error.min\n }.`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `Nem lehet későbbi idő, mint ${\n formatted ?? error.max\n }.`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_HU: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesHuFactory,\n deps: [LOCALE_ID],\n};\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport type {\n ParseError,\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n StartDateError,\n} from '../types';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\n\nexport function errorMessagesPtBtFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) => `Informe um valor igual ou maior a ${error.min}.`,\n max: (error: MaxError) => `Informe um valor igual ou menor a ${error.max}.`,\n required: `Campo obrigatório.`,\n email: `Informe um endereço de email válido.`,\n minlength: (error: LengthError) =>\n `Informe pelo menos ${error.requiredLength} caracteres.`,\n maxlength: (error: LengthError) =>\n `O campo não pode ter mais que ${error.requiredLength} caracteres.`,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n return `Informe uma data maior ou igual a ${formatted ?? error.min}.`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n return `Informe uma data menor ou igual a ${formatted ?? error.max}.`;\n },\n matDatepickerParse: (error: ParseError) => `Formato de data inválido.`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `A data de início não pode ser posterior à data de término.`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `A data de término não pode ser anterior à data de início.`,\n matDatepickerFilter: 'Esta data é filtrada.',\n matTimepickerParse: (error: ParseError) => `Formato de hora inválido.`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `Insira um horário maior ou igual a ${\n formatted ?? error.min\n }.`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `Insira um horário menor ou igual a ${\n formatted ?? error.max\n }.`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_PT_BR: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesPtBtFactory,\n deps: [LOCALE_ID],\n};\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\nimport type {\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n ParseError,\n StartDateError,\n} from '../types';\n\nexport function errorMessagesZhHansFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) => `请输入大于或等于 ${error.min} 的数值。`,\n max: (error: MaxError) => `请输入小于或等于 ${error.max} 的数值。`,\n required: `此字段为必填。`,\n email: `请输入有效的电子邮件地址。`,\n minlength: (error: LengthError) =>\n `请至少输入 ${error.requiredLength} 个字符。`,\n maxlength: (error: LengthError) =>\n `请勿输入超过 ${error.requiredLength} 个字符。`,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n return `请输入大于或等于 ${formatted ?? error.min} 的日期。`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n return `请输入小于或等于 ${formatted ?? error.max} 的日期。`;\n },\n matDatepickerParse: (error: ParseError) => `无效的日期格式。`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `开始日期不可晚于结束日期。`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `结束日期不可早于开始日期。`,\n matDatepickerFilter: '此日期不可选择。',\n matTimepickerParse: (error: ParseError) => `无效的时间格式。`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `请输入大于或等于 ${formatted ?? error.min} 的时间。`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `请输入小于或等于 ${formatted ?? error.max} 的时间。`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_ZH_HANS: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesZhHansFactory,\n deps: [LOCALE_ID],\n};\n","import { formatDate } from '@angular/common';\nimport { type FactoryProvider, LOCALE_ID } from '@angular/core';\nimport { NGX_MAT_ERROR_DEFAULT_OPTIONS } from '../ngx-mat-errors.component';\nimport type {\n EndDateError,\n ErrorMessages,\n LengthError,\n MaxError,\n MinError,\n ParseError,\n StartDateError,\n} from '../types';\n\nexport function errorMessagesZhHantFactory(\n locale: string,\n dateFormat = 'shortDate',\n timeFormat = 'shortTime'\n): ErrorMessages {\n return {\n min: (error: MinError) => `請輸入大於或等於 ${error.min} 的數值。`,\n max: (error: MaxError) => `請輸入小於或等於 ${error.max} 的數值。`,\n required: `此欄位為必填。`,\n email: `請輸入有效的電子郵件地址。`,\n minlength: (error: LengthError) =>\n `請至少輸入 ${error.requiredLength} 個字元。`,\n maxlength: (error: LengthError) =>\n `請勿輸入超過 ${error.requiredLength} 個字元。`,\n matDatepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, dateFormat, locale);\n return `請輸入大於或等於 ${formatted ?? error.min} 的日期。`;\n },\n matDatepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, dateFormat, locale);\n return `請輸入小於或等於 ${formatted ?? error.max} 的日期。`;\n },\n matDatepickerParse: (error: ParseError) => `無效的日期格式。`,\n matStartDateInvalid: (error: StartDateError<Date>) =>\n `開始日期不可晚於結束日期。`,\n matEndDateInvalid: (error: EndDateError<Date>) =>\n `結束日期不可早於開始日期。`,\n matDatepickerFilter: '此日期不可選取。',\n matTimepickerParse: (error: ParseError) => `無效的時間格式。`,\n matTimepickerMin: (error: MinError<Date>) => {\n const formatted = formatDate(error.min, timeFormat, locale);\n return `請輸入大於或等於 ${formatted ?? error.min} 的時間。`;\n },\n matTimepickerMax: (error: MaxError<Date>) => {\n const formatted = formatDate(error.max, timeFormat, locale);\n return `請輸入小於或等於 ${formatted ?? error.max} 的時間。`;\n },\n };\n}\n\nexport const NGX_MAT_ERROR_CONFIG_ZH_HANT: FactoryProvider = {\n provide: NGX_MAT_ERROR_DEFAULT_OPTIONS,\n useFactory: errorMessagesZhHantFactory,\n deps: [LOCALE_ID],\n};\n","import { Directive } from '@angular/core';\nimport type { MatDateRangeInput } from '@angular/material/datepicker';\nimport { NgxMatErrorControl } from './ngx-mat-error-control';\n\n@Directive({\n selector: '[ngx-mat-errors][forDateRangePicker]',\n standalone: true,\n host: {\n class: 'ngx-mat-errors-for-date-range-picker',\n },\n providers: [\n {\n provide: NgxMatErrorControl,\n useExisting: NgxMatErrorsForDateRangePicker,\n },\n ],\n})\nexport class NgxMatErrorsForDateRangePicker<D> extends NgxMatErrorControl {\n /** Returns start and end controls of the date range picker. */\n public override get() {\n const { _startInput, _endInput } = this.matFormField!\n ._control as MatDateRangeInput<D>;\n return [_startInput, _endInput];\n }\n}\n","import { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { NgxMatErrors } from './ngx-mat-errors.component';\nimport { provideDefaultNgxMatErrorControl } from './ngx-mat-error-control';\nimport { NgxMatErrorControls } from './types';\n\n@Component({\n selector: 'ngx-error-list, [ngx-error-list]',\n template: `<ng-template #defaultTemplate let-error>\n <ul>\n @if (isArray(error)) {\n @for (item of error; track $index) {\n <li>{{item}}</li>\n }\n } @else {\n <li>{{ error }}</li>\n }\n </ul>\n </ng-template\n >@if( error$ | async; as error) {\n <ng-template\n [ngTemplateOutlet]=\"error.template ?? defaultTemplate\"\n [ngTemplateOutletContext]=\"error\"\n ></ng-template>\n }`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AsyncPipe, NgTemplateOutlet],\n host: {\n class: 'ngx-error-list',\n },\n providers: [provideDefaultNgxMatErrorControl()]\n})\nexport class NgxErrorList extends NgxMatErrors {\n\n isArray(e: string|string[]) {\n // console.log(`NgxErrorList - isArray.e: ${e}`);\n return typeof e !== 'string' && Array.isArray(e);\n }\n\n @Input('ngx-error-list')\n public override set control(control: NgxMatErrorControls) {\n super.control = control;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAIA;;;AAGG;MAEU,kBAAkB,CAAA;IACV,YAAY,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACrE,GAAG,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,YAAY,EAAE,QAAQ;IACpC;0HAJW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;8HAAlB,kBAAkB,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B;;AAQD;;AAEG;SACa,gCAAgC,GAAA;IAC9C,OAAO;AACL,QAAA,OAAO,EAAE,kBAAkB;KAC5B;AACH;;ACCA;;AAEG;MACU,iBAAiB,GAAG,IAAI,cAAc,CACjD,mBAAmB;MAaR,cAAc,CAAA;AACzB;;;AAGG;AAII,IAAA,iBAAiB;AAExB;;;AAGG;IAEI,yBAAyB,GAIrB,SAAS;AACJ,IAAA,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AAC7B,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,EAAE;AAC3D,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;AAEF,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,yBAAyB;AAC5C,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,YAAA,OAAO,IAAI,CAAC,gBAAgB,EAAE,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,SAAS;QAChE;AACA,QAAA,IAAI,KAAK,YAAY,eAAe,EAAE;AACpC,YAAA,OAAO,KAAK;QAC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