@tft/crispr-forms 21.0.18 → 21.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +21 -4
  2. package/fesm2022/tft-crispr-forms.mjs +2071 -1
  3. package/fesm2022/tft-crispr-forms.mjs.map +1 -1
  4. package/package.json +7 -7
  5. package/types/tft-crispr-forms.d.ts +238 -212
  6. package/fesm2022/tft-crispr-forms-autocomplete-field.component-BgQZYqB0.mjs +0 -95
  7. package/fesm2022/tft-crispr-forms-autocomplete-field.component-BgQZYqB0.mjs.map +0 -1
  8. package/fesm2022/tft-crispr-forms-index-3aw152gK.mjs +0 -18
  9. package/fesm2022/tft-crispr-forms-index-3aw152gK.mjs.map +0 -1
  10. package/fesm2022/tft-crispr-forms-index-BFzx83fR.mjs +0 -39
  11. package/fesm2022/tft-crispr-forms-index-BFzx83fR.mjs.map +0 -1
  12. package/fesm2022/tft-crispr-forms-index-BMZQakFs.mjs +0 -88
  13. package/fesm2022/tft-crispr-forms-index-BMZQakFs.mjs.map +0 -1
  14. package/fesm2022/tft-crispr-forms-index-B_lhA83w.mjs +0 -2
  15. package/fesm2022/tft-crispr-forms-index-B_lhA83w.mjs.map +0 -1
  16. package/fesm2022/tft-crispr-forms-index-BawhjTMp.mjs +0 -183
  17. package/fesm2022/tft-crispr-forms-index-BawhjTMp.mjs.map +0 -1
  18. package/fesm2022/tft-crispr-forms-index-CXXD0vdZ.mjs +0 -172
  19. package/fesm2022/tft-crispr-forms-index-CXXD0vdZ.mjs.map +0 -1
  20. package/fesm2022/tft-crispr-forms-index-CmVahfkJ.mjs +0 -24
  21. package/fesm2022/tft-crispr-forms-index-CmVahfkJ.mjs.map +0 -1
  22. package/fesm2022/tft-crispr-forms-index-CoUwTugQ.mjs +0 -309
  23. package/fesm2022/tft-crispr-forms-index-CoUwTugQ.mjs.map +0 -1
  24. package/fesm2022/tft-crispr-forms-index-D99OHDPc.mjs +0 -40
  25. package/fesm2022/tft-crispr-forms-index-D99OHDPc.mjs.map +0 -1
  26. package/fesm2022/tft-crispr-forms-index-DYWkX7D3.mjs +0 -83
  27. package/fesm2022/tft-crispr-forms-index-DYWkX7D3.mjs.map +0 -1
  28. package/fesm2022/tft-crispr-forms-index-DysioRya.mjs +0 -39
  29. package/fesm2022/tft-crispr-forms-index-DysioRya.mjs.map +0 -1
  30. package/fesm2022/tft-crispr-forms-index-GlYQbbbv.mjs +0 -36
  31. package/fesm2022/tft-crispr-forms-index-GlYQbbbv.mjs.map +0 -1
  32. package/fesm2022/tft-crispr-forms-index-UX-Wdyk1.mjs +0 -40
  33. package/fesm2022/tft-crispr-forms-index-UX-Wdyk1.mjs.map +0 -1
  34. package/fesm2022/tft-crispr-forms-index-bTdYHJPk.mjs +0 -68
  35. package/fesm2022/tft-crispr-forms-index-bTdYHJPk.mjs.map +0 -1
  36. package/fesm2022/tft-crispr-forms-index-kah2HT_N.mjs +0 -54
  37. package/fesm2022/tft-crispr-forms-index-kah2HT_N.mjs.map +0 -1
  38. package/fesm2022/tft-crispr-forms-tft-crispr-forms-8liD7eof.mjs +0 -943
  39. package/fesm2022/tft-crispr-forms-tft-crispr-forms-8liD7eof.mjs.map +0 -1
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@tft/crispr-forms",
3
- "version": "21.0.18",
3
+ "version": "21.1.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nayfin/tft.git",
7
7
  "directory": "libs/crispr-forms"
8
8
  },
9
9
  "peerDependencies": {
10
- "@angular/common": "^18.0.0",
11
- "@angular/forms": "^18.0.0",
12
- "@angular/core": "^18.0.0",
13
- "@angular/material": "^18.0.0",
14
- "@angular/cdk": "^18.0.0",
15
- "@tft/form-validation-handler": "^18.0.0"
10
+ "@angular/common": "^21.0.0",
11
+ "@angular/forms": "^21.0.0",
12
+ "@angular/core": "^21.0.0",
13
+ "@angular/material": "^21.0.0",
14
+ "@angular/cdk": "^21.0.0",
15
+ "@tft/form-validation-handler": "^21.1.0"
16
16
  },
17
17
  "dependencies": {
18
18
  "tslib": "^2.0.0"
@@ -1,23 +1,21 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, DestroyRef, EventEmitter, OnDestroy, ElementRef, AfterContentInit, AfterViewInit, ViewContainerRef, Renderer2, Type, PipeTransform } from '@angular/core';
3
- import * as i2 from '@angular/common';
2
+ import { OnInit, DestroyRef, Injector, ElementRef, OnDestroy, AfterContentInit, AfterViewInit, ViewContainerRef, Renderer2, Type, PipeTransform } from '@angular/core';
4
3
  import * as _angular_forms from '@angular/forms';
5
4
  import { ValidatorFn, FormGroup, AbstractControl, FormControl, FormArray, ControlValueAccessor, NgControl } from '@angular/forms';
6
- import * as i3 from '@tft/form-validation-handler';
7
- import { ErrorDictionary } from '@tft/form-validation-handler';
8
- import { ThemePalette } from '@angular/material/core';
5
+ import * as _tft_crispr_forms from '@tft/crispr-forms';
9
6
  import * as rxjs from 'rxjs';
10
7
  import { Observable, Subscription, BehaviorSubject } from 'rxjs';
11
8
  import { TooltipPosition } from '@angular/material/tooltip';
12
9
  import { MatFormFieldAppearance } from '@angular/material/form-field';
10
+ import { ErrorDictionary } from '@tft/form-validation-handler';
13
11
  import { MatCalendarCellClassFunction } from '@angular/material/datepicker';
14
12
  import { ComponentType, Portal } from '@angular/cdk/portal';
13
+ import { ThemePalette } from '@angular/material/core';
15
14
  import { GoogleMap, MapGeocoder, MapInfoWindow, MapMarker } from '@angular/google-maps';
16
15
  import { MatAutocompleteTrigger, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
17
- import { MatSelect } from '@angular/material/select';
18
16
  import { CdkOverlayOrigin, ConnectionPositionPair } from '@angular/cdk/overlay';
19
17
  import { MatChipInputEvent } from '@angular/material/chips';
20
- import * as _tft_crispr_forms from '@tft/crispr-forms';
18
+ import { MatSelect } from '@angular/material/select';
21
19
 
22
20
  declare function valueIn(values: string[]): rxjs.OperatorFunction<string, boolean>;
23
21
 
@@ -446,9 +444,10 @@ declare abstract class CrisprFieldComponent<C extends CrisprFieldConfig> {
446
444
 
447
445
  declare class CrisprControlComponent<C extends CrisprControlConfig> extends CrisprFieldComponent<C> implements OnInit {
448
446
  destroyRef: DestroyRef;
447
+ protected injector: Injector;
449
448
  group: i0.InputSignal<FormGroup<any>>;
450
449
  control: i0.Signal<AbstractControl<any, any, any>>;
451
- valueChanges: EventEmitter<ControlValue>;
450
+ readonly valueChanges: i0.OutputEmitterRef<any>;
452
451
  value: i0.InputSignal<any>;
453
452
  constructor();
454
453
  ngOnInit(): void;
@@ -518,23 +517,21 @@ declare function maxFileSizeValidator(maxFileSize: number): ValidatorFn;
518
517
  declare function allowedFileExtValidator(allowedFileExtensions: string[], onlyAllowFiles?: boolean): ValidatorFn;
519
518
  declare function allowedFileType(matchExp: string | RegExp): ValidatorFn;
520
519
 
521
- declare class FormGroupListComponent extends CrisprControlComponent<FormGroupListConfig> implements OnInit {
522
- defaultConfig: Partial<FormGroupListConfig>;
523
- /**
524
- * By setting this to true when adding/removing items from array,
525
- * we can block original values from overwriting form values
526
- * */
527
- blockValue: boolean;
528
- selectedIndex: number;
520
+ declare class CrisprFormComponent implements OnInit {
521
+ config: i0.InputSignal<FormConfig<_tft_crispr_forms.AnyFieldConfig>>;
522
+ form: i0.InputSignal<FormGroup<any>>;
523
+ value: i0.InputSignal<ControlGroupValue>;
524
+ submitted: i0.OutputEmitterRef<FormGroup<any>>;
525
+ /** Patch form values whenever the [value] input changes without firing valueChanges. */
526
+ private patchValueEffect;
527
+ valueChanges: i0.OutputRef<any>;
528
+ statusChanges: i0.OutputRef<_angular_forms.FormControlStatus>;
529
+ readonly submitTrigger: i0.Signal<ElementRef<HTMLButtonElement>>;
529
530
  ngOnInit(): void;
530
- setControlValue(values: any[]): void;
531
- clickDelete(index: number): void;
532
- clickAdd(): void;
533
- addGroup(value?: any): void;
534
- deleteGroup(index: number): void;
535
- clickEditItem(index: number): void;
536
- static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupListComponent, never>;
537
- static ɵcmp: i0.ɵɵComponentDeclaration<FormGroupListComponent, "crispr-form-group-list", never, {}, {}, never, never, true, never>;
531
+ handleSubmit(): void;
532
+ triggerSubmit(): void;
533
+ static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFormComponent, never>;
534
+ static ɵcmp: i0.ɵɵComponentDeclaration<CrisprFormComponent, "crispr-form", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "submitted": "submitted"; "valueChanges": "valueChanges"; "statusChanges": "statusChanges"; }, never, never, true, never>;
538
535
  }
539
536
 
540
537
  declare class FieldContainerComponent implements OnInit, OnDestroy {
@@ -559,26 +556,69 @@ declare class FieldContainerComponent implements OnInit, OnDestroy {
559
556
  static ɵcmp: i0.ɵɵComponentDeclaration<FieldContainerComponent, "crispr-field-container", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "group": { "alias": "group"; "required": true; "isSignal": true; }; "inlineField": { "alias": "inlineField"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
560
557
  }
561
558
 
559
+ /**
560
+ * @deprecated Import the standalone pieces (CrisprFormComponent, FieldContainerComponent, …) directly.
561
+ * This module will be removed in the next major version.
562
+ */
563
+ declare class CrisprFormsModule {
564
+ static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFormsModule, never>;
565
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CrisprFormsModule, never, [typeof CrisprFormComponent, typeof FieldContainerComponent], [typeof CrisprFormComponent, typeof FieldContainerComponent]>;
566
+ static ɵinj: i0.ɵɵInjectorDeclaration<CrisprFormsModule>;
567
+ }
568
+
569
+ declare class FormGroupListComponent extends CrisprControlComponent<FormGroupListConfig> implements OnInit {
570
+ defaultConfig: Partial<FormGroupListConfig>;
571
+ /**
572
+ * By setting this to true when adding/removing items from array,
573
+ * we can block original values from overwriting form values
574
+ * */
575
+ readonly blockValue: i0.WritableSignal<boolean>;
576
+ readonly selectedIndex: i0.WritableSignal<number>;
577
+ /** The item groups of the list's form array, typed for the template bindings. */
578
+ readonly itemGroups: i0.Signal<FormGroup<any>[]>;
579
+ ngOnInit(): void;
580
+ setControlValue(values: any[]): void;
581
+ clickDelete(index: number): void;
582
+ clickAdd(): void;
583
+ addGroup(value?: any): void;
584
+ deleteGroup(index: number): void;
585
+ clickEditItem(index: number): void;
586
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupListComponent, never>;
587
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormGroupListComponent, "crispr-form-group-list", never, {}, {}, never, never, true, never>;
588
+ }
589
+
562
590
  declare class SubGroupComponent extends CrisprControlComponent<SubGroupConfig> implements OnInit {
591
+ /** The sub group's control, typed for the nested `[group]` binding. */
592
+ readonly subGroup: i0.Signal<FormGroup<any>>;
563
593
  ngOnInit(): void;
564
594
  static ɵfac: i0.ɵɵFactoryDeclaration<SubGroupComponent, never>;
565
595
  static ɵcmp: i0.ɵɵComponentDeclaration<SubGroupComponent, "crispr-sub-group", never, {}, {}, never, never, true, never>;
566
596
  }
567
597
 
598
+ /**
599
+ * @deprecated Import the standalone SubGroupComponent directly.
600
+ * This module will be removed in the next major version.
601
+ */
602
+ declare class SubGroupModule {
603
+ static ɵfac: i0.ɵɵFactoryDeclaration<SubGroupModule, never>;
604
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SubGroupModule, never, [typeof SubGroupComponent], [typeof SubGroupComponent]>;
605
+ static ɵinj: i0.ɵɵInjectorDeclaration<SubGroupModule>;
606
+ }
607
+
568
608
  declare class FileDropzoneDirective {
569
- fileDrop: EventEmitter<FileList>;
570
- crisprFileDropzone: boolean;
609
+ readonly fileDrop: i0.OutputEmitterRef<FileList>;
610
+ readonly crisprFileDropzone: i0.InputSignal<boolean>;
571
611
  onDrop($event: DragEvent): void;
572
612
  onDragOver($event: DragEvent): void;
573
613
  static ɵfac: i0.ɵɵFactoryDeclaration<FileDropzoneDirective, never>;
574
- static ɵdir: i0.ɵɵDirectiveDeclaration<FileDropzoneDirective, "[crisprFileDropzone]", never, { "crisprFileDropzone": { "alias": "crisprFileDropzone"; "required": false; }; }, { "fileDrop": "fileDrop"; }, never, never, true, never>;
614
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FileDropzoneDirective, "[crisprFileDropzone]", never, { "crisprFileDropzone": { "alias": "crisprFileDropzone"; "required": false; "isSignal": true; }; }, { "fileDrop": "fileDrop"; }, never, never, true, never>;
575
615
  }
576
616
 
577
617
  declare class FileUploadFieldComponent extends CrisprControlComponent<FileUploadFieldConfig> implements OnInit, ControlValueAccessor {
578
618
  ngControl: NgControl;
579
619
  onChange: () => void;
580
620
  defaultConfig: Partial<FileUploadFieldConfig>;
581
- fileInputRef: ElementRef;
621
+ readonly fileInputRef: i0.Signal<ElementRef<any>>;
582
622
  selectedFiles: i0.WritableSignal<FileList>;
583
623
  selectedFilesArray: i0.Signal<File[]>;
584
624
  /**
@@ -628,10 +668,107 @@ declare class InfoComponent {
628
668
  static ɵcmp: i0.ɵɵComponentDeclaration<InfoComponent, "crispr-info", never, { "info": { "alias": "info"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
629
669
  }
630
670
 
671
+ declare class AutocompleteChiplistFieldComponent extends AbstractAutocompleteComponent<AutocompleteChiplistFieldConfig> implements OnInit {
672
+ defaultConfig: Partial<AutocompleteChiplistFieldConfig>;
673
+ chips$: BehaviorSubject<SelectOption[]>;
674
+ remainingOptions$: Observable<SelectOption[]>;
675
+ readonly selectedChip: i0.WritableSignal<SelectOption>;
676
+ controlValue$: Observable<SelectOption[]>;
677
+ readonly chipInput: i0.Signal<MatAutocompleteTrigger>;
678
+ readonly chipInputRef: i0.Signal<ElementRef<HTMLInputElement>>;
679
+ readonly overlayOrigin: i0.Signal<CdkOverlayOrigin>;
680
+ readonly createNewSentinel: symbol;
681
+ showCreateForm: i0.WritableSignal<boolean>;
682
+ createFormGroup: FormGroup<{}>;
683
+ readonly createFormPositions: ConnectionPositionPair[];
684
+ get overlayWidth(): number;
685
+ ngOnInit(): void;
686
+ setControlValue(value: SelectOption[]): void;
687
+ handleSelect(event: MatAutocompleteSelectedEvent): void;
688
+ openCreateForm(): void;
689
+ submitNewChip(): void;
690
+ closeCreateForm(): void;
691
+ /**
692
+ * To follow ARIA standards we want to select the active option on blur.
693
+ * matChipInputAddOnBlur should do this but it causes buggy behaviour
694
+ * @param event blur event that triggers the handle blur
695
+ */
696
+ handleTab(_event: Event): void;
697
+ /**
698
+ * Handles selection via key tokens passed through separatorKeyCodes property
699
+ * NOTE: If TAB is used focus does not move on to next component
700
+ * @param event
701
+ */
702
+ handleTokenEnd(event: MatChipInputEvent): void;
703
+ mapToLabel(option: SelectOption): string;
704
+ removeChip(removedChip: SelectOption): void;
705
+ highlightChip(chip: SelectOption): void;
706
+ blurField(): void;
707
+ static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteChiplistFieldComponent, never>;
708
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteChiplistFieldComponent, "crispr-autocomplete-chiplist-field", never, {}, {}, never, never, true, never>;
709
+ }
710
+
711
+ declare class AutocompleteFieldComponent extends AbstractAutocompleteComponent<AutocompleteFieldConfig> implements OnInit, OnDestroy {
712
+ defaultConfig: Partial<AutocompleteFieldConfig>;
713
+ readonly autoInput: i0.Signal<MatAutocompleteTrigger>;
714
+ readonly autoInputRef: i0.Signal<ElementRef<HTMLInputElement>>;
715
+ clearFieldSubscription: Subscription;
716
+ ngOnInit(): void;
717
+ ngOnDestroy(): void;
718
+ setControlValue(value: SelectOption): void;
719
+ /**
720
+ * The material autocomplete defaults to displaying the options value instead of its label.
721
+ * We only have the value from the selected option to work with, so we have to pass the options
722
+ * through a function called in the template and return the function that the material displayWith
723
+ * input is expecting.
724
+ * @param options the array of options to search for option with corresponding value
725
+ */
726
+ displayLabel(options: SelectOption[]): (value: unknown) => string;
727
+ handleSelect(event: MatAutocompleteSelectedEvent): void;
728
+ static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteFieldComponent, never>;
729
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteFieldComponent, "crispr-autocomplete-field", never, {}, {}, never, never, true, never>;
730
+ }
731
+
732
+ declare class ButtonComponent extends CrisprFieldComponent<ButtonConfig> implements OnInit {
733
+ defaultConfig: Partial<ButtonConfig>;
734
+ formValid$: Observable<boolean>;
735
+ group: i0.InputSignal<FormGroup<any>>;
736
+ get matButtonClass(): string;
737
+ ngOnInit(): void;
738
+ handleClick(group: FormGroup, event: MouseEvent): void;
739
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
740
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "crispr-button", never, { "group": { "alias": "group"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
741
+ }
742
+
743
+ declare class CheckboxFieldComponent extends CrisprControlComponent<CheckboxFieldConfig> implements OnInit {
744
+ defaultConfig: Partial<CheckboxFieldConfig>;
745
+ ngOnInit(): void;
746
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxFieldComponent, never>;
747
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxFieldComponent, "crispr-checkbox-field", never, {}, {}, never, never, true, never>;
748
+ }
749
+
750
+ declare class DatepickerFieldComponent extends CrisprControlComponent<DatepickerFieldConfig> implements OnInit, AfterContentInit {
751
+ defaultConfig: Partial<DatepickerFieldConfig>;
752
+ dateClass: MatCalendarCellClassFunction<Date>;
753
+ dateClass$: Observable<MatCalendarCellClassFunction<Date>>;
754
+ startAt$: Observable<Date>;
755
+ /** A portal containing the footer component type for this calendar. */
756
+ calendarFooterPortal: Portal<any>;
757
+ ngOnInit(): void;
758
+ ngAfterContentInit(): void;
759
+ static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerFieldComponent, never>;
760
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerFieldComponent, "crispr-datepicker-field", never, {}, {}, never, never, true, never>;
761
+ }
762
+
763
+ declare class DividerComponent extends CrisprFieldComponent<DividerConfig> {
764
+ defaultConfig: {};
765
+ static ɵfac: i0.ɵɵFactoryDeclaration<DividerComponent, never>;
766
+ static ɵcmp: i0.ɵɵComponentDeclaration<DividerComponent, "crispr-divider", never, {}, {}, never, never, true, never>;
767
+ }
768
+
631
769
  declare class ImageUploadFieldComponent extends CrisprControlComponent<ImageUploadFieldConfig> implements OnInit, ControlValueAccessor {
632
770
  ngControl: NgControl;
633
771
  private domSanitizer;
634
- private cdr;
635
772
  onChange: () => void;
636
773
  defaultConfig: Partial<ImageUploadFieldConfig>;
637
774
  private inputImageFileSubject;
@@ -672,7 +809,13 @@ declare class ImageUploadFieldComponent extends CrisprControlComponent<ImageUplo
672
809
  private processFile;
673
810
  private toImageUrl;
674
811
  imageSrcUrl$: Observable<string | null>;
675
- fileInputRef: ElementRef;
812
+ readonly fileInputRef: i0.Signal<ElementRef<any>>;
813
+ /**
814
+ * Whether the hint is shown, i.e. the control is valid or has not been touched. Mirrors the control's
815
+ * state into a signal so that changes made asynchronously (e.g. when image processing finishes)
816
+ * re-render this OnPush/zoneless component.
817
+ */
818
+ readonly hintVisible: i0.WritableSignal<boolean>;
676
819
  disabled$: Observable<boolean>;
677
820
  constructor();
678
821
  ngOnInit(): void;
@@ -692,52 +835,64 @@ declare class ImageUploadFieldComponent extends CrisprControlComponent<ImageUplo
692
835
  static ɵcmp: i0.ɵɵComponentDeclaration<ImageUploadFieldComponent, "crispr-image-upload-field", never, {}, {}, never, never, true, never>;
693
836
  }
694
837
 
695
- declare class DatepickerFieldComponent extends CrisprControlComponent<DatepickerFieldConfig> implements OnInit, AfterContentInit {
696
- defaultConfig: Partial<DatepickerFieldConfig>;
697
- dateClass: MatCalendarCellClassFunction<Date>;
698
- dateClass$: Observable<MatCalendarCellClassFunction<Date>>;
699
- startAt$: Observable<Date>;
700
- /** A portal containing the footer component type for this calendar. */
701
- calendarFooterPortal: Portal<any>;
838
+ declare class InputFieldComponent extends CrisprControlComponent<InputFieldConfig> implements OnInit {
839
+ defaultConfig: Partial<InputFieldConfig>;
840
+ constructor();
702
841
  ngOnInit(): void;
703
- ngAfterContentInit(): void;
704
- static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerFieldComponent, never>;
705
- static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerFieldComponent, "crispr-datepicker-field", never, {}, {}, never, never, true, never>;
842
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputFieldComponent, never>;
843
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputFieldComponent, "crispr-input-field", never, {}, {}, never, never, true, never>;
706
844
  }
707
845
 
708
- declare class CheckboxFieldComponent extends CrisprControlComponent<CheckboxFieldConfig> implements OnInit {
709
- defaultConfig: Partial<CheckboxFieldConfig>;
710
- ngOnInit(): void;
711
- static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxFieldComponent, never>;
712
- static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxFieldComponent, "crispr-checkbox-field", never, {}, {}, never, never, true, never>;
846
+ declare class MapFieldComponent extends CrisprControlComponent<MapFieldConfig> {
847
+ /**
848
+ * The overlay is positioned to align the top-right corner with the origin's bottom-right corner,
849
+ * and the top-left corner with the origin's bottom-left corner.
850
+ */
851
+ overlayPositions: ConnectionPositionPair[];
852
+ geoCoder: MapGeocoder;
853
+ infoWindow: i0.Signal<MapInfoWindow>;
854
+ selectedMarker: i0.WritableSignal<TftMapMarker>;
855
+ mapOpen: i0.WritableSignal<boolean>;
856
+ defaultConfig: Partial<MapFieldConfig>;
857
+ locationControl: FormControl<string>;
858
+ locationGroup: FormGroup<{
859
+ location: FormControl<string>;
860
+ }>;
861
+ locationConfig: AutocompleteFieldConfig;
862
+ inputCenter: rxjs.Observable<google.maps.LatLngLiteral>;
863
+ currentMap: BehaviorSubject<GoogleMap>;
864
+ displayValue: i0.Signal<string>;
865
+ currentMarkers: i0.Signal<TftMapMarker[]>;
866
+ /**
867
+ * `mapInitialized` emits the native `google.maps.Map`, but `markers`/`onMove` are typed to receive the
868
+ * `GoogleMap` component, so the template passes its `#map` ref instead.
869
+ */
870
+ onMapInit(map: GoogleMap): void;
871
+ onMarkerClick(clickedMarker: MapMarker): void;
872
+ selectMarker(marker: TftMapMarker): void;
873
+ onMove(map: GoogleMap, group: FormGroup): void;
874
+ onSelectLocation(suggestion: google.maps.places.AutocompletePrediction): Promise<void>;
875
+ openMap(): void;
876
+ closeMap(): void;
877
+ getDisplay(value: unknown): string;
878
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapFieldComponent, never>;
879
+ static ɵcmp: i0.ɵɵComponentDeclaration<MapFieldComponent, "crispr-map", never, {}, {}, never, never, true, never>;
713
880
  }
714
881
 
715
- declare class TextareaFieldComponent extends CrisprControlComponent<TextareaFieldConfig> implements OnInit {
716
- defaultConfig: Partial<TextareaFieldConfig>;
717
- ngOnInit(): void;
718
- static ɵfac: i0.ɵɵFactoryDeclaration<TextareaFieldComponent, never>;
719
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaFieldComponent, "crispr-textarea-field", never, {}, {}, never, never, true, never>;
882
+ declare class OptionComponent {
883
+ option: i0.InputSignal<SelectOption>;
884
+ static ɵfac: i0.ɵɵFactoryDeclaration<OptionComponent, never>;
885
+ static ɵcmp: i0.ɵɵComponentDeclaration<OptionComponent, "crispr-option", never, { "option": { "alias": "option"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
720
886
  }
721
887
 
722
- declare class AutocompleteFieldComponent extends AbstractAutocompleteComponent<AutocompleteFieldConfig> implements OnInit, OnDestroy {
723
- defaultConfig: Partial<AutocompleteFieldConfig>;
724
- autoInput: MatAutocompleteTrigger;
725
- autoInputRef: ElementRef<HTMLInputElement>;
726
- clearFieldSubscription: Subscription;
888
+ declare class RadioFieldComponent extends CrisprControlComponent<RadioFieldConfig> implements OnInit {
889
+ defaultConfig: {};
890
+ /** The radio group's control, typed for the `[formControl]` binding. */
891
+ readonly radioControl: i0.Signal<FormControl<any>>;
892
+ options$: Observable<SelectOption[]>;
727
893
  ngOnInit(): void;
728
- ngOnDestroy(): void;
729
- setControlValue(value: SelectOption): void;
730
- /**
731
- * The material autocomplete defaults to displaying the options value instead of its label.
732
- * We only have the value from the selected option to work with, so we have to pass the options
733
- * through a function called in the template and return the function that the material displayWith
734
- * input is expecting.
735
- * @param options the array of options to search for option with corresponding value
736
- */
737
- displayLabel(options: SelectOption[]): (value: unknown) => string;
738
- handleSelect(event: MatAutocompleteSelectedEvent): void;
739
- static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteFieldComponent, never>;
740
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteFieldComponent, "crispr-autocomplete-field", never, {}, {}, never, never, true, never>;
894
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioFieldComponent, never>;
895
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioFieldComponent, "crispr-radio-field", never, {}, {}, never, never, true, never>;
741
896
  }
742
897
 
743
898
  declare class SelectFieldComponent extends CrisprControlComponent<SelectFieldConfig> implements OnInit, AfterViewInit {
@@ -746,8 +901,8 @@ declare class SelectFieldComponent extends CrisprControlComponent<SelectFieldCon
746
901
  color: ThemePalette;
747
902
  };
748
903
  options$: Observable<SelectOption[]>;
749
- allSelected: boolean;
750
- selectField: MatSelect;
904
+ readonly allSelected: i0.WritableSignal<boolean>;
905
+ readonly selectField: i0.Signal<MatSelect>;
751
906
  ngOnInit(): void;
752
907
  ngAfterViewInit(): void;
753
908
  toggleAll(isSelected: boolean): void;
@@ -755,45 +910,21 @@ declare class SelectFieldComponent extends CrisprControlComponent<SelectFieldCon
755
910
  static ɵcmp: i0.ɵɵComponentDeclaration<SelectFieldComponent, "crispr-select-field", never, {}, {}, never, never, true, never>;
756
911
  }
757
912
 
758
- declare class InputFieldComponent extends CrisprControlComponent<InputFieldConfig> implements OnInit {
759
- defaultConfig: Partial<InputFieldConfig>;
760
- constructor();
761
- ngOnInit(): void;
762
- static ɵfac: i0.ɵɵFactoryDeclaration<InputFieldComponent, never>;
763
- static ɵcmp: i0.ɵɵComponentDeclaration<InputFieldComponent, "crispr-input-field", never, {}, {}, never, never, true, never>;
764
- }
765
-
766
- declare class RadioFieldComponent extends CrisprControlComponent<RadioFieldConfig> implements OnInit {
767
- defaultConfig: {};
768
- options$: Observable<SelectOption[]>;
769
- ngOnInit(): void;
770
- static ɵfac: i0.ɵɵFactoryDeclaration<RadioFieldComponent, never>;
771
- static ɵcmp: i0.ɵɵComponentDeclaration<RadioFieldComponent, "crispr-radio-field", never, {}, {}, never, never, true, never>;
772
- }
773
-
774
913
  declare class SliderFieldComponent extends CrisprControlComponent<SliderFieldConfig> implements OnInit {
775
914
  defaultConfig: Partial<SliderFieldConfig>;
915
+ /** `MatSlider` expects the label as a string, the config allows numbers too. */
916
+ readonly displayWith: i0.Signal<(value: number) => string>;
776
917
  constructor();
777
918
  ngOnInit(): void;
778
919
  static ɵfac: i0.ɵɵFactoryDeclaration<SliderFieldComponent, never>;
779
920
  static ɵcmp: i0.ɵɵComponentDeclaration<SliderFieldComponent, "crispr-slider-field", never, {}, {}, never, never, true, never>;
780
921
  }
781
922
 
782
- declare class DividerComponent extends CrisprFieldComponent<DividerConfig> {
783
- defaultConfig: {};
784
- static ɵfac: i0.ɵɵFactoryDeclaration<DividerComponent, never>;
785
- static ɵcmp: i0.ɵɵComponentDeclaration<DividerComponent, "crispr-divider", never, {}, {}, never, never, true, never>;
786
- }
787
-
788
- declare class ButtonComponent extends CrisprFieldComponent<ButtonConfig> implements OnInit {
789
- defaultConfig: Partial<ButtonConfig>;
790
- formValid$: Observable<boolean>;
791
- group: i0.InputSignal<FormGroup<any>>;
792
- get matButtonClass(): string;
923
+ declare class TextareaFieldComponent extends CrisprControlComponent<TextareaFieldConfig> implements OnInit {
924
+ defaultConfig: Partial<TextareaFieldConfig>;
793
925
  ngOnInit(): void;
794
- handleClick(group: FormGroup, event: MouseEvent): void;
795
- static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
796
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "crispr-button", never, { "group": { "alias": "group"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
926
+ static ɵfac: i0.ɵɵFactoryDeclaration<TextareaFieldComponent, never>;
927
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextareaFieldComponent, "crispr-textarea-field", never, {}, {}, never, never, true, never>;
797
928
  }
798
929
 
799
930
  declare class UnitConversionFieldComponent extends CrisprControlComponent<UnitConversionFieldConfig> implements OnInit, OnDestroy {
@@ -816,79 +947,6 @@ declare class UnitConversionFieldComponent extends CrisprControlComponent<UnitCo
816
947
  static ɵcmp: i0.ɵɵComponentDeclaration<UnitConversionFieldComponent, "crispr-unit-conversion-field", never, {}, {}, never, never, true, never>;
817
948
  }
818
949
 
819
- declare class AutocompleteChiplistFieldComponent extends AbstractAutocompleteComponent<AutocompleteChiplistFieldConfig> implements OnInit {
820
- defaultConfig: Partial<AutocompleteChiplistFieldConfig>;
821
- chips$: BehaviorSubject<SelectOption[]>;
822
- remainingOptions$: Observable<SelectOption[]>;
823
- selectedChip: SelectOption;
824
- controlValue$: Observable<SelectOption[]>;
825
- chipInput: MatAutocompleteTrigger;
826
- chipInputRef: ElementRef<HTMLInputElement>;
827
- overlayOrigin: CdkOverlayOrigin;
828
- readonly createNewSentinel: symbol;
829
- showCreateForm: i0.WritableSignal<boolean>;
830
- createFormGroup: FormGroup<{}>;
831
- readonly createFormPositions: ConnectionPositionPair[];
832
- get overlayWidth(): number;
833
- ngOnInit(): void;
834
- setControlValue(value: SelectOption[]): void;
835
- handleSelect(event: MatAutocompleteSelectedEvent): void;
836
- openCreateForm(): void;
837
- submitNewChip(): void;
838
- closeCreateForm(): void;
839
- /**
840
- * To follow ARIA standards we want to select the active option on blur.
841
- * matChipInputAddOnBlur should do this but it causes buggy behaviour
842
- * @param event blur event that triggers the handle blur
843
- */
844
- handleTab(_event: FocusEvent): void;
845
- /**
846
- * Handles selection via key tokens passed through separatorKeyCodes property
847
- * NOTE: If TAB is used focus does not move on to next component
848
- * @param event
849
- */
850
- handleTokenEnd(event: MatChipInputEvent): void;
851
- mapToLabel(option: SelectOption): string;
852
- removeChip(removedChip: SelectOption): void;
853
- highlightChip(chip: SelectOption): void;
854
- blurField(): void;
855
- static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteChiplistFieldComponent, never>;
856
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteChiplistFieldComponent, "crispr-autocomplete-chiplist-field", never, {}, {}, never, never, true, never>;
857
- }
858
-
859
- declare class MapFieldComponent extends CrisprControlComponent<MapFieldConfig> {
860
- /**
861
- * The overlay is positioned to align the top-right corner with the origin's bottom-right corner,
862
- * and the top-left corner with the origin's bottom-left corner.
863
- */
864
- overlayPositions: ConnectionPositionPair[];
865
- geoCoder: MapGeocoder;
866
- infoWindow: i0.Signal<MapInfoWindow>;
867
- selectedMarker: i0.WritableSignal<TftMapMarker>;
868
- mapOpen: i0.WritableSignal<boolean>;
869
- mapComponent: i0.Signal<GoogleMap>;
870
- defaultConfig: Partial<MapFieldConfig>;
871
- locationControl: FormControl<string>;
872
- locationGroup: FormGroup<{
873
- location: FormControl<string>;
874
- }>;
875
- locationConfig: AutocompleteFieldConfig;
876
- inputCenter: rxjs.Observable<google.maps.LatLngLiteral>;
877
- currentMap: BehaviorSubject<GoogleMap>;
878
- displayValue: i0.Signal<string>;
879
- currentMarkers: i0.Signal<TftMapMarker[]>;
880
- onMapInit(event: GoogleMap): void;
881
- onMarkerClick(clickedMarker: MapMarker): void;
882
- selectMarker(marker: TftMapMarker): void;
883
- onMove(map: GoogleMap, group: FormGroup): void;
884
- onSelectLocation(suggestion: google.maps.places.AutocompletePrediction): Promise<void>;
885
- openMap(): void;
886
- closeMap(): void;
887
- getDisplay(value: unknown): string;
888
- static ɵfac: i0.ɵɵFactoryDeclaration<MapFieldComponent, never>;
889
- static ɵcmp: i0.ɵɵComponentDeclaration<MapFieldComponent, "crispr-map", never, {}, {}, never, never, true, never>;
890
- }
891
-
892
950
  type CrisprControlComponentType = InputFieldComponent | SelectFieldComponent | RadioFieldComponent | SubGroupComponent | FormGroupListComponent | AutocompleteFieldComponent | AutocompleteChiplistFieldComponent | TextareaFieldComponent | CheckboxFieldComponent | SliderFieldComponent | FileUploadFieldComponent | ImageUploadFieldComponent | DatepickerFieldComponent | UnitConversionFieldComponent | MapFieldComponent;
893
951
  type CrisprFieldComponentType = CrisprControlComponentType | HeadingComponent | DividerComponent | ButtonComponent;
894
952
 
@@ -923,55 +981,23 @@ declare class CrisprDisplayFieldDirective implements OnInit {
923
981
  static ɵdir: i0.ɵɵDirectiveDeclaration<CrisprDisplayFieldDirective, "[crisprDisplayField]", never, { "group": { "alias": "group"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "component": { "alias": "component"; "required": false; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
924
982
  }
925
983
 
926
- /**
927
- * @deprecated SubGroupComponent is now standalone. Import SubGroupComponent directly.
928
- * This module will be removed in the next major version.
929
- */
930
- declare class SubGroupModule {
931
- static ɵfac: i0.ɵɵFactoryDeclaration<SubGroupModule, never>;
932
- static ɵmod: i0.ɵɵNgModuleDeclaration<SubGroupModule, never, [typeof SubGroupComponent], [typeof SubGroupComponent]>;
933
- static ɵinj: i0.ɵɵInjectorDeclaration<SubGroupModule>;
934
- }
935
-
936
984
  declare class InitialControlValuePipe implements PipeTransform {
937
985
  transform(initialFormValue: {
938
986
  [key: string]: ControlValue | any;
939
987
  }, fieldConfig: AnyFieldConfig): unknown;
940
988
  static ɵfac: i0.ɵɵFactoryDeclaration<InitialControlValuePipe, never>;
941
- static ɵpipe: i0.ɵɵPipeDeclaration<InitialControlValuePipe, "initialControlValue", false>;
989
+ static ɵpipe: i0.ɵɵPipeDeclaration<InitialControlValuePipe, "initialControlValue", true>;
942
990
  }
943
991
 
992
+ /**
993
+ * @deprecated Import the standalone InitialControlValuePipe directly.
994
+ * This module will be removed in the next major version.
995
+ */
944
996
  declare class CrisprPipesModule {
945
997
  static ɵfac: i0.ɵɵFactoryDeclaration<CrisprPipesModule, never>;
946
- static ɵmod: i0.ɵɵNgModuleDeclaration<CrisprPipesModule, [typeof InitialControlValuePipe], [typeof i2.CommonModule], [typeof InitialControlValuePipe]>;
998
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CrisprPipesModule, never, [typeof InitialControlValuePipe], [typeof InitialControlValuePipe]>;
947
999
  static ɵinj: i0.ɵɵInjectorDeclaration<CrisprPipesModule>;
948
1000
  }
949
1001
 
950
- declare class CrisprFormComponent implements OnInit {
951
- config: i0.InputSignal<FormConfig<_tft_crispr_forms.AnyFieldConfig>>;
952
- form: i0.InputSignal<FormGroup<any>>;
953
- value: i0.InputSignal<ControlGroupValue>;
954
- submitted: i0.OutputEmitterRef<FormGroup<any>>;
955
- /** Patch form values whenever the [value] input changes without firing valueChanges. */
956
- private patchValueEffect;
957
- valueChanges: i0.OutputRef<any>;
958
- statusChanges: i0.OutputRef<_angular_forms.FormControlStatus>;
959
- submitTrigger: ElementRef<HTMLButtonElement>;
960
- ngOnInit(): void;
961
- handleSubmit(): void;
962
- triggerSubmit(): void;
963
- static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFormComponent, never>;
964
- static ɵcmp: i0.ɵɵComponentDeclaration<CrisprFormComponent, "crispr-form", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "submitted": "submitted"; "valueChanges": "valueChanges"; "statusChanges": "statusChanges"; }, never, never, true, never>;
965
- }
966
-
967
- /**
968
- * @deprecated Use stanadlone CripsrFormComponent
969
- */
970
- declare class CrisprFormsModule {
971
- static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFormsModule, never>;
972
- static ɵmod: i0.ɵɵNgModuleDeclaration<CrisprFormsModule, never, [typeof i2.CommonModule, typeof _angular_forms.ReactiveFormsModule, typeof i3.FormValidationHandlerModule, typeof FormGroupListComponent, typeof FieldContainerComponent, typeof CrisprFieldDirective, typeof CrisprDisplayFieldDirective, typeof SubGroupModule, typeof CrisprPipesModule, typeof CrisprFormComponent], [typeof CrisprFormComponent, typeof FieldContainerComponent]>;
973
- static ɵinj: i0.ɵɵInjectorDeclaration<CrisprFormsModule>;
974
- }
975
-
976
- export { AbstractAutocompleteComponent, ControlType, CrisprControlComponent, CrisprDisplayFieldComponent, CrisprFieldComponent, CrisprFormComponent, CrisprFormsModule, DEFAULT_EMPTY_OPTIONS_MESSAGE, FieldContainerComponent, FileDropzoneDirective, FileUploadFieldComponent, HeadingComponent, InfoComponent, SelectedFileComponent, allowedFileExtValidator, allowedFileType, buildFormGroupFromConfig, callOptionsIfFunction, convertBytesToMb, createControlForType, filterOptionsByLabel, isControlConfig, maxFileSizeValidator, observablifyOptions, valueIn };
1002
+ export { AbstractAutocompleteComponent, AutocompleteChiplistFieldComponent, AutocompleteFieldComponent, ButtonComponent, CheckboxFieldComponent, ControlType, CrisprControlComponent, CrisprDisplayFieldComponent, CrisprDisplayFieldDirective, CrisprFieldComponent, CrisprFieldDirective, CrisprFormComponent, CrisprFormsModule, CrisprPipesModule, DEFAULT_EMPTY_OPTIONS_MESSAGE, DatepickerFieldComponent, DividerComponent, FieldContainerComponent, FileDropzoneDirective, FileUploadFieldComponent, FormGroupListComponent, HeadingComponent, ImageUploadFieldComponent, InfoComponent, InitialControlValuePipe, InputFieldComponent, MapFieldComponent, OptionComponent, RadioFieldComponent, SelectFieldComponent, SelectedFileComponent, SliderFieldComponent, SubGroupComponent, SubGroupModule, TextareaFieldComponent, UnitConversionFieldComponent, allowedFileExtValidator, allowedFileType, buildFormGroupFromConfig, callOptionsIfFunction, convertBytesToMb, createControlForType, filterOptionsByLabel, isControlConfig, maxFileSizeValidator, observablifyOptions, valueIn };
977
1003
  export type { AbstractAutocompleteFieldConfig, AbstractGroupConfig, AbstractUploadComponent, AnyFieldConfig, AutocompleteChiplistFieldConfig, AutocompleteFieldConfig, AutocompleteOptionsCallback, ButtonConfig, ButtonType, CheckboxFieldConfig, ControlGroupValue, ControlValue, CreateChipConfig, CrisprControlConfig, CrisprFieldConfig, DatepickerFieldConfig, DividerConfig, EnabledUploadButtonConfig, FieldDescriptors, FileUploadFieldConfig, FormConfig, FormGroupListConfig, HeadingConfig, ImageProcessingState, ImageUploadFieldConfig, Info, InputFieldConfig, MapFieldConfig, MatFieldProperties, OptionsCallback, OptionsType, RadioFieldConfig, ReactiveOptionsCallback, SelectFieldConfig, SelectOption, SliderFieldConfig, SubGroupConfig, TemplateBuilder, TextareaFieldConfig, TftMapMarker, UnitConversionFieldConfig };