@dereekb/dbx-form 2.1.0 → 4.0.1
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/form/action/form.action.directive.mjs +8 -8
- package/esm2020/lib/form/action/form.action.module.mjs +4 -4
- package/esm2020/lib/form/action/transition/form.action.transition.module.mjs +4 -4
- package/esm2020/lib/form/action/transition/form.action.transition.safety.directive.mjs +3 -3
- package/esm2020/lib/form/form.mjs +10 -1
- package/esm2020/lib/form/form.module.mjs +4 -4
- package/esm2020/lib/form/io/form.changes.directive.mjs +18 -7
- package/esm2020/lib/form/io/form.input.directive.mjs +36 -18
- package/esm2020/lib/form/io/form.io.module.mjs +4 -4
- package/esm2020/lib/form/io/form.loading.directive.mjs +27 -17
- package/esm2020/lib/form.module.mjs +4 -4
- package/esm2020/lib/formly/config/validation.mjs +3 -3
- package/esm2020/lib/formly/field/checklist/checklist.item.field.component.mjs +8 -8
- package/esm2020/lib/formly/field/checklist/checklist.item.field.content.default.component.mjs +3 -3
- package/esm2020/lib/formly/field/checklist/checklist.item.field.module.mjs +13 -13
- package/esm2020/lib/formly/field/component/component.field.component.mjs +7 -7
- package/esm2020/lib/formly/field/component/component.field.module.mjs +9 -9
- package/esm2020/lib/formly/field/form.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/selection/pickable/pickable.chip.field.component.mjs +7 -7
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.directive.mjs +8 -6
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.mjs +2 -2
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.module.mjs +13 -13
- package/esm2020/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +28 -21
- package/esm2020/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +4 -4
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.mjs +13 -13
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.directive.mjs +7 -8
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.module.mjs +13 -13
- package/esm2020/lib/formly/field/selection/searchable/searchable.mjs +1 -1
- package/esm2020/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +3 -3
- package/esm2020/lib/formly/field/selection/selection.module.mjs +4 -4
- package/esm2020/lib/formly/field/texteditor/texteditor.field.component.mjs +4 -5
- package/esm2020/lib/formly/field/texteditor/texteditor.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/array/array.field.component.mjs +6 -6
- package/esm2020/lib/formly/field/value/array/array.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/boolean/boolean.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/date/date.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +7 -6
- package/esm2020/lib/formly/field/value/enum/enum.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/phone/phone.field.component.mjs +3 -3
- package/esm2020/lib/formly/field/value/phone/phone.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/text/text.additional.field.mjs +15 -18
- package/esm2020/lib/formly/field/value/text/text.address.field.mjs +2 -2
- package/esm2020/lib/formly/field/value/text/text.field.mjs +3 -2
- package/esm2020/lib/formly/field/value/text/text.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/value.module.mjs +4 -4
- package/esm2020/lib/formly/field/wrapper/autotouch.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/expandable.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/expandable.wrapper.delegate.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/flex.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/form.wrapper.module.mjs +18 -10
- package/esm2020/lib/formly/field/wrapper/index.mjs +2 -1
- package/esm2020/lib/formly/field/wrapper/info.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/section.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/style.wrapper.component.mjs +4 -4
- package/esm2020/lib/formly/field/wrapper/subsection.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/toggle.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/working.wrapper.component.mjs +45 -0
- package/esm2020/lib/formly/field/wrapper/wrapper.mjs +7 -1
- package/esm2020/lib/formly/formly.context.directive.mjs +3 -3
- package/esm2020/lib/formly/formly.context.mjs +2 -2
- package/esm2020/lib/formly/formly.directive.mjs +12 -12
- package/esm2020/lib/formly/formly.form.component.mjs +15 -8
- package/esm2020/lib/formly/formly.module.mjs +9 -6
- package/esm2020/lib/formly/index.mjs +2 -1
- package/esm2020/lib/formly/template/available.mjs +16 -0
- package/esm2020/lib/formly/template/index.mjs +3 -0
- package/esm2020/lib/formly/template/login.mjs +90 -0
- package/esm2020/lib/layout/form.layout.module.mjs +4 -4
- package/esm2020/lib/layout/form.spacer.component.mjs +3 -3
- package/esm2020/lib/validator/available.mjs +32 -0
- package/esm2020/lib/validator/field.mjs +31 -0
- package/esm2020/lib/validator/index.mjs +3 -1
- package/fesm2015/dereekb-dbx-form.mjs +607 -352
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +624 -349
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/form/action/form.action.directive.d.ts +3 -3
- package/lib/form/form.d.ts +11 -0
- package/lib/form/io/form.changes.directive.d.ts +7 -3
- package/lib/form/io/form.input.directive.d.ts +18 -7
- package/lib/form/io/form.loading.directive.d.ts +8 -2
- package/lib/formly/field/checklist/checklist.item.field.component.d.ts +2 -2
- package/lib/formly/field/checklist/checklist.item.field.module.d.ts +1 -1
- package/lib/formly/field/component/component.field.component.d.ts +3 -3
- package/lib/formly/field/component/component.field.module.d.ts +1 -1
- package/lib/formly/field/selection/pickable/pickable.field.directive.d.ts +8 -3
- package/lib/formly/field/selection/pickable/pickable.field.module.d.ts +1 -1
- package/lib/formly/field/selection/pickable/pickable.list.field.component.d.ts +8 -6
- package/lib/formly/field/selection/searchable/searchable.chip.field.component.d.ts +2 -1
- package/lib/formly/field/selection/searchable/searchable.d.ts +3 -3
- package/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.d.ts +2 -2
- package/lib/formly/field/selection/searchable/searchable.field.directive.d.ts +4 -4
- package/lib/formly/field/selection/searchable/searchable.field.module.d.ts +1 -1
- package/lib/formly/field/value/array/array.field.component.d.ts +2 -2
- package/lib/formly/field/value/date/datetime.field.component.d.ts +1 -1
- package/lib/formly/field/value/text/text.additional.field.d.ts +1 -1
- package/lib/formly/field/value/text/text.field.d.ts +2 -0
- package/lib/formly/field/wrapper/form.wrapper.module.d.ts +9 -8
- package/lib/formly/field/wrapper/index.d.ts +1 -0
- package/lib/formly/field/wrapper/style.wrapper.component.d.ts +3 -3
- package/lib/formly/field/wrapper/working.wrapper.component.d.ts +22 -0
- package/lib/formly/field/wrapper/wrapper.d.ts +3 -0
- package/lib/formly/formly.context.d.ts +1 -1
- package/lib/formly/index.d.ts +1 -0
- package/lib/formly/template/available.d.ts +7 -0
- package/lib/formly/template/index.d.ts +2 -0
- package/lib/formly/template/login.d.ts +59 -0
- package/lib/validator/available.d.ts +30 -0
- package/lib/validator/field.d.ts +32 -0
- package/lib/validator/index.d.ts +2 -0
- package/package.json +5 -31
- package/lib/formly/field/fields_TODO.scss +0 -4
- package/lib/formly/form_TODO.scss +0 -153
|
@@ -30,12 +30,12 @@ export declare class DbxActionFormDirective<T = any> implements OnInit, OnDestro
|
|
|
30
30
|
private _isCompleteSub;
|
|
31
31
|
private _isWorkingSub;
|
|
32
32
|
constructor(form: DbxMutableForm, source: DbxActionContextStoreSourceInstance<object, any>);
|
|
33
|
-
get
|
|
34
|
-
set
|
|
33
|
+
get formDisabledOnWorking(): boolean;
|
|
34
|
+
set formDisabledOnWorking(formDisabledOnWorking: boolean);
|
|
35
35
|
ngOnInit(): void;
|
|
36
36
|
ngOnDestroy(): void;
|
|
37
37
|
protected preCheckReadyValue(value: T): Observable<boolean>;
|
|
38
38
|
protected readyValue(value: T): Observable<DbxActionValueOnTriggerResult>;
|
|
39
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionFormDirective<any>, [{ host: true; }, null]>;
|
|
40
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionFormDirective<any>, "[dbxActionForm]", never, { "dbxActionFormValidator": "dbxActionFormValidator"; "dbxActionFormModified": "dbxActionFormModified"; "
|
|
40
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionFormDirective<any>, "[dbxActionForm]", never, { "dbxActionFormValidator": "dbxActionFormValidator"; "dbxActionFormModified": "dbxActionFormModified"; "formDisabledOnWorking": "formDisabledOnWorking"; }, {}, never>;
|
|
41
41
|
}
|
package/lib/form/form.d.ts
CHANGED
|
@@ -2,12 +2,22 @@ import { Provider, Type } from '@angular/core';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { LockSet } from '@dereekb/rxjs';
|
|
4
4
|
import { BooleanStringKeyArray, Maybe } from '@dereekb/util';
|
|
5
|
+
import { FormControlStatus } from '@angular/forms';
|
|
5
6
|
/**
|
|
6
7
|
* Current state of a DbxForm
|
|
7
8
|
*/
|
|
8
9
|
export declare enum DbxFormState {
|
|
10
|
+
/**
|
|
11
|
+
* Form is not finished initializing.
|
|
12
|
+
*/
|
|
9
13
|
INITIALIZING = -1,
|
|
14
|
+
/**
|
|
15
|
+
* Form is initialized but has not yet used.
|
|
16
|
+
*/
|
|
10
17
|
RESET = 0,
|
|
18
|
+
/**
|
|
19
|
+
* Form has been used.
|
|
20
|
+
*/
|
|
11
21
|
USED = 1
|
|
12
22
|
}
|
|
13
23
|
/**
|
|
@@ -21,6 +31,7 @@ export declare const DEFAULT_FORM_DISABLED_KEY = "dbx_form_disabled";
|
|
|
21
31
|
export interface DbxFormEvent {
|
|
22
32
|
readonly isComplete: boolean;
|
|
23
33
|
readonly state: DbxFormState;
|
|
34
|
+
readonly status: FormControlStatus;
|
|
24
35
|
readonly pristine?: boolean;
|
|
25
36
|
readonly untouched?: boolean;
|
|
26
37
|
readonly lastResetAt?: Date;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
3
|
+
import { Maybe } from '@dereekb/util';
|
|
3
4
|
import { DbxForm } from '../form';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* Used to see form value changes.
|
|
8
|
+
*
|
|
9
|
+
* Emits undefined when the form is incomplete, and the value when the form is complete.
|
|
7
10
|
*/
|
|
8
|
-
export declare class DbxFormValueChangesDirective<T extends object = any> extends AbstractSubscriptionDirective implements OnInit {
|
|
11
|
+
export declare class DbxFormValueChangesDirective<T extends object = any> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
9
12
|
readonly form: DbxForm;
|
|
10
|
-
readonly dbxFormValueChange: EventEmitter<T
|
|
13
|
+
readonly dbxFormValueChange: EventEmitter<Maybe<T>>;
|
|
11
14
|
constructor(form: DbxForm);
|
|
12
15
|
ngOnInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
13
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormValueChangesDirective<any>, [{ host: true; }]>;
|
|
14
18
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormValueChangesDirective<any>, "[dbxFormValueChange]", never, {}, { "dbxFormValueChange": "dbxFormValueChange"; }, never>;
|
|
15
19
|
}
|
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
2
3
|
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
3
4
|
import { DbxMutableForm } from '../form';
|
|
4
5
|
import { Maybe } from '@dereekb/util';
|
|
6
|
+
import { ObservableOrValue } from '@dereekb/rxjs';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
8
|
+
export declare function dbxFormSourceObservable<T>(form: DbxMutableForm, inputObs: ObservableOrValue<T>, mode$: Observable<DbxFormSourceDirectiveMode>): Observable<T>;
|
|
9
|
+
/**
|
|
10
|
+
* DbxFormSourceDirective modes that define when to copy data from the source.
|
|
11
|
+
*
|
|
12
|
+
* - reset: only copy data when the form is reset.
|
|
13
|
+
* - always: always copy data when the data observable emits a value.
|
|
14
|
+
*/
|
|
15
|
+
export declare type DbxFormSourceDirectiveMode = 'reset' | 'always';
|
|
6
16
|
/**
|
|
7
17
|
* Used with a FormComponent to set the value based on the input value.
|
|
8
18
|
*/
|
|
9
|
-
export declare class DbxFormSourceDirective<T extends object = any> extends AbstractSubscriptionDirective {
|
|
19
|
+
export declare class DbxFormSourceDirective<T extends object = any> extends AbstractSubscriptionDirective implements OnDestroy {
|
|
10
20
|
readonly form: DbxMutableForm;
|
|
21
|
+
private _mode;
|
|
11
22
|
constructor(form: DbxMutableForm);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
get mode(): DbxFormSourceDirectiveMode;
|
|
24
|
+
set mode(mode: DbxFormSourceDirectiveMode);
|
|
25
|
+
set obs(obs: Maybe<ObservableOrValue<Maybe<Partial<T>>>>);
|
|
26
|
+
private setObs;
|
|
27
|
+
ngOnDestroy(): void;
|
|
17
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormSourceDirective<any>, [{ host: true; }]>;
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormSourceDirective<any>, "[dbxFormSource]", never, { "obs": "dbxFormSource"; }, {}, never>;
|
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormSourceDirective<any>, "[dbxFormSource]", never, { "mode": "dbxFormSourceMode"; "obs": "dbxFormSource"; }, {}, never>;
|
|
19
30
|
}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
2
3
|
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
3
4
|
import { DbxMutableForm } from '../../form/form';
|
|
4
5
|
import { LoadingState } from '@dereekb/rxjs';
|
|
6
|
+
import { DbxFormSourceDirectiveMode } from './form.input.directive';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
/**
|
|
7
9
|
* Used with a FormComponent to set the value from a LoadingState when the value is available.
|
|
8
10
|
*/
|
|
9
|
-
export declare class DbxFormLoadingSourceDirective<T extends object = any> extends AbstractSubscriptionDirective {
|
|
11
|
+
export declare class DbxFormLoadingSourceDirective<T extends object = any> extends AbstractSubscriptionDirective implements OnDestroy {
|
|
10
12
|
readonly form: DbxMutableForm;
|
|
13
|
+
private _mode;
|
|
11
14
|
constructor(form: DbxMutableForm);
|
|
15
|
+
get mode(): DbxFormSourceDirectiveMode;
|
|
16
|
+
set mode(mode: DbxFormSourceDirectiveMode);
|
|
12
17
|
/**
|
|
13
18
|
* Sets a LoadingContext that is watched for the loading state.
|
|
14
19
|
*/
|
|
15
20
|
set obs(obs: Observable<LoadingState<T>>);
|
|
16
21
|
private _setObs;
|
|
22
|
+
ngOnDestroy(): void;
|
|
17
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormLoadingSourceDirective<any>, [{ host: true; }]>;
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormLoadingSourceDirective<any>, "[dbxFormLoadingSource]", never, { "obs": "dbxFormLoadingSource"; }, {}, never>;
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormLoadingSourceDirective<any>, "[dbxFormLoadingSource]", never, { "mode": "dbxFormLoadingSourceMode"; "obs": "dbxFormLoadingSource"; }, {}, never>;
|
|
19
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
3
3
|
import { OnDestroy, OnInit, Type } from '@angular/core';
|
|
4
4
|
import { ValidationErrors, FormGroup } from '@angular/forms';
|
|
5
5
|
import { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';
|
|
@@ -41,7 +41,7 @@ export declare class DbxChecklistItemFieldComponent<T = any> extends FieldType<C
|
|
|
41
41
|
export declare class DbxChecklistItemContentComponent<T = any> extends AbstractSubscriptionDirective {
|
|
42
42
|
readonly checklistItemFieldComponent: DbxChecklistItemFieldComponent<T>;
|
|
43
43
|
readonly cdRef: ChangeDetectorRef;
|
|
44
|
-
config?:
|
|
44
|
+
config?: DbxInjectionComponentConfig;
|
|
45
45
|
constructor(checklistItemFieldComponent: DbxChecklistItemFieldComponent<T>, cdRef: ChangeDetectorRef);
|
|
46
46
|
ngOnInit(): void;
|
|
47
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxChecklistItemContentComponent<any>, never>;
|
|
@@ -13,6 +13,6 @@ import * as i11 from "../wrapper/form.wrapper.module";
|
|
|
13
13
|
import * as i12 from "@ngx-formly/core";
|
|
14
14
|
export declare class DbxFormFormlyChecklistItemFieldModule {
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyChecklistItemFieldModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyChecklistItemFieldModule, [typeof i1.DbxChecklistItemFieldComponent, typeof i1.DbxChecklistItemContentComponent, typeof i2.DbxDefaultChecklistItemFieldDisplayComponent], [typeof i3.CommonModule, typeof i4.DbxTextModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.MatRippleModule, typeof i7.MatCheckboxModule, typeof i8.MatButtonModule, typeof i9.MatIconModule, typeof i4.
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyChecklistItemFieldModule, [typeof i1.DbxChecklistItemFieldComponent, typeof i1.DbxChecklistItemContentComponent, typeof i2.DbxDefaultChecklistItemFieldDisplayComponent], [typeof i3.CommonModule, typeof i4.DbxTextModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.MatRippleModule, typeof i7.MatCheckboxModule, typeof i8.MatButtonModule, typeof i9.MatIconModule, typeof i4.DbxRouterAnchorModule, typeof i10.DbxInjectionComponentModule, typeof i11.DbxFormFormlyWrapperModule, typeof i12.FormlyModule], [typeof i11.DbxFormFormlyWrapperModule]>;
|
|
17
17
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyChecklistItemFieldModule>;
|
|
18
18
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
2
2
|
import { FieldType, FormlyFieldConfig } from '@ngx-formly/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export interface DbxFormComponentFieldConfig<T> extends
|
|
4
|
+
export interface DbxFormComponentFieldConfig<T> extends DbxInjectionComponentConfig<T> {
|
|
5
5
|
}
|
|
6
6
|
export interface DbxFormComponentFormlyFieldConfig<T = any> extends FormlyFieldConfig {
|
|
7
7
|
componentField: DbxFormComponentFieldConfig<T>;
|
|
8
8
|
}
|
|
9
9
|
export declare class DbxFormComponentFieldComponent<T = any> extends FieldType<DbxFormComponentFormlyFieldConfig<T>> {
|
|
10
|
-
get config():
|
|
10
|
+
get config(): DbxInjectionComponentConfig<T>;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormComponentFieldComponent<any>, never>;
|
|
12
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormComponentFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
|
|
13
13
|
}
|
|
@@ -5,6 +5,6 @@ import * as i3 from "@dereekb/dbx-core";
|
|
|
5
5
|
import * as i4 from "@ngx-formly/core";
|
|
6
6
|
export declare class DbxFormFormlyComponentFieldModule {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyComponentFieldModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyComponentFieldModule, [typeof i1.DbxFormComponentFieldComponent], [typeof i2.CommonModule, typeof i3.
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyComponentFieldModule, [typeof i1.DbxFormComponentFieldComponent], [typeof i2.CommonModule, typeof i3.DbxInjectionComponentModule, typeof i4.FormlyModule], [typeof i1.DbxFormComponentFieldComponent]>;
|
|
9
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyComponentFieldModule>;
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DbxInjectionComponentConfig } from "@dereekb/dbx-core";
|
|
2
2
|
import { LoadingState, ListLoadingStateContextInstance } from "@dereekb/rxjs";
|
|
3
3
|
import { Maybe } from "@dereekb/util";
|
|
4
4
|
import { OnDestroy, OnInit } from "@angular/core";
|
|
@@ -74,7 +74,11 @@ export interface PickableValueFieldsFieldConfig<T> {
|
|
|
74
74
|
/**
|
|
75
75
|
* Footer Display
|
|
76
76
|
*/
|
|
77
|
-
footerConfig?:
|
|
77
|
+
footerConfig?: DbxInjectionComponentConfig;
|
|
78
|
+
/**
|
|
79
|
+
* Changes the selection mode of the list to "view" mode on disabled, hiding the selection boxes.
|
|
80
|
+
*/
|
|
81
|
+
changeSelectionModeToViewOnDisabled?: boolean;
|
|
78
82
|
}
|
|
79
83
|
export interface PickableValueFieldsFormlyFieldConfig<T> extends FormlyFieldConfig {
|
|
80
84
|
pickableField: PickableValueFieldsFieldConfig<T>;
|
|
@@ -133,6 +137,7 @@ export declare class AbstractDbxPickableItemFieldDirective<T> extends FieldType<
|
|
|
133
137
|
get name(): string;
|
|
134
138
|
get label(): Maybe<string>;
|
|
135
139
|
get autocomplete(): string;
|
|
140
|
+
get changeSelectionModeToViewOnDisabled(): boolean;
|
|
136
141
|
get sortItems(): Maybe<PickableItemFieldItemSortFn<T>>;
|
|
137
142
|
get hashForValue(): PickableValueFieldHashFn<T>;
|
|
138
143
|
get displayForValue(): PickableValueFieldDisplayFn<T>;
|
|
@@ -143,7 +148,7 @@ export declare class AbstractDbxPickableItemFieldDirective<T> extends FieldType<
|
|
|
143
148
|
get showTextFilter(): boolean;
|
|
144
149
|
get loadValuesFn(): PickableValueFieldLoadValuesFn<T>;
|
|
145
150
|
get values(): T[];
|
|
146
|
-
get footerConfig(): Maybe<
|
|
151
|
+
get footerConfig(): Maybe<DbxInjectionComponentConfig>;
|
|
147
152
|
loadDisplayValuesForValues(values: T[]): Observable<LoadingState<PickableValueFieldDisplayValueWithHash<T>[]>>;
|
|
148
153
|
loadDisplayValuesForFieldValues(values: PickableValueFieldValue<T>[]): Observable<LoadingState<PickableValueFieldDisplayValueWithHash<T>[]>>;
|
|
149
154
|
getDisplayValuesForFieldValues(values: PickableValueFieldValue<T>[]): Observable<PickableValueFieldDisplayValueWithHash<T>[]>;
|
|
@@ -15,6 +15,6 @@ import * as i13 from "@angular/material/icon";
|
|
|
15
15
|
import * as i14 from "@ngx-formly/core";
|
|
16
16
|
export declare class DbxFormFormlyPickableFieldModule {
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyPickableFieldModule, never>;
|
|
18
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyPickableFieldModule, [typeof i1.DbxPickableChipListFieldComponent, typeof i2.DbxPickableListFieldComponent, typeof i2.DbxPickableListFieldItemListComponent, typeof i2.DbxPickableListFieldItemListViewComponent, typeof i2.DbxPickableListFieldItemListViewItemComponent], [typeof i3.CommonModule, typeof i4.DbxTextModule, typeof i4.DbxLoadingModule, typeof i4.DbxButtonModule, typeof i5.FormsModule, typeof i6.MatButtonModule, typeof i7.MatInputModule, typeof i8.MatFormFieldModule, typeof i5.ReactiveFormsModule, typeof i9.MatAutocompleteModule, typeof i10.MatListModule, typeof i11.DbxDatePipeModule, typeof i4.
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyPickableFieldModule, [typeof i1.DbxPickableChipListFieldComponent, typeof i2.DbxPickableListFieldComponent, typeof i2.DbxPickableListFieldItemListComponent, typeof i2.DbxPickableListFieldItemListViewComponent, typeof i2.DbxPickableListFieldItemListViewItemComponent], [typeof i3.CommonModule, typeof i4.DbxTextModule, typeof i4.DbxLoadingModule, typeof i4.DbxButtonModule, typeof i5.FormsModule, typeof i6.MatButtonModule, typeof i7.MatInputModule, typeof i8.MatFormFieldModule, typeof i5.ReactiveFormsModule, typeof i9.MatAutocompleteModule, typeof i10.MatListModule, typeof i11.DbxDatePipeModule, typeof i4.DbxRouterAnchorModule, typeof i12.MatChipsModule, typeof i13.MatIconModule, typeof i11.DbxInjectionComponentModule, typeof i4.DbxListLayoutModule, typeof i14.FormlyModule], never>;
|
|
19
19
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyPickableFieldModule>;
|
|
20
20
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AbstractDbxSelectionListWrapperDirective,
|
|
1
|
+
import { DbxInjectionComponentConfig } from "@dereekb/dbx-core";
|
|
2
|
+
import { AbstractDbxSelectionListWrapperDirective, AbstractDbxSelectionListViewDirective, AbstractDbxValueListViewItemComponent, DbxListSelectionMode } from "@dereekb/dbx-web";
|
|
3
|
+
import { Maybe } from "@dereekb/util";
|
|
3
4
|
import { PickableValueFieldDisplayValue } from "./pickable";
|
|
4
5
|
import { AbstractDbxPickableItemFieldDirective, PickableItemFieldItem } from "./pickable.field.directive";
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
@@ -19,16 +20,17 @@ export declare class DbxPickableListFieldItemListComponent<T> extends AbstractDb
|
|
|
19
20
|
/**
|
|
20
21
|
* NOTE: Values input are PickableItemFieldItem<T>, but output values are PickableValueFieldDisplayValue<T>.
|
|
21
22
|
*/
|
|
22
|
-
export declare class DbxPickableListFieldItemListViewComponent<T> extends
|
|
23
|
+
export declare class DbxPickableListFieldItemListViewComponent<T> extends AbstractDbxSelectionListViewDirective<PickableItemFieldItem<T>> {
|
|
23
24
|
readonly dbxPickableListFieldComponent: DbxPickableListFieldComponent<T>;
|
|
24
|
-
readonly config:
|
|
25
|
+
readonly config: DbxInjectionComponentConfig;
|
|
25
26
|
get multiple(): boolean;
|
|
26
|
-
|
|
27
|
+
get selectionMode(): Maybe<DbxListSelectionMode>;
|
|
28
|
+
readonly items$: import("rxjs").Observable<import("@dereekb/dbx-web").DbxValueListItemConfig<unknown, PickableItemFieldItem<T>>[]>;
|
|
27
29
|
constructor(dbxPickableListFieldComponent: DbxPickableListFieldComponent<T>);
|
|
28
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxPickableListFieldItemListViewComponent<any>, never>;
|
|
29
31
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxPickableListFieldItemListViewComponent<any>, "ng-component", never, {}, {}, never, never>;
|
|
30
32
|
}
|
|
31
|
-
export declare class DbxPickableListFieldItemListViewItemComponent<T> extends
|
|
33
|
+
export declare class DbxPickableListFieldItemListViewItemComponent<T> extends AbstractDbxValueListViewItemComponent<PickableValueFieldDisplayValue<T>> {
|
|
32
34
|
get label(): string;
|
|
33
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxPickableListFieldItemListViewItemComponent<any>, never>;
|
|
34
36
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxPickableListFieldItemListViewItemComponent<any>, "ng-component", never, {}, {}, never, never>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
1
2
|
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
|
2
3
|
import { MatChipInputEvent } from '@angular/material/chips';
|
|
3
4
|
import { AbstractDbxSearchableValueFieldDirective, SearchableValueFieldsFieldConfig, SearchableValueFieldsFormlyFieldConfig } from './searchable.field.directive';
|
|
@@ -7,7 +8,7 @@ export interface SearchableChipValueFieldsFieldConfig<T> extends SearchableValue
|
|
|
7
8
|
export interface SearchableChipValueFieldsFormlyFieldConfig<T> extends SearchableValueFieldsFormlyFieldConfig<T> {
|
|
8
9
|
searchableField: SearchableChipValueFieldsFieldConfig<T>;
|
|
9
10
|
}
|
|
10
|
-
export declare class DbxSearchableChipFieldComponent<T> extends AbstractDbxSearchableValueFieldDirective<T, SearchableChipValueFieldsFormlyFieldConfig<T>> {
|
|
11
|
+
export declare class DbxSearchableChipFieldComponent<T> extends AbstractDbxSearchableValueFieldDirective<T, SearchableChipValueFieldsFormlyFieldConfig<T>> implements OnDestroy {
|
|
11
12
|
private _blur;
|
|
12
13
|
private _blurSub;
|
|
13
14
|
readonly separatorKeysCodes: number[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DbxInjectionComponentConfig, ClickableAnchor } from '@dereekb/dbx-core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { SelectionDisplayValue, SelectionValue, SelectionValueHashFn } from '../selection';
|
|
4
4
|
export interface SearchableValueFieldValue<T, M = any> extends SelectionValue<T, M> {
|
|
@@ -14,10 +14,10 @@ export interface SearchableValueFieldDisplayValue<T, M = any> extends SelectionD
|
|
|
14
14
|
/**
|
|
15
15
|
* Display override configuration
|
|
16
16
|
*/
|
|
17
|
-
display?: Partial<
|
|
17
|
+
display?: Partial<DbxInjectionComponentConfig>;
|
|
18
18
|
}
|
|
19
19
|
export interface ConfiguredSearchableValueFieldDisplayValue<T, M = any> extends Omit<SearchableValueFieldDisplayValue<T, M>, 'display'> {
|
|
20
|
-
display:
|
|
20
|
+
display: DbxInjectionComponentConfig;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* SearchableValueField function for searching values.
|
package/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { InjectionToken, OnDestroy } from '@angular/core';
|
|
3
3
|
import { ConfiguredSearchableValueFieldDisplayValue } from './searchable';
|
|
4
|
-
import {
|
|
4
|
+
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare const DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN: InjectionToken<unknown>;
|
|
7
7
|
export declare class DbxSearchableFieldAutocompleteItemComponent<T> implements OnDestroy {
|
|
8
8
|
private _displayValue;
|
|
9
9
|
readonly displayValue$: Observable<ConfiguredSearchableValueFieldDisplayValue<T, any>>;
|
|
10
|
-
readonly config$: Observable<
|
|
10
|
+
readonly config$: Observable<DbxInjectionComponentConfig>;
|
|
11
11
|
readonly anchor$: Observable<import("@dereekb/dbx-core").ClickableAnchor | undefined>;
|
|
12
12
|
set displayValue(displayValue: ConfiguredSearchableValueFieldDisplayValue<T>);
|
|
13
13
|
ngOnDestroy(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
2
2
|
import { SubscriptionObject, LoadingState, LoadingStateContextInstance } from '@dereekb/rxjs';
|
|
3
3
|
import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
4
4
|
import { AbstractControl, FormControl, ValidatorFn } from '@angular/forms';
|
|
@@ -42,7 +42,7 @@ export interface SearchableValueFieldsFieldConfig<T> extends StringValueFieldsFi
|
|
|
42
42
|
/**
|
|
43
43
|
* Default injected config to use for display values.
|
|
44
44
|
*/
|
|
45
|
-
display?: Partial<
|
|
45
|
+
display?: Partial<DbxInjectionComponentConfig>;
|
|
46
46
|
/**
|
|
47
47
|
* Used for building a display value given the input.
|
|
48
48
|
*/
|
|
@@ -81,7 +81,7 @@ export declare abstract class AbstractDbxSearchableValueFieldDirective<T, C exte
|
|
|
81
81
|
/**
|
|
82
82
|
* Optional override set by the parent class for picking a default display for this directive.
|
|
83
83
|
*/
|
|
84
|
-
defaultDisplay?:
|
|
84
|
+
defaultDisplay?: DbxInjectionComponentConfig;
|
|
85
85
|
textInput: ElementRef<HTMLInputElement>;
|
|
86
86
|
readonly inputCtrl: FormControl;
|
|
87
87
|
private _formControlObs;
|
|
@@ -107,7 +107,7 @@ export declare abstract class AbstractDbxSearchableValueFieldDirective<T, C exte
|
|
|
107
107
|
get displayForValue(): SearchableValueFieldDisplayFn<T>;
|
|
108
108
|
get useAnchor(): Maybe<boolean>;
|
|
109
109
|
get anchorForValue(): Maybe<SearchableValueFieldAnchorFn<T>>;
|
|
110
|
-
get display(): Maybe<Partial<
|
|
110
|
+
get display(): Maybe<Partial<DbxInjectionComponentConfig>>;
|
|
111
111
|
get search(): SearchableValueFieldStringSearchFn<T>;
|
|
112
112
|
get values(): T[];
|
|
113
113
|
get allowStringValues(): boolean;
|
|
@@ -16,6 +16,6 @@ import * as i14 from "@angular/material/icon";
|
|
|
16
16
|
import * as i15 from "@ngx-formly/core";
|
|
17
17
|
export declare class DbxFormFormlySearchableFieldModule {
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlySearchableFieldModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlySearchableFieldModule, [typeof i1.DbxSearchableChipFieldComponent, typeof i2.DbxSearchableTextFieldComponent, typeof i3.DbxSearchableFieldAutocompleteItemComponent, typeof i3.DbxDefaultSearchableFieldDisplayComponent], [typeof i4.CommonModule, typeof i5.DbxTextModule, typeof i5.DbxLoadingModule, typeof i5.DbxButtonModule, typeof i6.FormsModule, typeof i7.MatButtonModule, typeof i8.MatInputModule, typeof i9.MatFormFieldModule, typeof i6.ReactiveFormsModule, typeof i10.MatAutocompleteModule, typeof i11.MatListModule, typeof i12.DbxDatePipeModule, typeof i5.
|
|
19
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlySearchableFieldModule, [typeof i1.DbxSearchableChipFieldComponent, typeof i2.DbxSearchableTextFieldComponent, typeof i3.DbxSearchableFieldAutocompleteItemComponent, typeof i3.DbxDefaultSearchableFieldDisplayComponent], [typeof i4.CommonModule, typeof i5.DbxTextModule, typeof i5.DbxLoadingModule, typeof i5.DbxButtonModule, typeof i6.FormsModule, typeof i7.MatButtonModule, typeof i8.MatInputModule, typeof i9.MatFormFieldModule, typeof i6.ReactiveFormsModule, typeof i10.MatAutocompleteModule, typeof i11.MatListModule, typeof i12.DbxDatePipeModule, typeof i5.DbxRouterAnchorModule, typeof i13.MatChipsModule, typeof i14.MatIconModule, typeof i12.DbxInjectionComponentModule, typeof i15.FormlyModule], [typeof i1.DbxSearchableChipFieldComponent, typeof i2.DbxSearchableTextFieldComponent]>;
|
|
20
20
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlySearchableFieldModule>;
|
|
21
21
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
2
|
-
import {
|
|
2
|
+
import { FactoryWithInput, Maybe } from '@dereekb/util';
|
|
3
3
|
import { FieldArrayTypeConfig, FieldArrayType, FormlyFieldConfig } from '@ngx-formly/core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export interface DbxFormRepeatArrayConfig {
|
|
6
|
-
labelForField?: string |
|
|
6
|
+
labelForField?: string | FactoryWithInput<string, FormlyFieldConfig>;
|
|
7
7
|
addText?: string;
|
|
8
8
|
removeText?: string;
|
|
9
9
|
}
|
|
@@ -84,7 +84,7 @@ export declare class DbxDateTimeFieldComponent extends FieldType<DateTimeFormlyF
|
|
|
84
84
|
readonly showTimeInput$: Observable<boolean>;
|
|
85
85
|
readonly showAddTime$: Observable<boolean>;
|
|
86
86
|
readonly date$: Observable<any>;
|
|
87
|
-
readonly dateValue$: Observable<Date |
|
|
87
|
+
readonly dateValue$: Observable<Date | import("@dereekb/util").MaybeNot>;
|
|
88
88
|
readonly timeInput$: Observable<ReadableTimeString>;
|
|
89
89
|
readonly config$: Observable<Maybe<DateTimePickerConfiguration>>;
|
|
90
90
|
readonly rawDateTime$: Observable<Maybe<Date>>;
|
|
@@ -12,7 +12,7 @@ export declare function nameField({ key, label, placeholder, required, minLength
|
|
|
12
12
|
export interface EmailFieldConfig extends Partial<LabeledFieldConfig>, DescriptionFieldConfig {
|
|
13
13
|
rows?: number;
|
|
14
14
|
}
|
|
15
|
-
export declare function emailField(
|
|
15
|
+
export declare function emailField(config?: EmailFieldConfig): FormlyFieldConfig;
|
|
16
16
|
export declare function cityField({ key, required }?: Partial<TextFieldConfig>): FormlyFieldConfig;
|
|
17
17
|
export declare function stateField({ key, required }?: Partial<TextFieldConfig>): FormlyFieldConfig;
|
|
18
18
|
export declare function countryField({ key, required }?: Partial<TextFieldConfig>): FormlyFieldConfig;
|
|
@@ -4,7 +4,9 @@ export interface TextFieldLengthConfig {
|
|
|
4
4
|
minLength?: number;
|
|
5
5
|
maxLength?: number;
|
|
6
6
|
}
|
|
7
|
+
export declare type TextFieldInputType = 'text' | 'password' | 'email';
|
|
7
8
|
export interface TextFieldConfig extends LabeledFieldConfig, TextFieldLengthConfig, AttributesFieldConfig {
|
|
9
|
+
inputType?: TextFieldInputType;
|
|
8
10
|
pattern?: string | RegExp;
|
|
9
11
|
}
|
|
10
12
|
export declare function textField(config: TextFieldConfig): FormlyFieldConfig;
|
|
@@ -7,15 +7,16 @@ import * as i5 from "./expandable.wrapper.component";
|
|
|
7
7
|
import * as i6 from "./toggle.wrapper.component";
|
|
8
8
|
import * as i7 from "./flex.wrapper.component";
|
|
9
9
|
import * as i8 from "./style.wrapper.component";
|
|
10
|
-
import * as i9 from "
|
|
11
|
-
import * as i10 from "@
|
|
12
|
-
import * as i11 from "@
|
|
13
|
-
import * as i12 from "@angular/material/
|
|
14
|
-
import * as i13 from "@angular/material/
|
|
15
|
-
import * as i14 from "@angular/
|
|
16
|
-
import * as i15 from "@
|
|
10
|
+
import * as i9 from "./working.wrapper.component";
|
|
11
|
+
import * as i10 from "@angular/common";
|
|
12
|
+
import * as i11 from "@dereekb/dbx-web";
|
|
13
|
+
import * as i12 from "@angular/material/button";
|
|
14
|
+
import * as i13 from "@angular/material/slide-toggle";
|
|
15
|
+
import * as i14 from "@angular/material/icon";
|
|
16
|
+
import * as i15 from "@angular/flex-layout";
|
|
17
|
+
import * as i16 from "@ngx-formly/core";
|
|
17
18
|
export declare class DbxFormFormlyWrapperModule {
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyWrapperModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyWrapperModule, [typeof i1.AutoTouchFieldWrapperComponent, typeof i2.DbxFormSectionWrapperComponent, typeof i3.DbxFormSubsectionWrapperComponent, typeof i4.DbxFormInfoWrapperComponent, typeof i5.DbxFormExpandWrapperComponent, typeof i6.DbxFormToggleWrapperComponent, typeof i7.DbxFormFlexWrapperComponent, typeof i8.DbxFormStyleWrapperComponent], [typeof
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyWrapperModule, [typeof i1.AutoTouchFieldWrapperComponent, typeof i2.DbxFormSectionWrapperComponent, typeof i3.DbxFormSubsectionWrapperComponent, typeof i4.DbxFormInfoWrapperComponent, typeof i5.DbxFormExpandWrapperComponent, typeof i6.DbxFormToggleWrapperComponent, typeof i7.DbxFormFlexWrapperComponent, typeof i8.DbxFormStyleWrapperComponent, typeof i9.DbxFormWorkingWrapperComponent], [typeof i10.CommonModule, typeof i11.DbxTextModule, typeof i11.DbxLoadingModule, typeof i11.DbxFlexLayoutModule, typeof i11.DbxSectionLayoutModule, typeof i12.MatButtonModule, typeof i13.MatSlideToggleModule, typeof i14.MatIconModule, typeof i15.FlexLayoutModule, typeof i16.FormlyModule], never>;
|
|
20
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyWrapperModule>;
|
|
21
22
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ObservableOrValue } from '@dereekb/rxjs';
|
|
3
3
|
import { Maybe } from '@dereekb/util';
|
|
4
4
|
import { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export interface DbxFormStyleWrapperConfig {
|
|
8
|
-
style:
|
|
8
|
+
style: ObservableOrValue<string>;
|
|
9
9
|
}
|
|
10
10
|
export interface DbxFormStyleWrapperFormlyConfig extends FormlyFieldConfig {
|
|
11
11
|
styleWrapper: DbxFormStyleWrapperConfig;
|
|
@@ -14,7 +14,7 @@ export declare class DbxFormStyleWrapperComponent extends FieldWrapper<DbxFormSt
|
|
|
14
14
|
private _style;
|
|
15
15
|
readonly style$: Observable<Maybe<string>>;
|
|
16
16
|
get styleWrapper(): DbxFormStyleWrapperConfig;
|
|
17
|
-
get styleGetter():
|
|
17
|
+
get styleGetter(): ObservableOrValue<string>;
|
|
18
18
|
ngOnInit(): void;
|
|
19
19
|
ngOnDestroy(): void;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormStyleWrapperComponent, never>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { SimpleLoadingContext, SubscriptionObject } from '@dereekb/rxjs';
|
|
3
|
+
import { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface DbxFormWorkingWrapperConfig {
|
|
6
|
+
}
|
|
7
|
+
export interface DbxFormWorkingWrapperFormlyConfig extends FormlyFieldConfig {
|
|
8
|
+
styleWrapper: DbxFormWorkingWrapperConfig;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Adds a loading bar to help signify asynchronos work is occuring.
|
|
12
|
+
*
|
|
13
|
+
* By default shows loading during asynchronous validation of a field (FormControl status is "PENDING")
|
|
14
|
+
*/
|
|
15
|
+
export declare class DbxFormWorkingWrapperComponent extends FieldWrapper<DbxFormWorkingWrapperFormlyConfig> implements OnInit, OnDestroy {
|
|
16
|
+
readonly sub: SubscriptionObject;
|
|
17
|
+
readonly workingContext: SimpleLoadingContext;
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormWorkingWrapperComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormWorkingWrapperComponent, "ng-component", never, {}, {}, never, never>;
|
|
22
|
+
}
|
|
@@ -7,6 +7,7 @@ import { DbxFormSubsectionConfig } from './subsection.wrapper.component';
|
|
|
7
7
|
import { DbxFormInfoConfig } from './info.wrapper.component';
|
|
8
8
|
import { DbxFormExpandWrapperConfig } from './expandable.wrapper.component';
|
|
9
9
|
import { DbxFlexSize } from '@dereekb/dbx-web';
|
|
10
|
+
import { DbxFormWorkingWrapperConfig } from './working.wrapper.component';
|
|
10
11
|
export declare const EXPANDABLE_WRAPPER_KEY = "expandable";
|
|
11
12
|
export declare const TOGGLE_WRAPPER_KEY = "toggle";
|
|
12
13
|
export declare const SECTION_WRAPPER_KEY = "section";
|
|
@@ -14,6 +15,7 @@ export declare const SUBSECTION_WRAPPER_KEY = "subsection";
|
|
|
14
15
|
export declare const INFO_WRAPPER_KEY = "info";
|
|
15
16
|
export declare const FLEX_WRAPPER_KEY = "flex";
|
|
16
17
|
export declare const STYLE_WRAPPER_KEY = "style";
|
|
18
|
+
export declare const WORKING_WRAPPER_KEY = "working";
|
|
17
19
|
export declare function addWrapperToFormlyFieldConfig<T extends object>(fieldConfig: FormlyFieldConfig, wrapperKey: string, wrapperTemplateOptionsConfig: T): FormlyFieldConfig;
|
|
18
20
|
export declare function expandWrapper(fieldConfig: FormlyFieldConfig, expandWrapper?: DbxFormExpandWrapperConfig): FormlyFieldConfig;
|
|
19
21
|
export declare function toggleWrapper(fieldConfig: FormlyFieldConfig, expandWrapper?: DbxFormToggleWrapperConfig): FormlyFieldConfig;
|
|
@@ -21,6 +23,7 @@ export declare function sectionWrapper(fieldConfig: FormlyFieldConfig, sectionWr
|
|
|
21
23
|
export declare function subsectionWrapper(fieldConfig: FormlyFieldConfig, subsectionWrapper?: DbxFormSubsectionConfig): FormlyFieldConfig;
|
|
22
24
|
export declare function infoWrapper(fieldConfig: FormlyFieldConfig, infoWrapper: DbxFormInfoConfig): FormlyFieldConfig;
|
|
23
25
|
export declare function styleWrapper(fieldConfig: FormlyFieldConfig, styleWrapper: DbxFormStyleWrapperConfig): FormlyFieldConfig;
|
|
26
|
+
export declare function workingWrapper(fieldConfig: FormlyFieldConfig, workingWrapper: DbxFormWorkingWrapperConfig): FormlyFieldConfig;
|
|
24
27
|
export interface DbxFlexLayoutWrapperGroupFieldConfig {
|
|
25
28
|
field: FormlyFieldConfig;
|
|
26
29
|
/**
|
|
@@ -25,7 +25,7 @@ export declare function ProvideFormlyContext(): Provider[];
|
|
|
25
25
|
/**
|
|
26
26
|
* DbxForm Instance that registers a delegate and manages the state of that form/delegate.
|
|
27
27
|
*/
|
|
28
|
-
export declare class DbxFormlyContext<T> implements DbxForm<T> {
|
|
28
|
+
export declare class DbxFormlyContext<T = any> implements DbxForm<T> {
|
|
29
29
|
readonly lockSet: LockSet;
|
|
30
30
|
private static INITIAL_STATE;
|
|
31
31
|
private _fields;
|
package/lib/formly/index.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormlyFieldConfig } from '@ngx-formly/core/lib/core';
|
|
2
|
+
import { FieldValueIsAvailableValidatorConfig } from '../../validator/available';
|
|
3
|
+
import { TextFieldConfig } from '../field/value/text/text.field';
|
|
4
|
+
export interface TextAvailableFieldConfig extends TextFieldConfig, Omit<FieldValueIsAvailableValidatorConfig<string>, 'message'> {
|
|
5
|
+
isNotAvailableErrorMessage?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function textIsAvailableField(config: TextAvailableFieldConfig): FormlyFieldConfig;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { TextFieldConfig } from '../field/value/text/text.field';
|
|
2
|
+
import { EmailFieldConfig } from '../field/value/text/text.additional.field';
|
|
3
|
+
import { FormlyFieldConfig } from "@ngx-formly/core";
|
|
4
|
+
import { Maybe } from '@dereekb/util';
|
|
5
|
+
/**
|
|
6
|
+
* Convenience interface for the password parameters configuration for a TextPasswordField.
|
|
7
|
+
*/
|
|
8
|
+
export interface TextPasswordFieldPasswordParameters extends Partial<Pick<TextFieldConfig, 'maxLength' | 'minLength' | 'pattern'>> {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* textPasswordField() configuration.
|
|
12
|
+
*/
|
|
13
|
+
export interface TextPasswordFieldConfig extends Omit<TextFieldConfig, 'inputType' | 'key'>, Partial<Pick<TextFieldConfig, 'key'>> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Configured simple text password field.
|
|
17
|
+
*
|
|
18
|
+
* @param config
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare function textPasswordField(config?: TextPasswordFieldConfig): FormlyFieldConfig;
|
|
22
|
+
/**
|
|
23
|
+
* Configured verify field for a password.
|
|
24
|
+
* @param config
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
export declare function textVerifyPasswordField(config?: TextPasswordFieldConfig): FormlyFieldConfig;
|
|
28
|
+
export interface TextPasswordWithVerifyFieldConfig {
|
|
29
|
+
password?: TextPasswordFieldConfig;
|
|
30
|
+
verifyPassword?: TextPasswordFieldConfig;
|
|
31
|
+
}
|
|
32
|
+
export declare function textPasswordWithVerifyFieldGroup(config: TextPasswordWithVerifyFieldConfig): FormlyFieldConfig;
|
|
33
|
+
export interface UsernameLoginFieldUsernameConfig {
|
|
34
|
+
email?: Omit<EmailFieldConfig, 'key'>;
|
|
35
|
+
username?: Omit<TextFieldConfig, 'key'>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* usernamePasswordLoginFields() configuration.
|
|
39
|
+
*/
|
|
40
|
+
export interface UsernameLoginFieldsConfig {
|
|
41
|
+
username: 'email' | 'username' | UsernameLoginFieldUsernameConfig;
|
|
42
|
+
password?: TextPasswordFieldConfig;
|
|
43
|
+
verifyPassword?: Maybe<boolean | TextPasswordFieldConfig>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Value type exported by usernameLoginFields()
|
|
47
|
+
*/
|
|
48
|
+
export interface DefaultUsernameLoginFieldsValue {
|
|
49
|
+
username: string;
|
|
50
|
+
password: string;
|
|
51
|
+
verifyPassword?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Template for login field that takes in a username and password.
|
|
55
|
+
*
|
|
56
|
+
* @param param0
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
export declare function usernamePasswordLoginFields({ username, password, verifyPassword }: UsernameLoginFieldsConfig): FormlyFieldConfig[];
|