@gravitee/ui-particles-angular 7.25.0 → 7.26.0-json-schema-e93b38b
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/gio-form-headers/gio-form-headers.component.mjs +23 -7
- package/esm2020/lib/gio-form-json-schema/gio-formly-json-schema.service.mjs +17 -1
- package/esm2020/lib/gio-form-json-schema/model/GioJsonSchema.mjs +1 -1
- package/esm2020/lib/gio-form-json-schema/type-component/headers-type.component.mjs +10 -15
- package/esm2020/lib/gio-form-tags-input/gio-form-tags-input.component.mjs +47 -8
- package/fesm2015/gravitee-ui-particles-angular.mjs +91 -27
- package/fesm2015/gravitee-ui-particles-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-particles-angular.mjs +91 -26
- package/fesm2020/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-form-headers/gio-form-headers.component.d.ts +8 -4
- package/lib/gio-form-json-schema/gio-formly-json-schema.service.d.ts +1 -0
- package/lib/gio-form-json-schema/model/GioJsonSchema.d.ts +1 -0
- package/lib/gio-form-json-schema/type-component/headers-type.component.d.ts +2 -4
- package/lib/gio-form-tags-input/gio-form-tags-input.component.d.ts +17 -4
- package/package.json +1 -1
|
@@ -7,11 +7,14 @@ export declare type Header = {
|
|
|
7
7
|
key: string;
|
|
8
8
|
value: string;
|
|
9
9
|
};
|
|
10
|
-
export declare type
|
|
10
|
+
export declare type FormHeaderFieldMapper = {
|
|
11
|
+
keyName: string;
|
|
12
|
+
valueName: string;
|
|
13
|
+
};
|
|
11
14
|
export declare class GioFormHeadersComponent implements OnInit, ControlValueAccessor, Validator {
|
|
12
15
|
private readonly fm;
|
|
13
16
|
private readonly elRef;
|
|
14
|
-
|
|
17
|
+
headerFieldMapper: FormHeaderFieldMapper;
|
|
15
18
|
mainForm: FormGroup;
|
|
16
19
|
headersFormArray: FormArray;
|
|
17
20
|
disabled: boolean;
|
|
@@ -20,8 +23,9 @@ export declare class GioFormHeadersComponent implements OnInit, ControlValueAcce
|
|
|
20
23
|
private _onTouched;
|
|
21
24
|
private filteredHeaderNames;
|
|
22
25
|
constructor(fm: FocusMonitor, elRef: ElementRef);
|
|
23
|
-
writeValue(value:
|
|
26
|
+
writeValue(value: Record<string, string>[] | null): void;
|
|
24
27
|
registerOnChange(fn: (headers: unknown) => void): void;
|
|
28
|
+
private toHeaders;
|
|
25
29
|
registerOnTouched(fn: () => void): void;
|
|
26
30
|
setDisabledState(isDisabled: boolean): void;
|
|
27
31
|
ngOnInit(): void;
|
|
@@ -34,5 +38,5 @@ export declare class GioFormHeadersComponent implements OnInit, ControlValueAcce
|
|
|
34
38
|
private removeLastHeader;
|
|
35
39
|
private _filter;
|
|
36
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioFormHeadersComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GioFormHeadersComponent, "gio-form-headers", never, { "
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GioFormHeadersComponent, "gio-form-headers", never, { "headerFieldMapper": "headerFieldMapper"; }, {}, never, never>;
|
|
38
42
|
}
|
|
@@ -12,6 +12,7 @@ export declare class GioFormlyJsonSchemaService {
|
|
|
12
12
|
private bannerMap;
|
|
13
13
|
private toggleMap;
|
|
14
14
|
private disabledMap;
|
|
15
|
+
private enumLabelMap;
|
|
15
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioFormlyJsonSchemaService, never>;
|
|
16
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<GioFormlyJsonSchemaService>;
|
|
17
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldType, FieldTypeConfig, FormlyFieldProps } from '@ngx-formly/core';
|
|
2
|
-
import {
|
|
2
|
+
import { FormHeaderFieldMapper } from '../../gio-form-headers/gio-form-headers.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
declare type HeadersProps = FormlyFieldProps & {
|
|
5
5
|
outputConfig: {
|
|
@@ -10,9 +10,7 @@ declare type HeadersProps = FormlyFieldProps & {
|
|
|
10
10
|
export declare class GioFjsHeadersTypeComponent extends FieldType<FieldTypeConfig<HeadersProps>> {
|
|
11
11
|
defaultOptions?: Partial<FieldTypeConfig<HeadersProps>> | undefined;
|
|
12
12
|
collapse: boolean;
|
|
13
|
-
get
|
|
14
|
-
[x: string]: string;
|
|
15
|
-
}[]>;
|
|
13
|
+
get outputConfig(): FormHeaderFieldMapper;
|
|
16
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioFjsHeadersTypeComponent, never>;
|
|
17
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<GioFjsHeadersTypeComponent, "gio-fjs-headers-type", never, {}, {}, never, never>;
|
|
18
16
|
}
|
|
@@ -6,6 +6,11 @@ import { MatFormFieldControl } from '@angular/material/form-field';
|
|
|
6
6
|
import { Observable, Subject } from 'rxjs';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare type Tags = Array<string>;
|
|
9
|
+
export declare type AutocompleteOptions = (string | {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
})[];
|
|
13
|
+
export declare type DisplayValueWithFn = (value: string) => Observable<string>;
|
|
9
14
|
export declare class GioFormTagsInputComponent implements MatFormFieldControl<Tags>, ControlValueAccessor, DoCheck, OnDestroy {
|
|
10
15
|
readonly ngControl: NgControl;
|
|
11
16
|
private readonly elRef;
|
|
@@ -28,8 +33,14 @@ export declare class GioFormTagsInputComponent implements MatFormFieldControl<Ta
|
|
|
28
33
|
* called with `true` it will add the tag, otherwise it will just ignore it
|
|
29
34
|
*/
|
|
30
35
|
tagValidationHook: ((tag: string, validationCb: (shouldAddTag: boolean) => void) => void) | undefined;
|
|
31
|
-
set autocompleteOptions(v: string
|
|
32
|
-
_autocompleteOptions?: string
|
|
36
|
+
set autocompleteOptions(v: AutocompleteOptions | ((search: string) => Observable<AutocompleteOptions>) | undefined);
|
|
37
|
+
_autocompleteOptions?: AutocompleteOptions | ((search: string) => Observable<AutocompleteOptions>);
|
|
38
|
+
/**
|
|
39
|
+
* Get the label of an option value.
|
|
40
|
+
* To use with autocompleteOptions label & value mode.
|
|
41
|
+
* Function called each time a tag needs to be displayed id defined.
|
|
42
|
+
*/
|
|
43
|
+
set displayValueWith(displayValueWith: DisplayValueWithFn);
|
|
33
44
|
set tagInput(v: ElementRef<HTMLInputElement> | null);
|
|
34
45
|
private _tagInput;
|
|
35
46
|
get value(): Tags | null;
|
|
@@ -40,7 +51,7 @@ export declare class GioFormTagsInputComponent implements MatFormFieldControl<Ta
|
|
|
40
51
|
get placeholder(): string;
|
|
41
52
|
set placeholder(plh: string);
|
|
42
53
|
private _placeholder;
|
|
43
|
-
autocompleteFilteredOptions$?: Observable<string[]>;
|
|
54
|
+
autocompleteFilteredOptions$?: Observable<Record<string, string>[]>;
|
|
44
55
|
focused: boolean;
|
|
45
56
|
get empty(): boolean;
|
|
46
57
|
get shouldLabelFloat(): boolean;
|
|
@@ -50,6 +61,8 @@ export declare class GioFormTagsInputComponent implements MatFormFieldControl<Ta
|
|
|
50
61
|
get disabled(): boolean;
|
|
51
62
|
set disabled(dis: boolean);
|
|
52
63
|
private _disabled;
|
|
64
|
+
_displayValueWith?: (value: string) => Observable<string>;
|
|
65
|
+
private displayValueCache;
|
|
53
66
|
get errorState(): boolean;
|
|
54
67
|
controlType?: string;
|
|
55
68
|
autofilled?: boolean;
|
|
@@ -71,5 +84,5 @@ export declare class GioFormTagsInputComponent implements MatFormFieldControl<Ta
|
|
|
71
84
|
onMatChipTokenEnd(): void;
|
|
72
85
|
private initAutocomplete;
|
|
73
86
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioFormTagsInputComponent, [{ optional: true; self: true; }, null, null, null]>;
|
|
74
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GioFormTagsInputComponent, "gio-form-tags-input", never, { "ariaLabel": "aria-label"; "addOnBlur": "addOnBlur"; "tagValidationHook": "tagValidationHook"; "autocompleteOptions": "autocompleteOptions"; "placeholder": "placeholder"; "required": "required"; "disabled": "disabled"; }, {}, never, never>;
|
|
87
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GioFormTagsInputComponent, "gio-form-tags-input", never, { "ariaLabel": "aria-label"; "addOnBlur": "addOnBlur"; "tagValidationHook": "tagValidationHook"; "autocompleteOptions": "autocompleteOptions"; "displayValueWith": "displayValueWith"; "placeholder": "placeholder"; "required": "required"; "disabled": "disabled"; }, {}, never, never>;
|
|
75
88
|
}
|