@tft/crispr-forms 13.0.11 → 13.0.14
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/esm2020/lib/field-component-map.const.mjs +5 -2
- package/esm2020/lib/field.directive.mjs +17 -12
- package/esm2020/lib/form/form.component.mjs +4 -6
- package/esm2020/lib/form-group-list/form-group-list.component.mjs +10 -6
- package/fesm2015/tft-crispr-forms.mjs +29 -19
- package/fesm2015/tft-crispr-forms.mjs.map +1 -1
- package/fesm2020/tft-crispr-forms.mjs +29 -19
- package/fesm2020/tft-crispr-forms.mjs.map +1 -1
- package/lib/field-component-map.const.d.ts +4 -2
- package/lib/field.directive.d.ts +8 -4
- package/lib/form/form.component.d.ts +3 -3
- package/lib/form-group-list/form-group-list.component.d.ts +3 -2
- package/package.json +1 -1
- package/tft-crispr-forms-13.0.14.tgz +0 -0
- package/tft-crispr-forms-13.0.11.tgz +0 -0
|
@@ -21,6 +21,8 @@ export declare const FIELD_COMPONENTS: {
|
|
|
21
21
|
unitConversion: Promise<typeof UnitConversionFieldComponent>;
|
|
22
22
|
};
|
|
23
23
|
export declare function isControlComponent(component: CrisprFieldComponent): component is CrisprControlComponent;
|
|
24
|
-
export declare
|
|
24
|
+
export declare function isControlOrButtonComponent(component: CrisprFieldComponent): component is CrisprControlOrButton;
|
|
25
|
+
export declare type CrisprControlOrButton = CrisprControlComponent | ButtonComponent;
|
|
26
|
+
export declare type CrisprControlComponent = InputFieldComponent | SelectFieldComponent | RadioFieldComponent | SubGroupComponent | FormGroupListComponent | AutocompleteFieldComponent | AutocompleteChiplistFieldComponent | TextareaFieldComponent | CheckboxFieldComponent | SliderFieldComponent | FileUploadFieldComponent | ImageUploadFieldComponent | DatepickerFieldComponent | UnitConversionFieldComponent;
|
|
25
27
|
export declare type ComponentKeys = keyof typeof FIELD_COMPONENTS;
|
|
26
|
-
export declare type CrisprFieldComponent = CrisprControlComponent | HeadingComponent | DividerComponent;
|
|
28
|
+
export declare type CrisprFieldComponent = CrisprControlComponent | HeadingComponent | DividerComponent | ButtonComponent;
|
package/lib/field.directive.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewContainerRef,
|
|
1
|
+
import { ViewContainerRef, Renderer2, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import type { AnyFieldConfig, ControlValue } from './models';
|
|
4
4
|
import { CrisprFieldComponent } from './field-component-map.const';
|
|
@@ -7,12 +7,16 @@ import * as i1 from "@angular/common";
|
|
|
7
7
|
export declare class CrisprFieldDirective implements OnInit {
|
|
8
8
|
private container;
|
|
9
9
|
private renderer;
|
|
10
|
-
private cdr;
|
|
11
10
|
config: AnyFieldConfig;
|
|
12
11
|
group: FormGroup;
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* value setter updates the control's value as well
|
|
14
|
+
*/
|
|
15
|
+
_value: ControlValue | any[];
|
|
16
|
+
set value(value: ControlValue | any[]);
|
|
17
|
+
get value(): ControlValue | any[];
|
|
14
18
|
component: CrisprFieldComponent;
|
|
15
|
-
constructor(container: ViewContainerRef, renderer: Renderer2
|
|
19
|
+
constructor(container: ViewContainerRef, renderer: Renderer2);
|
|
16
20
|
ngOnInit(): Promise<void>;
|
|
17
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFieldDirective, never>;
|
|
18
22
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CrisprFieldDirective, "[crisprField]", never, { "config": "config"; "group": "group"; "value": "value"; }, {}, never>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EventEmitter, ElementRef,
|
|
1
|
+
import { EventEmitter, ElementRef, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { ControlGroupValue, FormConfig } from '../models';
|
|
4
4
|
import { Subscription, Observable } from 'rxjs';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class CrisprFormComponent implements
|
|
6
|
+
export declare class CrisprFormComponent implements OnInit {
|
|
7
7
|
config: FormConfig;
|
|
8
8
|
form: FormGroup;
|
|
9
9
|
value: ControlGroupValue;
|
|
@@ -12,7 +12,7 @@ export declare class CrisprFormComponent implements OnChanges {
|
|
|
12
12
|
statusChanges: Observable<string>;
|
|
13
13
|
subs: Subscription[];
|
|
14
14
|
submitTrigger: ElementRef<HTMLButtonElement>;
|
|
15
|
-
|
|
15
|
+
ngOnInit(): void;
|
|
16
16
|
handleSubmit(): void;
|
|
17
17
|
triggerSubmit(): void;
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFormComponent, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnInit, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { FormGroup, FormArray } from '@angular/forms';
|
|
3
3
|
import type { FormGroupListConfig } from '../models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -16,11 +16,12 @@ declare const FormGroupListMixin: {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
export declare class FormGroupListComponent extends FormGroupListMixin implements OnInit {
|
|
19
|
+
private cdr;
|
|
19
20
|
defaultConfig: Partial<FormGroupListConfig>;
|
|
20
21
|
group: FormGroup;
|
|
21
22
|
control: FormArray;
|
|
22
|
-
_value: any[];
|
|
23
23
|
formArray: FormArray;
|
|
24
|
+
constructor(cdr: ChangeDetectorRef);
|
|
24
25
|
ngOnInit(): void;
|
|
25
26
|
setControlValue(values: any[]): void;
|
|
26
27
|
addGroup(value?: any): void;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|