ui-core-abv 0.6.72 → 0.6.76
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/ui-core-abv.mjs +191 -18
- package/fesm2022/ui-core-abv.mjs.map +1 -1
- package/lib/components/dynamic-form/form/dynamic-form.component.d.ts +9 -2
- package/lib/components/dynamic-form/form.models.d.ts +1 -0
- package/lib/components/user-formbuilder/block-editor/field-editor/field-editor.component.d.ts +5 -0
- package/lib/components/user-formbuilder/form-preview/form-preview.component.d.ts +4 -1
- package/lib/components/user-formbuilder/user-formbuilder.component.d.ts +4 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { NgZone, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ButtonColor } from '../../button/button.component';
|
|
5
|
-
import { FormField } from '../form.models';
|
|
5
|
+
import { FormField, SelectOptionsResolver } from '../form.models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
interface DynamicFieldState {
|
|
8
8
|
field: FormField;
|
|
@@ -33,6 +33,7 @@ export declare class UicDynamicFormComponent implements OnDestroy {
|
|
|
33
33
|
voiceToTextSilenceMs: number;
|
|
34
34
|
cols: number;
|
|
35
35
|
fileUidResolverFn?: (fileUid: string) => void;
|
|
36
|
+
selectOptionsResolver?: SelectOptionsResolver;
|
|
36
37
|
listeningField: string | null;
|
|
37
38
|
readonly fieldStates: import("@angular/core").Signal<DynamicFieldState[]>;
|
|
38
39
|
readonly visibleFieldStates: import("@angular/core").Signal<DynamicFieldState[]>;
|
|
@@ -54,10 +55,16 @@ export declare class UicDynamicFormComponent implements OnDestroy {
|
|
|
54
55
|
getSearcherFn(field: FormField): ((query: string) => Observable<any[]>) | undefined;
|
|
55
56
|
getSearcherDisplayFn(field: FormField): ((item: any) => string) | undefined;
|
|
56
57
|
getSearcherIsEnabledFn(field: FormField): ((item: any) => boolean) | undefined;
|
|
58
|
+
private toObservable;
|
|
59
|
+
private getOptionsSourceText;
|
|
60
|
+
private renderOptionsSourceTemplate;
|
|
61
|
+
private getValueByPath;
|
|
62
|
+
private toNestedValues;
|
|
63
|
+
private setNestedValue;
|
|
57
64
|
private clearVoiceStopTimer;
|
|
58
65
|
private scheduleVoiceStop;
|
|
59
66
|
voiceToText(target: HTMLTextAreaElement, fieldName: string): void;
|
|
60
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<UicDynamicFormComponent, never>;
|
|
61
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UicDynamicFormComponent, "ui-dynamic-form", never, { "fields": { "alias": "fields"; "required": false; }; "form": { "alias": "form"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; "voiceToTextSilenceMs": { "alias": "voiceToTextSilenceMs"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "fileUidResolverFn": { "alias": "fileUidResolverFn"; "required": false; }; }, {}, never, never, true, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UicDynamicFormComponent, "ui-dynamic-form", never, { "fields": { "alias": "fields"; "required": false; }; "form": { "alias": "form"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; "voiceToTextSilenceMs": { "alias": "voiceToTextSilenceMs"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "fileUidResolverFn": { "alias": "fileUidResolverFn"; "required": false; }; "selectOptionsResolver": { "alias": "selectOptionsResolver"; "required": false; }; }, {}, never, never, true, never>;
|
|
62
69
|
}
|
|
63
70
|
export {};
|
|
@@ -30,6 +30,7 @@ export interface SelectOptionsContext {
|
|
|
30
30
|
field: FormField;
|
|
31
31
|
values: uicFormValuesRecord;
|
|
32
32
|
dependencyValue?: any;
|
|
33
|
+
query?: string;
|
|
33
34
|
}
|
|
34
35
|
export type SelectOptionsResolver = (source: SelectOptionsSource, context: SelectOptionsContext) => AppSelectOption[] | unknown[] | Promise<AppSelectOption[] | unknown[]> | Observable<AppSelectOption[] | unknown[]>;
|
|
35
36
|
export interface FormField {
|
package/lib/components/user-formbuilder/block-editor/field-editor/field-editor.component.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare class FieldEditorComponent {
|
|
|
7
7
|
private readonly elementRef;
|
|
8
8
|
private currentFieldCode;
|
|
9
9
|
hasOptions: import("@angular/core").Signal<boolean>;
|
|
10
|
+
hasOptionsSourceConfig: import("@angular/core").Signal<boolean>;
|
|
11
|
+
hasExternalOptionsSource: import("@angular/core").Signal<boolean>;
|
|
10
12
|
config: import("@angular/core").InputSignal<EditableField>;
|
|
11
13
|
focusRequiredField: import("@angular/core").InputSignal<boolean>;
|
|
12
14
|
options: import("@angular/core").InputSignal<Record<string, AppSelectOption[]>>;
|
|
@@ -14,6 +16,7 @@ export declare class FieldEditorComponent {
|
|
|
14
16
|
fieldChange: import("@angular/core").OutputEmitterRef<FormField>;
|
|
15
17
|
localField: import("@angular/core").WritableSignal<FormField>;
|
|
16
18
|
requiredFields: FormField[];
|
|
19
|
+
optionsSourceFields: import("@angular/core").Signal<FormField[]>;
|
|
17
20
|
advancedFields: import("@angular/core").Signal<FormField[]>;
|
|
18
21
|
styleFields: import("@angular/core").Signal<FormField[]>;
|
|
19
22
|
branchFields: FormField[];
|
|
@@ -32,6 +35,8 @@ export declare class FieldEditorComponent {
|
|
|
32
35
|
private buildRequiredFields;
|
|
33
36
|
private buildDesignBlocks;
|
|
34
37
|
private buildAdvancedBlocks;
|
|
38
|
+
private buildOptionsSourceFields;
|
|
39
|
+
private prepareOptionsSourceField;
|
|
35
40
|
private buildBranchFields;
|
|
36
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldEditorComponent, never>;
|
|
37
42
|
static ɵcmp: i0.ɵɵComponentDeclaration<FieldEditorComponent, "lib-field-editor", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "focusRequiredField": { "alias": "focusRequiredField"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "fieldChange": "fieldChange"; }, never, never, true, never>;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { FormResult, FormSchema } from '../../dynamic-form/form.models';
|
|
1
|
+
import { FormResult, FormSchema, SelectOptionsResolver } from '../../dynamic-form/form.models';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class FormPreviewComponent {
|
|
4
4
|
data: {
|
|
5
5
|
schema: FormSchema;
|
|
6
|
+
selectOptionsResolver?: SelectOptionsResolver;
|
|
6
7
|
};
|
|
7
8
|
schema: FormSchema;
|
|
9
|
+
selectOptionsResolver?: SelectOptionsResolver;
|
|
8
10
|
constructor(data: {
|
|
9
11
|
schema: FormSchema;
|
|
12
|
+
selectOptionsResolver?: SelectOptionsResolver;
|
|
10
13
|
});
|
|
11
14
|
save(fr: FormResult): void;
|
|
12
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormPreviewComponent, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldConfig, FormField, FormSchema } from '../dynamic-form/form.models';
|
|
1
|
+
import { FieldConfig, FormField, FormSchema, SelectOptionsResolver } from '../dynamic-form/form.models';
|
|
2
2
|
import { AppSelectOption } from '../inputs/select/select.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export type EditableField = {
|
|
@@ -27,6 +27,8 @@ export declare class UicUserFormbuilderComponent {
|
|
|
27
27
|
private readonly translateService;
|
|
28
28
|
disabled: boolean;
|
|
29
29
|
formTitle: string;
|
|
30
|
+
optionSources: AppSelectOption[];
|
|
31
|
+
selectOptionsResolver?: SelectOptionsResolver;
|
|
30
32
|
readOnly: import("@angular/core").InputSignal<boolean>;
|
|
31
33
|
editableFormInput: import("@angular/core").InputSignal<EditableForm>;
|
|
32
34
|
submitFormRequest: import("@angular/core").OutputEmitterRef<EditableForm>;
|
|
@@ -67,5 +69,5 @@ export declare class UicUserFormbuilderComponent {
|
|
|
67
69
|
private prepareFieldDataForSubmit;
|
|
68
70
|
private deepClone;
|
|
69
71
|
static ɵfac: i0.ɵɵFactoryDeclaration<UicUserFormbuilderComponent, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UicUserFormbuilderComponent, "ui-user-formbuilder", never, { "disabled": { "alias": "disabled"; "required": false; }; "formTitle": { "alias": "formTitle"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "editableFormInput": { "alias": "editableForm"; "required": false; "isSignal": true; }; }, { "submitFormRequest": "submitFormRequest"; }, never, never, true, never>;
|
|
72
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UicUserFormbuilderComponent, "ui-user-formbuilder", never, { "disabled": { "alias": "disabled"; "required": false; }; "formTitle": { "alias": "formTitle"; "required": false; }; "optionSources": { "alias": "optionSources"; "required": false; }; "selectOptionsResolver": { "alias": "selectOptionsResolver"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "editableFormInput": { "alias": "editableForm"; "required": false; "isSignal": true; }; }, { "submitFormRequest": "submitFormRequest"; }, never, never, true, never>;
|
|
71
73
|
}
|