@dereekb/dbx-form 4.1.0 → 5.1.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/LICENSE +21 -0
- package/_index.scss +4 -5
- package/esm2020/lib/form/action/form.action.directive.mjs +20 -21
- package/esm2020/lib/form/action/form.action.module.mjs +6 -17
- package/esm2020/lib/form/action/transition/form.action.transition.module.mjs +5 -13
- package/esm2020/lib/form/action/transition/form.action.transition.safety.directive.mjs +2 -2
- package/esm2020/lib/form/form.mjs +4 -7
- package/esm2020/lib/form/form.module.mjs +4 -12
- package/esm2020/lib/form/io/form.changes.directive.mjs +4 -2
- package/esm2020/lib/form/io/form.input.directive.mjs +3 -6
- package/esm2020/lib/form/io/form.io.module.mjs +6 -22
- package/esm2020/lib/form/io/form.loading.directive.mjs +1 -1
- package/esm2020/lib/form.module.mjs +4 -12
- package/esm2020/lib/formly/config/index.mjs +1 -1
- package/esm2020/lib/formly/config/validation.mjs +1 -1
- package/esm2020/lib/formly/field/checklist/checklist.field.mjs +6 -9
- package/esm2020/lib/formly/field/checklist/checklist.item.field.component.mjs +14 -12
- package/esm2020/lib/formly/field/checklist/checklist.item.field.content.default.component.mjs +1 -1
- package/esm2020/lib/formly/field/checklist/checklist.item.field.mjs +1 -1
- package/esm2020/lib/formly/field/checklist/checklist.item.field.module.mjs +6 -18
- package/esm2020/lib/formly/field/checklist/checklist.item.mjs +1 -1
- package/esm2020/lib/formly/field/component/component.field.component.mjs +1 -1
- package/esm2020/lib/formly/field/component/component.field.mjs +1 -1
- package/esm2020/lib/formly/field/component/component.field.module.mjs +5 -13
- package/esm2020/lib/formly/field/field.mjs +4 -2
- package/esm2020/lib/formly/field/form.field.module.mjs +5 -26
- package/esm2020/lib/formly/field/selection/pickable/index.mjs +1 -1
- package/esm2020/lib/formly/field/selection/pickable/pickable.chip.field.component.mjs +5 -5
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.directive.mjs +43 -43
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.mjs +3 -3
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.module.mjs +5 -15
- package/esm2020/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +17 -12
- package/esm2020/lib/formly/field/selection/pickable/pickable.mjs +1 -1
- package/esm2020/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +3 -3
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.mjs +15 -13
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.directive.mjs +24 -26
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.mjs +6 -5
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.module.mjs +7 -19
- package/esm2020/lib/formly/field/selection/searchable/searchable.mjs +1 -1
- package/esm2020/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +7 -8
- package/esm2020/lib/formly/field/selection/searchable/text.chip.field.mjs +5 -5
- package/esm2020/lib/formly/field/selection/selection.mjs +1 -1
- package/esm2020/lib/formly/field/selection/selection.module.mjs +5 -14
- package/esm2020/lib/formly/field/texteditor/texteditor.field.component.mjs +5 -3
- package/esm2020/lib/formly/field/texteditor/texteditor.field.mjs +1 -1
- package/esm2020/lib/formly/field/texteditor/texteditor.field.module.mjs +4 -10
- package/esm2020/lib/formly/field/value/array/array.field.component.mjs +31 -25
- package/esm2020/lib/formly/field/value/array/array.field.mjs +3 -3
- package/esm2020/lib/formly/field/value/array/array.field.module.mjs +4 -10
- package/esm2020/lib/formly/field/value/boolean/boolean.field.mjs +1 -1
- package/esm2020/lib/formly/field/value/boolean/boolean.field.module.mjs +1 -1
- package/esm2020/lib/formly/field/value/date/date.field.module.mjs +5 -13
- package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +24 -33
- package/esm2020/lib/formly/field/value/date/datetime.field.mjs +3 -3
- package/esm2020/lib/formly/field/value/enum/enum.field.mjs +2 -2
- package/esm2020/lib/formly/field/value/enum/enum.field.module.mjs +1 -1
- package/esm2020/lib/formly/field/value/enum/enum.mjs +1 -1
- package/esm2020/lib/formly/field/value/hidden.field.mjs +1 -1
- package/esm2020/lib/formly/field/value/phone/phone.field.component.mjs +3 -3
- package/esm2020/lib/formly/field/value/phone/phone.field.mjs +2 -4
- package/esm2020/lib/formly/field/value/phone/phone.field.module.mjs +4 -10
- package/esm2020/lib/formly/field/value/text/text.additional.field.mjs +2 -2
- package/esm2020/lib/formly/field/value/text/text.address.field.mjs +12 -6
- package/esm2020/lib/formly/field/value/text/text.field.mjs +2 -2
- package/esm2020/lib/formly/field/value/text/text.field.module.mjs +4 -10
- package/esm2020/lib/formly/field/value/value.module.mjs +5 -26
- package/esm2020/lib/formly/field/wrapper/autotouch.wrapper.component.mjs +8 -4
- package/esm2020/lib/formly/field/wrapper/expandable.wrapper.component.mjs +15 -15
- package/esm2020/lib/formly/field/wrapper/expandable.wrapper.delegate.mjs +1 -1
- package/esm2020/lib/formly/field/wrapper/flex.wrapper.component.mjs +1 -1
- package/esm2020/lib/formly/field/wrapper/form.wrapper.module.mjs +3 -21
- package/esm2020/lib/formly/field/wrapper/info.wrapper.component.mjs +3 -5
- package/esm2020/lib/formly/field/wrapper/section.wrapper.component.mjs +1 -1
- package/esm2020/lib/formly/field/wrapper/style.wrapper.component.mjs +2 -2
- package/esm2020/lib/formly/field/wrapper/subsection.wrapper.component.mjs +7 -7
- package/esm2020/lib/formly/field/wrapper/toggle.wrapper.component.mjs +16 -16
- package/esm2020/lib/formly/field/wrapper/working.wrapper.component.mjs +2 -2
- package/esm2020/lib/formly/field/wrapper/wrapper.mjs +6 -4
- package/esm2020/lib/formly/formly.context.directive.mjs +4 -4
- package/esm2020/lib/formly/formly.context.mjs +9 -7
- package/esm2020/lib/formly/formly.directive.mjs +1 -1
- package/esm2020/lib/formly/formly.form.component.mjs +7 -7
- package/esm2020/lib/formly/formly.module.mjs +5 -25
- package/esm2020/lib/formly/template/available.mjs +6 -4
- package/esm2020/lib/formly/template/login.mjs +8 -11
- package/esm2020/lib/layout/form.layout.module.mjs +5 -13
- package/esm2020/lib/layout/form.spacer.component.mjs +7 -3
- package/esm2020/lib/validator/available.mjs +2 -3
- package/esm2020/lib/validator/boolean.mjs +2 -2
- package/esm2020/lib/validator/email.mjs +2 -2
- package/esm2020/lib/validator/field.mjs +3 -3
- package/esm2020/lib/validator/number.mjs +20 -16
- package/fesm2015/dereekb-dbx-form.mjs +420 -624
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +423 -624
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/form/_form.scss +6 -4
- package/lib/form/action/form.action.directive.d.ts +4 -4
- package/lib/form/form.d.ts +4 -4
- package/lib/form/io/form.changes.directive.d.ts +3 -3
- package/lib/form/io/form.input.directive.d.ts +3 -3
- package/lib/form/io/form.loading.directive.d.ts +3 -3
- package/lib/formly/_formly.scss +6 -4
- package/lib/formly/config/validation.d.ts +4 -4
- package/lib/formly/field/checklist/_checklist.scss +6 -10
- package/lib/formly/field/checklist/checklist.field.d.ts +3 -3
- package/lib/formly/field/checklist/checklist.item.d.ts +8 -8
- package/lib/formly/field/checklist/checklist.item.field.component.d.ts +7 -9
- package/lib/formly/field/checklist/checklist.item.field.content.default.component.d.ts +4 -4
- package/lib/formly/field/checklist/checklist.item.field.d.ts +3 -3
- package/lib/formly/field/component/_component.scss +6 -4
- package/lib/formly/field/component/component.field.component.d.ts +3 -4
- package/lib/formly/field/component/component.field.d.ts +3 -4
- package/lib/formly/field/field.d.ts +3 -3
- package/lib/formly/field/selection/pickable/_pickable.scss +4 -3
- package/lib/formly/field/selection/pickable/pickable.chip.field.component.d.ts +1 -1
- package/lib/formly/field/selection/pickable/pickable.d.ts +9 -11
- package/lib/formly/field/selection/pickable/pickable.field.d.ts +3 -3
- package/lib/formly/field/selection/pickable/pickable.field.directive.d.ts +49 -50
- package/lib/formly/field/selection/pickable/pickable.list.field.component.d.ts +7 -7
- package/lib/formly/field/selection/searchable/_searchable.scss +4 -6
- package/lib/formly/field/selection/searchable/searchable.chip.field.component.d.ts +8 -8
- package/lib/formly/field/selection/searchable/searchable.d.ts +9 -8
- package/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.d.ts +1 -1
- package/lib/formly/field/selection/searchable/searchable.field.d.ts +9 -9
- package/lib/formly/field/selection/searchable/searchable.field.directive.d.ts +25 -25
- package/lib/formly/field/selection/searchable/searchable.text.field.component.d.ts +12 -9
- package/lib/formly/field/selection/searchable/text.chip.field.d.ts +3 -3
- package/lib/formly/field/selection/selection.d.ts +6 -6
- package/lib/formly/field/texteditor/_texteditor.scss +3 -8
- package/lib/formly/field/texteditor/texteditor.field.component.d.ts +1 -2
- package/lib/formly/field/value/array/_array.scss +2 -6
- package/lib/formly/field/value/array/array.field.component.d.ts +1 -1
- package/lib/formly/field/value/array/array.field.d.ts +1 -1
- package/lib/formly/field/value/boolean/_boolean.scss +6 -4
- package/lib/formly/field/value/date/_date.scss +7 -9
- package/lib/formly/field/value/date/datetime.field.component.d.ts +2 -3
- package/lib/formly/field/value/date/datetime.field.d.ts +1 -2
- package/lib/formly/field/value/enum/_enum.scss +6 -4
- package/lib/formly/field/value/enum/enum.field.d.ts +1 -1
- package/lib/formly/field/value/hidden.field.d.ts +1 -2
- package/lib/formly/field/value/phone/_phone.scss +2 -4
- package/lib/formly/field/value/text/_text.scss +6 -4
- package/lib/formly/field/value/text/text.additional.field.d.ts +3 -3
- package/lib/formly/field/value/text/text.address.field.d.ts +1 -2
- package/lib/formly/field/wrapper/_wrapper.scss +4 -4
- package/lib/formly/field/wrapper/expandable.wrapper.component.d.ts +4 -4
- package/lib/formly/field/wrapper/expandable.wrapper.delegate.d.ts +11 -11
- package/lib/formly/field/wrapper/toggle.wrapper.component.d.ts +4 -4
- package/lib/formly/field/wrapper/working.wrapper.component.d.ts +4 -2
- package/lib/formly/field/wrapper/wrapper.d.ts +2 -2
- package/lib/formly/formly.context.d.ts +4 -5
- package/lib/formly/formly.context.directive.d.ts +1 -1
- package/lib/formly/formly.directive.d.ts +1 -1
- package/lib/formly/formly.form.component.d.ts +2 -2
- package/lib/formly/template/login.d.ts +2 -3
- package/lib/layout/_layout.scss +6 -4
- package/lib/style/_config.scss +8 -6
- package/lib/style/_core.scss +1 -1
- package/lib/style/_mixin.scss +1 -1
- package/lib/style/_theming.scss +2 -12
- package/lib/style/_variables.scss +1 -1
- package/lib/validator/available.d.ts +1 -1
- package/lib/validator/boolean.d.ts +1 -1
- package/lib/validator/email.d.ts +1 -1
- package/lib/validator/field.d.ts +6 -6
- package/lib/validator/number.d.ts +8 -1
- package/package.json +4 -3
package/lib/form/_form.scss
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
// MARK: Variables
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
// MARK: Mixin
|
|
7
|
-
@mixin core() {
|
|
6
|
+
@mixin core() {
|
|
7
|
+
}
|
|
8
8
|
|
|
9
|
-
@mixin color($theme-config) {
|
|
9
|
+
@mixin color($theme-config) {
|
|
10
|
+
}
|
|
10
11
|
|
|
11
|
-
@mixin typography($typography-config) {
|
|
12
|
+
@mixin typography($typography-config) {
|
|
13
|
+
}
|
|
12
14
|
|
|
13
15
|
@mixin theme($theme-config) {
|
|
14
16
|
@include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-form-form') {
|
|
@@ -12,9 +12,9 @@ export declare const APP_ACTION_FORM_DISABLED_KEY = "dbx_action_form";
|
|
|
12
12
|
*
|
|
13
13
|
* If the source is not considered modified, the trigger will be ignored.
|
|
14
14
|
*/
|
|
15
|
-
export declare class DbxActionFormDirective<T =
|
|
16
|
-
readonly form: DbxMutableForm
|
|
17
|
-
readonly source: DbxActionContextStoreSourceInstance<
|
|
15
|
+
export declare class DbxActionFormDirective<T = object> implements OnInit, OnDestroy {
|
|
16
|
+
readonly form: DbxMutableForm<T>;
|
|
17
|
+
readonly source: DbxActionContextStoreSourceInstance<T, unknown>;
|
|
18
18
|
readonly lockSet: LockSet;
|
|
19
19
|
/**
|
|
20
20
|
* Optional validator that checks whether or not the value is
|
|
@@ -29,7 +29,7 @@ export declare class DbxActionFormDirective<T = any> implements OnInit, OnDestro
|
|
|
29
29
|
private _triggeredSub;
|
|
30
30
|
private _isCompleteSub;
|
|
31
31
|
private _isWorkingSub;
|
|
32
|
-
constructor(form: DbxMutableForm
|
|
32
|
+
constructor(form: DbxMutableForm<T>, source: DbxActionContextStoreSourceInstance<T, unknown>);
|
|
33
33
|
get formDisabledOnWorking(): boolean;
|
|
34
34
|
set formDisabledOnWorking(formDisabledOnWorking: boolean);
|
|
35
35
|
ngOnInit(): void;
|
package/lib/form/form.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface DbxFormEvent {
|
|
|
48
48
|
/**
|
|
49
49
|
* Form that has an event stream, value, and state items.
|
|
50
50
|
*/
|
|
51
|
-
export declare abstract class DbxForm<T =
|
|
51
|
+
export declare abstract class DbxForm<T = unknown> {
|
|
52
52
|
abstract readonly stream$: Observable<DbxFormEvent>;
|
|
53
53
|
/**
|
|
54
54
|
* Returns an observable that returns the current state of the form.
|
|
@@ -59,7 +59,7 @@ export declare abstract class DbxForm<T = any> {
|
|
|
59
59
|
*/
|
|
60
60
|
abstract getDisabled(): Observable<BooleanStringKeyArray>;
|
|
61
61
|
}
|
|
62
|
-
export declare abstract class DbxMutableForm<T =
|
|
62
|
+
export declare abstract class DbxMutableForm<T = unknown> extends DbxForm<T> {
|
|
63
63
|
/**
|
|
64
64
|
* LockSet for the form.
|
|
65
65
|
*/
|
|
@@ -85,5 +85,5 @@ export declare abstract class DbxMutableForm<T = any> extends DbxForm<T> {
|
|
|
85
85
|
*/
|
|
86
86
|
abstract forceFormUpdate(): void;
|
|
87
87
|
}
|
|
88
|
-
export declare function
|
|
89
|
-
export declare function
|
|
88
|
+
export declare function provideDbxForm<S extends DbxForm>(sourceType: Type<S>): Provider[];
|
|
89
|
+
export declare function provideDbxMutableForm<S extends DbxMutableForm>(sourceType: Type<S>): Provider[];
|
|
@@ -8,10 +8,10 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
*
|
|
9
9
|
* Emits undefined when the form is incomplete, and the value when the form is complete.
|
|
10
10
|
*/
|
|
11
|
-
export declare class DbxFormValueChangesDirective<T
|
|
12
|
-
readonly form: DbxForm
|
|
11
|
+
export declare class DbxFormValueChangesDirective<T> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
12
|
+
readonly form: DbxForm<T>;
|
|
13
13
|
readonly dbxFormValueChange: EventEmitter<Maybe<T>>;
|
|
14
|
-
constructor(form: DbxForm);
|
|
14
|
+
constructor(form: DbxForm<T>);
|
|
15
15
|
ngOnInit(): void;
|
|
16
16
|
ngOnDestroy(): void;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormValueChangesDirective<any>, [{ host: true; }]>;
|
|
@@ -16,10 +16,10 @@ export declare type DbxFormSourceDirectiveMode = 'reset' | 'always';
|
|
|
16
16
|
/**
|
|
17
17
|
* Used with a FormComponent to set the value based on the input value.
|
|
18
18
|
*/
|
|
19
|
-
export declare class DbxFormSourceDirective<T
|
|
20
|
-
readonly form: DbxMutableForm
|
|
19
|
+
export declare class DbxFormSourceDirective<T> extends AbstractSubscriptionDirective implements OnDestroy {
|
|
20
|
+
readonly form: DbxMutableForm<T>;
|
|
21
21
|
private _mode;
|
|
22
|
-
constructor(form: DbxMutableForm);
|
|
22
|
+
constructor(form: DbxMutableForm<T>);
|
|
23
23
|
get mode(): DbxFormSourceDirectiveMode;
|
|
24
24
|
set mode(mode: DbxFormSourceDirectiveMode);
|
|
25
25
|
set obs(obs: Maybe<ObservableOrValue<Maybe<Partial<T>>>>);
|
|
@@ -8,10 +8,10 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
/**
|
|
9
9
|
* Used with a FormComponent to set the value from a LoadingState when the value is available.
|
|
10
10
|
*/
|
|
11
|
-
export declare class DbxFormLoadingSourceDirective<T extends object =
|
|
12
|
-
readonly form: DbxMutableForm
|
|
11
|
+
export declare class DbxFormLoadingSourceDirective<T extends object = object> extends AbstractSubscriptionDirective implements OnDestroy {
|
|
12
|
+
readonly form: DbxMutableForm<T>;
|
|
13
13
|
private _mode;
|
|
14
|
-
constructor(form: DbxMutableForm);
|
|
14
|
+
constructor(form: DbxMutableForm<T>);
|
|
15
15
|
get mode(): DbxFormSourceDirectiveMode;
|
|
16
16
|
set mode(mode: DbxFormSourceDirectiveMode);
|
|
17
17
|
/**
|
package/lib/formly/_formly.scss
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
// MARK: Variables
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
// MARK: Mixin
|
|
7
|
-
@mixin core() {
|
|
6
|
+
@mixin core() {
|
|
7
|
+
}
|
|
8
8
|
|
|
9
|
-
@mixin color($theme-config) {
|
|
9
|
+
@mixin color($theme-config) {
|
|
10
|
+
}
|
|
10
11
|
|
|
11
|
-
@mixin typography($typography-config) {
|
|
12
|
+
@mixin typography($typography-config) {
|
|
13
|
+
}
|
|
12
14
|
|
|
13
15
|
@mixin theme($theme-config) {
|
|
14
16
|
@include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-form-formly') {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FieldTypeConfig } from '@ngx-formly/core';
|
|
2
2
|
import { ValidationMessageOption } from '@ngx-formly/core/lib/models';
|
|
3
|
-
export declare function minLengthValidationMessage(err:
|
|
4
|
-
export declare function maxLengthValidationMessage(err:
|
|
5
|
-
export declare function minValidationMessage(err:
|
|
6
|
-
export declare function maxValidationMessage(err:
|
|
3
|
+
export declare function minLengthValidationMessage(err: unknown, field: FieldTypeConfig): string;
|
|
4
|
+
export declare function maxLengthValidationMessage(err: unknown, field: FieldTypeConfig): string;
|
|
5
|
+
export declare function minValidationMessage(err: unknown, field: FieldTypeConfig): string;
|
|
6
|
+
export declare function maxValidationMessage(err: unknown, field: FieldTypeConfig): string;
|
|
7
7
|
export declare const REQUIRED_VALIDATION_MESSAGE: {
|
|
8
8
|
name: string;
|
|
9
9
|
message: string;
|
|
@@ -5,7 +5,6 @@ $dbx-checklist-item-spacing: 8px;
|
|
|
5
5
|
|
|
6
6
|
// MARK: Mixin
|
|
7
7
|
@mixin core() {
|
|
8
|
-
|
|
9
8
|
.dbx-checklist-item {
|
|
10
9
|
@include theming.elevation(1);
|
|
11
10
|
margin-bottom: 8px;
|
|
@@ -36,28 +35,25 @@ $dbx-checklist-item-spacing: 8px;
|
|
|
36
35
|
padding-left: $dbx-checklist-item-spacing;
|
|
37
36
|
border-left: 1px solid black;
|
|
38
37
|
}
|
|
39
|
-
|
|
40
38
|
}
|
|
41
|
-
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
@mixin color($theme-config) {
|
|
41
|
+
@mixin color($theme-config) {
|
|
42
|
+
}
|
|
45
43
|
|
|
46
44
|
@mixin typography($typography-config) {
|
|
47
|
-
|
|
48
45
|
.dbx-default-checklist-item-field {
|
|
49
|
-
|
|
50
46
|
.item-label {
|
|
51
47
|
font-size: 1.35em;
|
|
52
48
|
line-height: 1.35em;
|
|
53
49
|
}
|
|
54
50
|
|
|
55
|
-
.item-sublabel {
|
|
56
|
-
|
|
57
|
-
.item-description {}
|
|
51
|
+
.item-sublabel {
|
|
52
|
+
}
|
|
58
53
|
|
|
54
|
+
.item-description {
|
|
55
|
+
}
|
|
59
56
|
}
|
|
60
|
-
|
|
61
57
|
}
|
|
62
58
|
|
|
63
59
|
@mixin theme($theme-config) {
|
|
@@ -35,11 +35,11 @@ export declare class ChecklistItemFieldDataSetBuilder<D extends object, C extend
|
|
|
35
35
|
merge<T>(key: ChecklistItemFieldDataSetFieldKey<D>, config: Partial<ChecklistItemFieldBuilderInput<T>>): void;
|
|
36
36
|
override<T>(key: ChecklistItemFieldDataSetFieldKey<D>, config: Partial<ChecklistItemFieldBuilderInput<T>>): void;
|
|
37
37
|
_assertFieldExists(key: ChecklistItemFieldDataSetFieldKey<D>): ChecklistItemFieldDataSetItem<D, any>;
|
|
38
|
-
showValueFieldArrayCount<T extends ChecklistItemFieldDataSetFieldValueForKey<D> & Array<
|
|
38
|
+
showValueFieldArrayCount<T extends ChecklistItemFieldDataSetFieldValueForKey<D> & Array<unknown>>(key: ChecklistItemFieldDataSetFieldKey<D>, config?: Partial<ChecklistItemFieldDataSetBuilderInput<D, T>>): void;
|
|
39
39
|
showValueField<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: ChecklistItemFieldDataSetFieldKey<D>, config?: Partial<ChecklistItemFieldDataSetBuilderInput<D, T>>, labelFn?: (value: T) => Maybe<string>): void;
|
|
40
40
|
field<T>(config: ChecklistItemFieldDataSetBuilderInput<D, T>): void;
|
|
41
41
|
build(): FormlyFieldConfig[];
|
|
42
|
-
customContentFromData<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(mapFn: (data: D) => ChecklistItemDisplayContent): ChecklistItemFieldDisplayContentObs<T>;
|
|
43
|
-
contentWithValueFromData<K extends keyof D = keyof D, T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: K, contentFn?: (value: T) => ChecklistItemDisplayContent): ChecklistItemFieldDisplayContentObs<T>;
|
|
42
|
+
customContentFromData<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(mapFn: (data: D) => ChecklistItemDisplayContent<T>): ChecklistItemFieldDisplayContentObs<T>;
|
|
43
|
+
contentWithValueFromData<K extends keyof D = keyof D, T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: K, contentFn?: (value: T) => ChecklistItemDisplayContent<T>): ChecklistItemFieldDisplayContentObs<T>;
|
|
44
44
|
contentWithDisplayValueFromData<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: ChecklistItemFieldDataSetFieldKey<D>, labelFn?: (value: T) => Maybe<string>): ChecklistItemFieldDisplayContentObs<T>;
|
|
45
45
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ClickableAnchor } from
|
|
2
|
-
import { Maybe } from
|
|
3
|
-
import { Observable } from
|
|
4
|
-
export interface ChecklistItemDisplayContent<T =
|
|
1
|
+
import { ClickableAnchor } from '@dereekb/dbx-core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export interface ChecklistItemDisplayContent<T = unknown> {
|
|
5
5
|
/**
|
|
6
6
|
* Label to display.
|
|
7
7
|
*/
|
|
@@ -11,8 +11,8 @@ export interface ChecklistItemDisplayContent<T = any> {
|
|
|
11
11
|
*/
|
|
12
12
|
sublabel?: Maybe<string>;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Hint/description to display.
|
|
15
|
+
*/
|
|
16
16
|
description?: Maybe<string>;
|
|
17
17
|
/**
|
|
18
18
|
* Whether or not to display the ripple. Is true by default if the anchor is present.
|
|
@@ -32,7 +32,7 @@ export interface ChecklistItemDisplayContent<T = any> {
|
|
|
32
32
|
*
|
|
33
33
|
* Content is injected.
|
|
34
34
|
*/
|
|
35
|
-
export interface ChecklistItemFieldDisplayComponent<T =
|
|
35
|
+
export interface ChecklistItemFieldDisplayComponent<T = unknown> {
|
|
36
36
|
displayContent?: ChecklistItemDisplayContent<T>;
|
|
37
37
|
}
|
|
38
|
-
export declare type ChecklistItemFieldDisplayContentObs<T =
|
|
38
|
+
export declare type ChecklistItemFieldDisplayContentObs<T = unknown> = Observable<ChecklistItemDisplayContent<T>>;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
3
|
-
import { OnDestroy, OnInit, Type } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, OnInit, Type } from '@angular/core';
|
|
2
|
+
import { DbxInjectionComponentConfig, AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
4
3
|
import { ValidationErrors, FormGroup } from '@angular/forms';
|
|
5
4
|
import { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';
|
|
6
5
|
import { ChecklistItemFieldDisplayComponent, ChecklistItemFieldDisplayContentObs } from './checklist.item';
|
|
7
|
-
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
8
6
|
import { Maybe } from '@dereekb/util';
|
|
9
7
|
import * as i0 from "@angular/core";
|
|
10
|
-
export interface DbxChecklistItemFieldConfig<T =
|
|
8
|
+
export interface DbxChecklistItemFieldConfig<T = unknown> {
|
|
11
9
|
/**
|
|
12
10
|
* Observable used to retrieve content to display for the item.
|
|
13
11
|
*/
|
|
@@ -17,10 +15,10 @@ export interface DbxChecklistItemFieldConfig<T = any> {
|
|
|
17
15
|
*/
|
|
18
16
|
componentClass?: Type<ChecklistItemFieldDisplayComponent<T>>;
|
|
19
17
|
}
|
|
20
|
-
export interface ChecklistItemFormlyFieldConfig<T =
|
|
18
|
+
export interface ChecklistItemFormlyFieldConfig<T = unknown> extends FormlyFieldConfig {
|
|
21
19
|
checklistField: DbxChecklistItemFieldConfig<T>;
|
|
22
20
|
}
|
|
23
|
-
export declare class DbxChecklistItemFieldComponent<T =
|
|
21
|
+
export declare class DbxChecklistItemFieldComponent<T = unknown> extends FieldType<ChecklistItemFormlyFieldConfig<T> & FieldTypeConfig> implements OnInit, OnDestroy {
|
|
24
22
|
private _displayContent;
|
|
25
23
|
readonly displayContent$: import("rxjs").Observable<import("./checklist.item").ChecklistItemDisplayContent<T>>;
|
|
26
24
|
readonly anchor$: import("rxjs").Observable<Maybe<import("@dereekb/dbx-core").ClickableAnchor>>;
|
|
@@ -38,10 +36,10 @@ export declare class DbxChecklistItemFieldComponent<T = any> extends FieldType<C
|
|
|
38
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxChecklistItemFieldComponent<any>, never>;
|
|
39
37
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxChecklistItemFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
|
|
40
38
|
}
|
|
41
|
-
export declare class DbxChecklistItemContentComponent<T =
|
|
39
|
+
export declare class DbxChecklistItemContentComponent<T = unknown> extends AbstractSubscriptionDirective implements OnInit {
|
|
42
40
|
readonly checklistItemFieldComponent: DbxChecklistItemFieldComponent<T>;
|
|
43
41
|
readonly cdRef: ChangeDetectorRef;
|
|
44
|
-
config?: DbxInjectionComponentConfig
|
|
42
|
+
config?: DbxInjectionComponentConfig<ChecklistItemFieldDisplayComponent<T>>;
|
|
45
43
|
constructor(checklistItemFieldComponent: DbxChecklistItemFieldComponent<T>, cdRef: ChangeDetectorRef);
|
|
46
44
|
ngOnInit(): void;
|
|
47
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxChecklistItemContentComponent<any>, never>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ChecklistItemDisplayContent, ChecklistItemFieldDisplayComponent } from './checklist.item';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DbxDefaultChecklistItemFieldDisplayComponent implements ChecklistItemFieldDisplayComponent<
|
|
4
|
-
displayContent: ChecklistItemDisplayContent<
|
|
3
|
+
export declare class DbxDefaultChecklistItemFieldDisplayComponent<T = unknown> implements ChecklistItemFieldDisplayComponent<T> {
|
|
4
|
+
displayContent: ChecklistItemDisplayContent<T>;
|
|
5
5
|
get label(): import("../../../../../../../dist/packages/util/src").Maybe<string>;
|
|
6
6
|
get sublabel(): import("../../../../../../../dist/packages/util/src").Maybe<string>;
|
|
7
7
|
get description(): import("../../../../../../../dist/packages/util/src").Maybe<string>;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DbxDefaultChecklistItemFieldDisplayComponent
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DbxDefaultChecklistItemFieldDisplayComponent
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxDefaultChecklistItemFieldDisplayComponent<any>, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxDefaultChecklistItemFieldDisplayComponent<any>, "ng-component", never, { "displayContent": "displayContent"; }, {}, never, never>;
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LabeledFieldConfig } from '../field';
|
|
2
2
|
import { DbxChecklistItemFieldConfig, ChecklistItemFormlyFieldConfig } from './checklist.item.field.component';
|
|
3
|
-
export interface ChecklistItemFieldConfig<T =
|
|
3
|
+
export interface ChecklistItemFieldConfig<T = unknown> extends LabeledFieldConfig, DbxChecklistItemFieldConfig<T> {
|
|
4
4
|
}
|
|
5
|
-
export declare type ChecklistItemFieldBuilderInput<T =
|
|
6
|
-
export declare function checklistItemField<T =
|
|
5
|
+
export declare type ChecklistItemFieldBuilderInput<T = unknown> = Partial<ChecklistItemFieldConfig<T>> & Pick<ChecklistItemFieldConfig<T>, 'key' | 'displayContentObs'>;
|
|
6
|
+
export declare function checklistItemField<T = unknown>(config: ChecklistItemFieldBuilderInput<T>): ChecklistItemFormlyFieldConfig<T>;
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
// MARK: Variables
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
// MARK: Mixin
|
|
7
|
-
@mixin core() {
|
|
6
|
+
@mixin core() {
|
|
7
|
+
}
|
|
8
8
|
|
|
9
|
-
@mixin color($theme-config) {
|
|
9
|
+
@mixin color($theme-config) {
|
|
10
|
+
}
|
|
10
11
|
|
|
11
|
-
@mixin typography($typography-config) {
|
|
12
|
+
@mixin typography($typography-config) {
|
|
13
|
+
}
|
|
12
14
|
|
|
13
15
|
@mixin theme($theme-config) {
|
|
14
16
|
@include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-form-field-component') {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
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
|
|
5
|
-
|
|
6
|
-
export interface DbxFormComponentFormlyFieldConfig<T = any> extends FormlyFieldConfig {
|
|
4
|
+
export declare type DbxFormComponentFieldConfig<T> = DbxInjectionComponentConfig<T>;
|
|
5
|
+
export interface DbxFormComponentFormlyFieldConfig<T = unknown> extends FormlyFieldConfig {
|
|
7
6
|
componentField: DbxFormComponentFieldConfig<T>;
|
|
8
7
|
}
|
|
9
|
-
export declare class DbxFormComponentFieldComponent<T =
|
|
8
|
+
export declare class DbxFormComponentFieldComponent<T = unknown> extends FieldType<DbxFormComponentFormlyFieldConfig<T>> {
|
|
10
9
|
get config(): DbxInjectionComponentConfig<T>;
|
|
11
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormComponentFieldComponent<any>, never>;
|
|
12
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormComponentFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DbxFormComponentFieldConfig, DbxFormComponentFormlyFieldConfig } from
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
export declare function componentField<T>(config: ComponentFieldConfig<T>): DbxFormComponentFormlyFieldConfig;
|
|
1
|
+
import { DbxFormComponentFieldConfig, DbxFormComponentFormlyFieldConfig } from './component.field.component';
|
|
2
|
+
export declare type ComponentFieldConfig<T = unknown> = DbxFormComponentFieldConfig<T>;
|
|
3
|
+
export declare function componentField<T = unknown>(config: ComponentFieldConfig<T>): DbxFormComponentFormlyFieldConfig<T>;
|
|
@@ -16,7 +16,7 @@ export interface LabeledFieldConfig extends FieldConfig {
|
|
|
16
16
|
*/
|
|
17
17
|
autocomplete?: string | DisableAutocompleteForField;
|
|
18
18
|
}
|
|
19
|
-
export interface DefaultValueFieldConfig<T =
|
|
19
|
+
export interface DefaultValueFieldConfig<T = unknown> {
|
|
20
20
|
defaultValue?: T;
|
|
21
21
|
}
|
|
22
22
|
export interface AttributesFieldConfig {
|
|
@@ -32,10 +32,10 @@ export declare type PartialPotentialFieldConfig = Partial<FieldConfig> & Partial
|
|
|
32
32
|
* Validates the configuration on the input field.
|
|
33
33
|
*/
|
|
34
34
|
export declare function formlyField<T extends FormlyFieldConfig = FormlyFieldConfig>(fieldConfig: T): T;
|
|
35
|
-
export declare function templateOptionsForFieldConfig(fieldConfig: Partial<FieldConfig> & Partial<LabeledFieldConfig> & Partial<AttributesFieldConfig> & Partial<DescriptionFieldConfig>, override?:
|
|
35
|
+
export declare function templateOptionsForFieldConfig<O extends object = object>(fieldConfig: Partial<FieldConfig> & Partial<LabeledFieldConfig> & Partial<AttributesFieldConfig> & Partial<DescriptionFieldConfig>, override?: PartialPotentialFieldConfig & O): {
|
|
36
36
|
templateOptions: Partial<FormlyTemplateOptions>;
|
|
37
37
|
};
|
|
38
|
-
export declare function templateOptionsValueForFieldConfig<T extends FormlyTemplateOptions>(fieldConfig: PartialPotentialFieldConfig, override?: PartialPotentialFieldConfig &
|
|
38
|
+
export declare function templateOptionsValueForFieldConfig<T extends FormlyTemplateOptions, O extends object = object>(fieldConfig: PartialPotentialFieldConfig, override?: PartialPotentialFieldConfig & O): Partial<T>;
|
|
39
39
|
/**
|
|
40
40
|
* Returns configuration for a formlyField that will disable autofill/autocomplete for a field.
|
|
41
41
|
*/
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
// MARK: Variables
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
// MARK: Mixin
|
|
7
6
|
@mixin core() {
|
|
8
7
|
.dbx-pickable-item-field-filter {
|
|
@@ -15,9 +14,11 @@
|
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
@mixin color($theme-config) {
|
|
17
|
+
@mixin color($theme-config) {
|
|
18
|
+
}
|
|
19
19
|
|
|
20
|
-
@mixin typography($typography-config) {
|
|
20
|
+
@mixin typography($typography-config) {
|
|
21
|
+
}
|
|
21
22
|
|
|
22
23
|
@mixin theme($theme-config) {
|
|
23
24
|
@include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-form-field-selection-pickable') {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractDbxPickableItemFieldDirective, PickableItemFieldItem } from
|
|
1
|
+
import { AbstractDbxPickableItemFieldDirective, PickableItemFieldItem } from './pickable.field.directive';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* Used for picking pre-set values using chips as the presentation.
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { Maybe } from
|
|
2
|
-
import { Observable } from
|
|
3
|
-
import { SelectionDisplayValue, SelectionValue, SelectionValueHashFn } from
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
export interface PickableValueFieldDisplayValue<T, M = any> extends SelectionDisplayValue<T, M> {
|
|
7
|
-
}
|
|
1
|
+
import { Maybe, PrimativeKey } from '@dereekb/util';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { SelectionDisplayValue, SelectionValue, SelectionValueHashFn } from '../selection';
|
|
4
|
+
export declare type PickableValueFieldValue<T, M = unknown> = SelectionValue<T, M>;
|
|
5
|
+
export declare type PickableValueFieldDisplayValue<T, M = unknown> = SelectionDisplayValue<T, M>;
|
|
8
6
|
/**
|
|
9
7
|
* PickableValueField function for retrieving all values.
|
|
10
8
|
*/
|
|
11
|
-
export declare type PickableValueFieldLoadValuesFn<T, M =
|
|
9
|
+
export declare type PickableValueFieldLoadValuesFn<T, M = unknown> = () => Observable<PickableValueFieldValue<T, M>[]>;
|
|
12
10
|
/**
|
|
13
11
|
* PickableValueField function that allows the values a chance to go through another observable for any changes.
|
|
14
12
|
*
|
|
@@ -17,12 +15,12 @@ export declare type PickableValueFieldLoadValuesFn<T, M = any> = () => Observabl
|
|
|
17
15
|
*
|
|
18
16
|
* The value itself should not change. All other fields on the value may change, however.
|
|
19
17
|
*/
|
|
20
|
-
export declare type PickableValueFieldDisplayFn<T, M =
|
|
18
|
+
export declare type PickableValueFieldDisplayFn<T, M = unknown> = (values: PickableValueFieldValue<T, M>[]) => Observable<PickableValueFieldDisplayValue<T, M>[]>;
|
|
21
19
|
/**
|
|
22
20
|
* Used for filtering the values that should be displayed.
|
|
23
21
|
*/
|
|
24
|
-
export declare type PickableValueFieldFilterFn<T, M =
|
|
22
|
+
export declare type PickableValueFieldFilterFn<T, M = unknown> = (flterText: Maybe<string>, values: PickableValueFieldDisplayValue<T, M>[]) => Observable<T[]>;
|
|
25
23
|
/**
|
|
26
24
|
* Used to hash the value from the input pickable value.
|
|
27
25
|
*/
|
|
28
|
-
export declare type PickableValueFieldHashFn<T> = SelectionValueHashFn<T>;
|
|
26
|
+
export declare type PickableValueFieldHashFn<T, H extends PrimativeKey = PrimativeKey> = SelectionValueHashFn<T, H>;
|
|
@@ -7,7 +7,7 @@ import { PickableItemFieldItem, PickableValueFieldsFieldConfig } from './pickabl
|
|
|
7
7
|
export { PickableItemFieldItem };
|
|
8
8
|
export declare function filterPickableItemFieldValuesByLabel<T>(filterText: Maybe<string>, values: PickableValueFieldDisplayValue<T>[]): Observable<T[]>;
|
|
9
9
|
export declare function sortPickableItemsByLabel<T>(chips: PickableItemFieldItem<T>[]): PickableItemFieldItem<T>[];
|
|
10
|
-
export interface PickableItemFieldConfig<T =
|
|
10
|
+
export interface PickableItemFieldConfig<T = unknown> extends LabeledFieldConfig, PickableValueFieldsFieldConfig<T> {
|
|
11
11
|
}
|
|
12
|
-
export declare function pickableItemChipField<T =
|
|
13
|
-
export declare function pickableItemListField<T =
|
|
12
|
+
export declare function pickableItemChipField<T = unknown>(config: PickableItemFieldConfig<T>): FormlyFieldConfig;
|
|
13
|
+
export declare function pickableItemListField<T = unknown>(config: PickableItemFieldConfig<T>): FormlyFieldConfig;
|