@3kles/kles-material-dynamicforms 21.2.2 → 21.4.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.
package/package.json
CHANGED
|
@@ -150,6 +150,13 @@ interface IKlesStatusOptions {
|
|
|
150
150
|
*/
|
|
151
151
|
resolve?: (value: any, context: unknown | null, field: IKlesFieldConfig, group: UntypedFormGroup) => IKlesStatusDefinition | null;
|
|
152
152
|
}
|
|
153
|
+
interface IKlesFieldUiResolveEvent<TContext = unknown> {
|
|
154
|
+
context: TContext | null;
|
|
155
|
+
field: IKlesFieldConfig;
|
|
156
|
+
group: UntypedFormGroup;
|
|
157
|
+
siblingFields: IKlesFieldConfig[];
|
|
158
|
+
}
|
|
159
|
+
type IKlesFieldUiResolver<TContext = unknown> = (event: IKlesFieldUiResolveEvent<TContext>) => Partial<Omit<IKlesFieldUi, 'resolveUi'>>;
|
|
153
160
|
interface IKlesFieldUi {
|
|
154
161
|
inputType?: 'text' | 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'time' | 'url' | 'week';
|
|
155
162
|
min?: number | Date;
|
|
@@ -188,6 +195,7 @@ interface IKlesFieldUi {
|
|
|
188
195
|
tooltip?: string;
|
|
189
196
|
imageUrl?: string;
|
|
190
197
|
imageAlt?: string;
|
|
198
|
+
resolveUi?: IKlesFieldUiResolver;
|
|
191
199
|
}
|
|
192
200
|
interface IKlesFormField {
|
|
193
201
|
type?: EnumType;
|
|
@@ -280,6 +288,7 @@ declare class GroupUiState<TUiState extends {
|
|
|
280
288
|
declare class KlesDynamicFormComponent implements OnInit, OnChanges {
|
|
281
289
|
private fb;
|
|
282
290
|
private ref;
|
|
291
|
+
context: Signal<unknown | null> | null;
|
|
283
292
|
fields: IKlesFieldConfig[];
|
|
284
293
|
validators: IKlesValidator<ValidatorFn>[];
|
|
285
294
|
asyncValidators: IKlesValidator<AsyncValidatorFn>[];
|
|
@@ -306,7 +315,7 @@ declare class KlesDynamicFormComponent implements OnInit, OnChanges {
|
|
|
306
315
|
private validateAllFormFields;
|
|
307
316
|
private createUi;
|
|
308
317
|
static ɵfac: i0.ɵɵFactoryDeclaration<KlesDynamicFormComponent, never>;
|
|
309
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KlesDynamicFormComponent, "app-kles-dynamic-form", ["klesDynamicForm"], { "fields": { "alias": "fields"; "required": false; }; "validators": { "alias": "validators"; "required": false; }; "asyncValidators": { "alias": "asyncValidators"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "formClass": { "alias": "formClass"; "required": false; }; }, { "submit": "submit"; "_onLoaded": "_onLoaded"; }, never, never, true, never>;
|
|
318
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KlesDynamicFormComponent, "app-kles-dynamic-form", ["klesDynamicForm"], { "context": { "alias": "context"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "validators": { "alias": "validators"; "required": false; }; "asyncValidators": { "alias": "asyncValidators"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "formClass": { "alias": "formClass"; "required": false; }; }, { "submit": "submit"; "_onLoaded": "_onLoaded"; }, never, never, true, never>;
|
|
310
319
|
}
|
|
311
320
|
|
|
312
321
|
declare class KlesComponentDirective implements OnInit, OnChanges {
|
|
@@ -330,6 +339,7 @@ declare class KlesDynamicFieldDirective<T extends IKlesFieldConfig = IKlesFieldC
|
|
|
330
339
|
group: UntypedFormGroup;
|
|
331
340
|
ui: GroupUiState;
|
|
332
341
|
siblingFields: T[];
|
|
342
|
+
context: Signal<unknown | null> | null;
|
|
333
343
|
componentRef: ComponentRef<any> | undefined;
|
|
334
344
|
subComponents: ComponentRef<any>[];
|
|
335
345
|
constructor(container: ViewContainerRef, injector: Injector);
|
|
@@ -341,7 +351,7 @@ declare class KlesDynamicFieldDirective<T extends IKlesFieldConfig = IKlesFieldC
|
|
|
341
351
|
protected findComponent(): Type<any> | undefined;
|
|
342
352
|
private createSubComponent;
|
|
343
353
|
static ɵfac: i0.ɵɵFactoryDeclaration<KlesDynamicFieldDirective<any>, never>;
|
|
344
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<KlesDynamicFieldDirective<any>, "[klesDynamicField]", never, { "field": { "alias": "field"; "required": false; }; "group": { "alias": "group"; "required": false; }; "ui": { "alias": "ui"; "required": false; }; "siblingFields": { "alias": "siblingFields"; "required": false; }; }, {}, never, never, true, never>;
|
|
354
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KlesDynamicFieldDirective<any>, "[klesDynamicField]", never, { "field": { "alias": "field"; "required": false; }; "group": { "alias": "group"; "required": false; }; "ui": { "alias": "ui"; "required": false; }; "siblingFields": { "alias": "siblingFields"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, {}, never, never, true, never>;
|
|
345
355
|
}
|
|
346
356
|
|
|
347
357
|
declare abstract class KlesFieldAbstract<TContext = unknown> implements IKlesField, OnInit, AfterViewInit, OnDestroy {
|
|
@@ -351,25 +361,26 @@ declare abstract class KlesFieldAbstract<TContext = unknown> implements IKlesFie
|
|
|
351
361
|
readonly ui: GroupUiState<any>;
|
|
352
362
|
readonly context: Signal<TContext | null> | null;
|
|
353
363
|
protected readonly fieldUi: Signal<any>;
|
|
354
|
-
readonly
|
|
355
|
-
readonly
|
|
356
|
-
readonly
|
|
357
|
-
readonly
|
|
358
|
-
readonly
|
|
359
|
-
readonly
|
|
364
|
+
protected readonly resolvedFieldUi: Signal<IKlesFieldUi>;
|
|
365
|
+
readonly appearance: Signal<"fill" | "outline">;
|
|
366
|
+
readonly inputType: Signal<"number" | "date" | "email" | "submit" | "search" | "reset" | "text" | "file" | "button" | "checkbox" | "time" | "color" | "range" | "datetime-local" | "hidden" | "image" | "month" | "password" | "radio" | "tel" | "url" | "week">;
|
|
367
|
+
readonly min: Signal<number | Date>;
|
|
368
|
+
readonly max: Signal<number | Date>;
|
|
369
|
+
readonly maxLength: Signal<number>;
|
|
370
|
+
readonly step: Signal<number>;
|
|
360
371
|
readonly ngClass: Signal<any>;
|
|
361
372
|
readonly ngStyle: Signal<any>;
|
|
362
|
-
readonly indeterminate: Signal<
|
|
363
|
-
readonly color: Signal<
|
|
364
|
-
readonly icon: Signal<
|
|
365
|
-
readonly iconSvg: Signal<
|
|
366
|
-
readonly buttonAppearance: Signal<
|
|
367
|
-
readonly label: Signal<
|
|
368
|
-
readonly hint: Signal<
|
|
373
|
+
readonly indeterminate: Signal<boolean>;
|
|
374
|
+
readonly color: Signal<string>;
|
|
375
|
+
readonly icon: Signal<string>;
|
|
376
|
+
readonly iconSvg: Signal<string>;
|
|
377
|
+
readonly buttonAppearance: Signal<i3.MatButtonAppearance>;
|
|
378
|
+
readonly label: Signal<string>;
|
|
379
|
+
readonly hint: Signal<string>;
|
|
369
380
|
readonly placeholder: Signal<any>;
|
|
370
|
-
readonly tooltip: Signal<
|
|
371
|
-
readonly imageUrl: Signal<
|
|
372
|
-
readonly imageAlt: Signal<
|
|
381
|
+
readonly tooltip: Signal<string>;
|
|
382
|
+
readonly imageUrl: Signal<string>;
|
|
383
|
+
readonly imageAlt: Signal<string>;
|
|
373
384
|
protected readonly viewRef: ViewContainerRef;
|
|
374
385
|
directive: any;
|
|
375
386
|
protected _onDestroy: Subject<void>;
|
|
@@ -1074,7 +1085,7 @@ declare class KlesFormActionMenuComponent<TContext = unknown> extends KlesFieldA
|
|
|
1074
1085
|
readonly actions: i0.Signal<KlesActionMenuItem<TContext>[]>;
|
|
1075
1086
|
readonly disabled: i0.Signal<boolean>;
|
|
1076
1087
|
readonly visibleActions: i0.Signal<KlesActionMenuItem<TContext>[]>;
|
|
1077
|
-
readonly ariaLabel: i0.Signal<
|
|
1088
|
+
readonly ariaLabel: i0.Signal<string>;
|
|
1078
1089
|
onTriggerClick(event: MouseEvent): void;
|
|
1079
1090
|
isDisabled(action: KlesActionMenuItem<TContext>): boolean;
|
|
1080
1091
|
execute(action: KlesActionMenuItem<TContext>, event: MouseEvent): void;
|
|
@@ -1146,7 +1157,7 @@ declare class KlesFormStatusComponent<TContext = unknown> extends KlesFieldAbstr
|
|
|
1146
1157
|
private readonly control;
|
|
1147
1158
|
private readonly controlValue;
|
|
1148
1159
|
private readonly controlStatus;
|
|
1149
|
-
readonly
|
|
1160
|
+
readonly statusAppearance: i0.Signal<_3kles_kles_material_dynamicforms.KlesStatusAppearance>;
|
|
1150
1161
|
readonly showDot: i0.Signal<boolean>;
|
|
1151
1162
|
readonly disabled: i0.Signal<boolean>;
|
|
1152
1163
|
readonly pending: i0.Signal<boolean>;
|
|
@@ -1277,4 +1288,4 @@ declare const FIELD: InjectionToken<IKlesFieldConfig>;
|
|
|
1277
1288
|
declare const FIELD_CONTEXT: InjectionToken<Signal<unknown>>;
|
|
1278
1289
|
|
|
1279
1290
|
export { AbstractUiState, ArrayFormatPipe, ArrayUiState, ControlUiState, EnumType, FIELD, FIELD_CONTEXT, FIELD_NAME, FieldMapper, GROUP, GROUP_UI, GroupUiState, KlesAbstractFormControl, KlesAbstractFormUiControl, KlesButtonBase, KlesButtonCheckerComponent, KlesButtonComponent, KlesButtonFileComponent, KlesComponentDirective, KlesCurrencyValueAccessorDirective, KlesDynamicFieldDirective, KlesDynamicFormComponent, KlesDynamicFormIntl, KlesFabComponent, KlesFieldAbstract, KlesFileControlComponent, KlesFormActionMenuComponent, KlesFormArray, KlesFormArrayComponent, KlesFormBadgeComponent, KlesFormButtonCheckerComponent, KlesFormButtonComponent, KlesFormButtonFileComponent, KlesFormButtonToogleGroupComponent, KlesFormCheckboxComponent, KlesFormCheckboxIndeterminateComponent, KlesFormChipComponent, KlesFormClearComponent, KlesFormColorComponent, KlesFormControl, KlesFormCopyComponent, KlesFormCurrencyComponent, KlesFormDateComponent, KlesFormDateTimeComponent, KlesFormErrorStateMatcher, KlesFormFabComponent, KlesFormFileComponent, KlesFormGroup, KlesFormGroupComponent, KlesFormIconButtonComponent, KlesFormIconComponent, KlesFormInputClearableComponent, KlesFormInputComponent, KlesFormLabelComponent, KlesFormLineBreakComponent, KlesFormLinkComponent, KlesFormListFieldComponent, KlesFormMiniFabComponent, KlesFormPasswordVisibilityComponent, KlesFormRadioComponent, KlesFormRange, KlesFormRangeComponent, KlesFormSelectComponent, KlesFormSelectLazySearchComponent, KlesFormSelectSearchComponent, KlesFormSelectionListComponent, KlesFormSelectionListSearchComponent, KlesFormSlideToggleComponent, KlesFormStatusComponent, KlesFormTextComponent, KlesFormTextareaComponent, KlesFormTileComponent, KlesFormUiArray, KlesFormUiControl, KlesFormUiGroup, KlesIconButtonComponent, KlesIndeterminateCheckboxComponent, KlesMaterialDynamicformsModule, KlesMiniFabComponent, KlesSelectionModel, KlesTransformPipe, MatErrorFormDirective, MatErrorMessageDirective, SIBLING_FIELDS, autocompleteObjectValidator, autocompleteStringValidator, componentMapper, isDestroyable, klesFieldControlFactory, klesFieldUiFactory };
|
|
1280
|
-
export type { Destroyable, IButton, IButtonChecker, IButtonFile, IKlesClearControl, IKlesComponent, IKlesControl, IKlesCurrencyOptions, IKlesDirective, IKlesField, IKlesFieldActionEvent, IKlesFieldConfig, IKlesFieldUi, IKlesFormField, IKlesStatusDefinition, IKlesStatusOptions, IKlesUi, IKlesValidator, IUIButton, KlesActionMenuCondition, KlesActionMenuFieldConfig, KlesActionMenuItem, KlesStatusAppearance, KlesStatusTone, KlesValidationKey };
|
|
1291
|
+
export type { Destroyable, IButton, IButtonChecker, IButtonFile, IKlesClearControl, IKlesComponent, IKlesControl, IKlesCurrencyOptions, IKlesDirective, IKlesField, IKlesFieldActionEvent, IKlesFieldConfig, IKlesFieldUi, IKlesFieldUiResolveEvent, IKlesFieldUiResolver, IKlesFormField, IKlesStatusDefinition, IKlesStatusOptions, IKlesUi, IKlesValidator, IUIButton, KlesActionMenuCondition, KlesActionMenuFieldConfig, KlesActionMenuItem, KlesStatusAppearance, KlesStatusTone, KlesValidationKey };
|