@dereekb/dbx-form 12.6.21 → 12.7.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/esm2022/lib/form/action/form.action.dialog.component.mjs +6 -10
- package/esm2022/lib/form/action/form.action.directive.mjs +14 -13
- package/esm2022/lib/form/io/form.change.directive.mjs +9 -7
- package/esm2022/lib/form/io/form.input.directive.mjs +8 -9
- package/esm2022/lib/form/io/form.loading.directive.mjs +6 -7
- package/esm2022/lib/formly/field/checklist/checklist.item.field.component.mjs +8 -7
- package/esm2022/lib/formly/field/wrapper/working.wrapper.component.mjs +2 -2
- package/esm2022/lib/formly/form/search.form.component.mjs +1 -1
- package/esm2022/lib/formly/formly.context.directive.mjs +1 -1
- package/esm2022/lib/formly/formly.directive.mjs +8 -13
- package/esm2022/lib/formly/formly.form.component.mjs +18 -19
- package/fesm2022/dereekb-dbx-form.mjs +61 -71
- package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
- package/lib/form/action/form.action.dialog.component.d.ts +2 -3
- package/lib/form/action/form.action.directive.d.ts +4 -5
- package/lib/form/io/form.change.directive.d.ts +3 -3
- package/lib/form/io/form.input.directive.d.ts +2 -3
- package/lib/form/io/form.loading.directive.d.ts +1 -3
- package/lib/formly/field/checklist/checklist.item.field.component.d.ts +2 -2
- package/lib/formly/field/wrapper/working.wrapper.component.d.ts +1 -1
- package/lib/formly/form/search.form.component.d.ts +1 -2
- package/lib/formly/formly.context.directive.d.ts +1 -2
- package/lib/formly/formly.directive.d.ts +7 -9
- package/lib/formly/formly.form.component.d.ts +3 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractDialogDirective, DbxButtonStyle } from '@dereekb/dbx-web';
|
|
3
3
|
import { MatDialog, MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
|
|
4
4
|
import { Maybe } from '@dereekb/util';
|
|
@@ -34,7 +34,7 @@ export interface DbxFormActionDialogComponentConfig<O> {
|
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
*/
|
|
37
|
-
export declare class DbxFormActionDialogComponent<O> extends AbstractDialogDirective<O, DbxFormActionDialogComponentConfig<O>> implements OnInit
|
|
37
|
+
export declare class DbxFormActionDialogComponent<O> extends AbstractDialogDirective<O, DbxFormActionDialogComponentConfig<O>> implements OnInit {
|
|
38
38
|
private readonly _fieldsSub;
|
|
39
39
|
readonly context: DbxFormlyContext<O>;
|
|
40
40
|
readonly fields$: import("rxjs").Observable<FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
@@ -55,7 +55,6 @@ export declare class DbxFormActionDialogComponent<O> extends AbstractDialogDirec
|
|
|
55
55
|
fab?: boolean;
|
|
56
56
|
};
|
|
57
57
|
ngOnInit(): void;
|
|
58
|
-
ngOnDestroy(): void;
|
|
59
58
|
readonly handleSubmitValue: WorkUsingContext<O>;
|
|
60
59
|
static openDialogWithForm<O>(matDialog: MatDialog, config: DbxFormActionDialogComponentConfig<O>): MatDialogRef<DbxFormActionDialogComponent<O>, Maybe<O>>;
|
|
61
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormActionDialogComponent<any>, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OnInit
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { DbxActionContextStoreSourceInstance, DbxActionValueGetterResult } from '@dereekb/dbx-core';
|
|
4
|
-
import {
|
|
4
|
+
import { IsModifiedFunction, IsValidFunction, ObservableOrValue, IsEqualFunction } from '@dereekb/rxjs';
|
|
5
5
|
import { DbxMutableForm } from '../../form/form';
|
|
6
6
|
import { IsModified, IsValid, MapFunction, Maybe } from '@dereekb/util';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
@@ -14,10 +14,10 @@ export type DbxActionFormMapValueFunction<T, O> = MapFunction<T, ObservableOrVal
|
|
|
14
14
|
*
|
|
15
15
|
* If the source is not considered modified, the trigger will be ignored.
|
|
16
16
|
*/
|
|
17
|
-
export declare class DbxActionFormDirective<T = object, O = T> implements OnInit
|
|
17
|
+
export declare class DbxActionFormDirective<T = object, O = T> implements OnInit {
|
|
18
18
|
readonly form: DbxMutableForm<any>;
|
|
19
19
|
readonly source: DbxActionContextStoreSourceInstance<O, unknown>;
|
|
20
|
-
readonly lockSet: LockSet;
|
|
20
|
+
readonly lockSet: import("@dereekb/rxjs").LockSet;
|
|
21
21
|
/**
|
|
22
22
|
* Whether or not to disable the form while the action is working.
|
|
23
23
|
*
|
|
@@ -52,7 +52,6 @@ export declare class DbxActionFormDirective<T = object, O = T> implements OnInit
|
|
|
52
52
|
private readonly _isWorkingSub;
|
|
53
53
|
constructor();
|
|
54
54
|
ngOnInit(): void;
|
|
55
|
-
ngOnDestroy(): void;
|
|
56
55
|
checkIsValidAndIsModified(value: T, overrides?: CheckValidAndModifiedOverrides<T>): Observable<[IsValid, IsModified]>;
|
|
57
56
|
protected preCheckReadyValue(value: T): Observable<[IsValid, IsModified]>;
|
|
58
57
|
protected readyValue(value: T): Observable<DbxActionValueGetterResult<O>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { OnInit
|
|
2
|
-
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
3
2
|
import { type Maybe } from '@dereekb/util';
|
|
4
3
|
import { DbxForm } from '../form';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
@@ -8,9 +7,10 @@ import * as i0 from "@angular/core";
|
|
|
8
7
|
*
|
|
9
8
|
* Emits undefined when the form is incomplete, and the value when the form is complete.
|
|
10
9
|
*/
|
|
11
|
-
export declare class DbxFormValueChangeDirective<T>
|
|
10
|
+
export declare class DbxFormValueChangeDirective<T> implements OnInit {
|
|
12
11
|
readonly form: DbxForm<any>;
|
|
13
12
|
readonly dbxFormValueChange: import("@angular/core").OutputEmitterRef<Maybe<T>>;
|
|
13
|
+
protected readonly _sub: import("dist/packages/rxjs/src").SubscriptionObject<import("rxjs").Unsubscribable>;
|
|
14
14
|
ngOnInit(): void;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormValueChangeDirective<any>, never>;
|
|
16
16
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormValueChangeDirective<any>, "[dbxFormValueChange]", never, {}, { "dbxFormValueChange": "dbxFormValueChange"; }, never, never, true, never>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { OnDestroy } from '@angular/core';
|
|
3
|
-
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
4
2
|
import { DbxFormStateRef, DbxMutableForm } from '../form';
|
|
5
3
|
import { type Maybe } from '@dereekb/util';
|
|
6
4
|
import { ObservableOrValue } from '@dereekb/rxjs';
|
|
@@ -18,10 +16,11 @@ export type DbxFormSourceDirectiveMode = 'reset' | 'always' | 'every';
|
|
|
18
16
|
/**
|
|
19
17
|
* Used with a FormComponent to set the value based on the input value.
|
|
20
18
|
*/
|
|
21
|
-
export declare class DbxFormSourceDirective<T = unknown>
|
|
19
|
+
export declare class DbxFormSourceDirective<T = unknown> {
|
|
22
20
|
readonly form: DbxMutableForm<any>;
|
|
23
21
|
readonly dbxFormSourceMode: import("@angular/core").InputSignal<Maybe<DbxFormSourceDirectiveMode>>;
|
|
24
22
|
readonly dbxFormSource: import("@angular/core").InputSignal<Maybe<ObservableOrValue<Maybe<Partial<T>>>>>;
|
|
23
|
+
protected readonly _effectSub: import("@dereekb/rxjs").SubscriptionObject<import("rxjs").Unsubscribable>;
|
|
25
24
|
protected readonly _setFormSourceObservableEffect: import("@angular/core").EffectRef;
|
|
26
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormSourceDirective<any>, never>;
|
|
27
26
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormSourceDirective<any>, "[dbxFormSource]", never, { "dbxFormSourceMode": { "alias": "dbxFormSourceMode"; "required": false; "isSignal": true; }; "dbxFormSource": { "alias": "dbxFormSource"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { OnDestroy } from '@angular/core';
|
|
3
|
-
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
4
2
|
import { DbxMutableForm } from '../../form/form';
|
|
5
3
|
import { LoadingState, MaybeObservableOrValue } from '@dereekb/rxjs';
|
|
6
4
|
import { DbxFormSourceDirectiveMode } from './form.input.directive';
|
|
@@ -11,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
11
9
|
*
|
|
12
10
|
* Only passes non-null values from the source.
|
|
13
11
|
*/
|
|
14
|
-
export declare class DbxFormLoadingSourceDirective<T extends object = object>
|
|
12
|
+
export declare class DbxFormLoadingSourceDirective<T extends object = object> {
|
|
15
13
|
readonly form: DbxMutableForm<any>;
|
|
16
14
|
readonly dbxFormLoadingSourceMode: import("@angular/core").InputSignalWithTransform<DbxFormSourceDirectiveMode, Maybe<DbxFormSourceDirectiveMode>>;
|
|
17
15
|
readonly dbxFormLoadingSource: import("@angular/core").InputSignal<MaybeObservableOrValue<LoadingState<T>>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { OnInit, Type } from '@angular/core';
|
|
2
|
-
import { DbxInjectionComponentConfig
|
|
2
|
+
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ValidationErrors, FormGroup } from '@angular/forms';
|
|
5
5
|
import { FieldType, FieldTypeConfig, FormlyFieldProps } from '@ngx-formly/core';
|
|
6
6
|
import { ChecklistItemFieldDisplayComponent, ChecklistItemDisplayContent } from './checklist.item';
|
|
7
7
|
import { type Maybe } from '@dereekb/util';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class DbxChecklistItemContentComponent<T = unknown>
|
|
9
|
+
export declare class DbxChecklistItemContentComponent<T = unknown> {
|
|
10
10
|
readonly checklistItemFieldComponent: DbxChecklistItemFieldComponent<any>;
|
|
11
11
|
readonly config: DbxInjectionComponentConfig<ChecklistItemFieldDisplayComponent<T>>;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxChecklistItemContentComponent<any>, never>;
|
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
*/
|
|
8
8
|
export type DbxFormWorkingWrapperConfig = object;
|
|
9
9
|
/**
|
|
10
|
-
* Adds a loading bar to help signify
|
|
10
|
+
* Adds a loading bar to help signify asynchronous work is occuring.
|
|
11
11
|
*
|
|
12
12
|
* By default shows loading during asynchronous validation of a field (FormControl status is "PENDING")
|
|
13
13
|
*/
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { OnDestroy } from '@angular/core';
|
|
2
1
|
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
import { AbstractConfigAsyncFormlyFormDirective } from '../formly.directive';
|
|
5
4
|
import { DbxFormSearchFormFieldsConfig, DbxFormSearchFormFieldsValue } from './form.form';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class DbxFormSearchFormComponent extends AbstractConfigAsyncFormlyFormDirective<DbxFormSearchFormFieldsValue, DbxFormSearchFormFieldsConfig>
|
|
6
|
+
export declare class DbxFormSearchFormComponent extends AbstractConfigAsyncFormlyFormDirective<DbxFormSearchFormFieldsValue, DbxFormSearchFormFieldsConfig> {
|
|
8
7
|
readonly search: import("@angular/core").OutputEmitterRef<string>;
|
|
9
8
|
readonly fields$: Observable<FormlyFieldConfig[]>;
|
|
10
9
|
searchChanged(value: DbxFormSearchFormFieldsValue): void;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
2
|
-
import { OnDestroy } from '@angular/core';
|
|
3
2
|
import { AbstractAsyncFormlyFormDirective } from './formly.directive';
|
|
4
3
|
import { type Maybe } from '@dereekb/util';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
/**
|
|
7
6
|
* Provides an DbxFormlyContext and has an input for fields.
|
|
8
7
|
*/
|
|
9
|
-
export declare class DbxFormlyFieldsContextDirective<T = unknown> extends AbstractAsyncFormlyFormDirective<T>
|
|
8
|
+
export declare class DbxFormlyFieldsContextDirective<T = unknown> extends AbstractAsyncFormlyFormDirective<T> {
|
|
10
9
|
readonly fields: import("@angular/core").InputSignal<Maybe<FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
11
10
|
[additionalProperties: string]: any;
|
|
12
11
|
}>[]>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MaybeObservableOrValue } from '@dereekb/rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
4
|
-
import { OnInit
|
|
4
|
+
import { OnInit } from '@angular/core';
|
|
5
5
|
import { DbxFormlyContext } from './formly.context';
|
|
6
6
|
import { type Maybe } from '@dereekb/util';
|
|
7
7
|
import { DbxFormDisabledKey } from '../form/form';
|
|
@@ -11,11 +11,10 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
*
|
|
12
12
|
* The implementing component should use provideFormlyContext() to provide the DbxFormlyContext specific to this directive. The context is injected using only self.
|
|
13
13
|
*/
|
|
14
|
-
export declare abstract class AbstractFormlyFormDirective<T>
|
|
14
|
+
export declare abstract class AbstractFormlyFormDirective<T> {
|
|
15
15
|
readonly context: DbxFormlyContext<T>;
|
|
16
16
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
17
|
-
|
|
18
|
-
ngOnDestroy(): void;
|
|
17
|
+
protected readonly _disabledEffect: import("@angular/core").EffectRef;
|
|
19
18
|
getValue(): Observable<T>;
|
|
20
19
|
setValue(value: Partial<T>): void;
|
|
21
20
|
resetForm(): void;
|
|
@@ -27,7 +26,7 @@ export declare abstract class AbstractFormlyFormDirective<T> implements OnDestro
|
|
|
27
26
|
/**
|
|
28
27
|
* Abstract component for wrapping a form.
|
|
29
28
|
*/
|
|
30
|
-
export declare abstract class AbstractSyncFormlyFormDirective<T> extends AbstractFormlyFormDirective<T> implements OnInit
|
|
29
|
+
export declare abstract class AbstractSyncFormlyFormDirective<T> extends AbstractFormlyFormDirective<T> implements OnInit {
|
|
31
30
|
abstract fields: FormlyFieldConfig[];
|
|
32
31
|
ngOnInit(): void;
|
|
33
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractSyncFormlyFormDirective<any>, never>;
|
|
@@ -36,18 +35,17 @@ export declare abstract class AbstractSyncFormlyFormDirective<T> extends Abstrac
|
|
|
36
35
|
/**
|
|
37
36
|
* Abstract component for wrapping an asyncrhronously-configured form.
|
|
38
37
|
*/
|
|
39
|
-
export declare abstract class AbstractAsyncFormlyFormDirective<T> extends AbstractFormlyFormDirective<T> implements OnInit
|
|
38
|
+
export declare abstract class AbstractAsyncFormlyFormDirective<T> extends AbstractFormlyFormDirective<T> implements OnInit {
|
|
40
39
|
/**
|
|
41
40
|
* Used to provide fields to the context.
|
|
42
41
|
*/
|
|
43
42
|
abstract readonly fields$: Observable<Maybe<FormlyFieldConfig[]>>;
|
|
44
|
-
|
|
43
|
+
protected readonly _fieldSub: import("@dereekb/rxjs").SubscriptionObject<import("rxjs").Unsubscribable>;
|
|
45
44
|
ngOnInit(): void;
|
|
46
|
-
ngOnDestroy(): void;
|
|
47
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractAsyncFormlyFormDirective<any>, never>;
|
|
48
46
|
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractAsyncFormlyFormDirective<any>, never, never, {}, {}, never, never, false, never>;
|
|
49
47
|
}
|
|
50
|
-
export declare abstract class AbstractConfigAsyncFormlyFormDirective<T, C> extends AbstractAsyncFormlyFormDirective<T>
|
|
48
|
+
export declare abstract class AbstractConfigAsyncFormlyFormDirective<T, C> extends AbstractAsyncFormlyFormDirective<T> {
|
|
51
49
|
readonly config: import("@angular/core").InputSignal<MaybeObservableOrValue<C>>;
|
|
52
50
|
readonly currentConfig$: Observable<Maybe<C>>;
|
|
53
51
|
readonly config$: Observable<C>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { FormlyFieldConfig, FormlyForm, FormlyFormOptions } from '@ngx-formly/core';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
6
5
|
import { DbxForm, DbxFormDisabledKey, DbxFormEvent } from '../form/form';
|
|
7
6
|
import { DbxFormlyContextDelegate, DbxFormlyInitialize } from './formly.context';
|
|
8
7
|
import { BooleanStringKeyArray } from '@dereekb/util';
|
|
@@ -15,7 +14,7 @@ export interface DbxFormlyFormState {
|
|
|
15
14
|
/**
|
|
16
15
|
* Used for rending a form from a DbxFormlyContext.
|
|
17
16
|
*/
|
|
18
|
-
export declare class DbxFormlyComponent<T>
|
|
17
|
+
export declare class DbxFormlyComponent<T> implements DbxForm, DbxFormlyContextDelegate<T>, OnInit {
|
|
19
18
|
private readonly _dbxFormlyContext;
|
|
20
19
|
readonly formlyForm: import("@angular/core").Signal<FormlyForm | undefined>;
|
|
21
20
|
private readonly _fields;
|
|
@@ -36,8 +35,8 @@ export declare class DbxFormlyComponent<T> extends AbstractSubscriptionDirective
|
|
|
36
35
|
readonly fieldsSignal: import("@angular/core").Signal<FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
37
36
|
[additionalProperties: string]: any;
|
|
38
37
|
}>[]>;
|
|
38
|
+
constructor();
|
|
39
39
|
ngOnInit(): void;
|
|
40
|
-
ngOnDestroy(): void;
|
|
41
40
|
init(initialize: DbxFormlyInitialize<T>): void;
|
|
42
41
|
getValue(): Observable<T>;
|
|
43
42
|
setValue(value: T): void;
|