@dereekb/dbx-form 12.3.2 → 12.3.4
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/calendar/lib/calendar.schedule.selection.dialog.button.component.mjs +1 -1
- package/esm2022/calendar/lib/calendar.schedule.selection.popover.button.component.mjs +1 -1
- package/esm2022/calendar/lib/calendar.schedule.selection.toggle.button.component.mjs +1 -1
- package/esm2022/lib/form/action/form.action.dialog.component.mjs +79 -0
- package/esm2022/lib/form/action/index.mjs +2 -1
- package/esm2022/lib/formly/field/selection/sourceselect/sourceselect.field.component.mjs +2 -2
- package/esm2022/lib/formly/field/value/array/array.field.component.mjs +2 -2
- package/fesm2022/dereekb-dbx-form-calendar.mjs +3 -3
- package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form.mjs +453 -385
- package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
- package/lib/form/action/form.action.dialog.component.d.ts +62 -0
- package/lib/form/action/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { AbstractDialogDirective, DbxButtonStyle } from '@dereekb/dbx-web';
|
|
3
|
+
import { MatDialog, MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
|
|
4
|
+
import { Maybe } from '@dereekb/util';
|
|
5
|
+
import { MaybeObservableOrValueGetter, ObservableOrValueGetter, WorkUsingContext } from '@dereekb/rxjs';
|
|
6
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
7
|
+
import { DbxButtonDisplay } from '@dereekb/dbx-core';
|
|
8
|
+
import { DbxFormlyContext } from '../../formly/formly.context';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export interface DbxFormActionDialogComponentButtonConfig extends DbxButtonDisplay, DbxButtonStyle {
|
|
11
|
+
}
|
|
12
|
+
export interface DbxFormActionDialogComponentConfig<O> {
|
|
13
|
+
/**
|
|
14
|
+
* Header text for the dialog.
|
|
15
|
+
*/
|
|
16
|
+
readonly header: string;
|
|
17
|
+
/**
|
|
18
|
+
* Used for retrieving the fields to display in the dialog.
|
|
19
|
+
*/
|
|
20
|
+
readonly fields: ObservableOrValueGetter<FormlyFieldConfig[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Initial value for the form.
|
|
23
|
+
*/
|
|
24
|
+
readonly initialValue?: MaybeObservableOrValueGetter<O>;
|
|
25
|
+
/**
|
|
26
|
+
* Text/Icon for the submit button.
|
|
27
|
+
*/
|
|
28
|
+
readonly submitButtonConfig?: DbxFormActionDialogComponentButtonConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Dialog-specific configuration
|
|
31
|
+
*/
|
|
32
|
+
readonly dialog?: Omit<MatDialogConfig, 'data'>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
export declare class DbxFormActionDialogComponent<O> extends AbstractDialogDirective<O, DbxFormActionDialogComponentConfig<O>> implements OnInit, OnDestroy {
|
|
38
|
+
private readonly _fieldsSub;
|
|
39
|
+
readonly context: DbxFormlyContext<O>;
|
|
40
|
+
readonly fields$: import("rxjs").Observable<FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
41
|
+
[additionalProperties: string]: any;
|
|
42
|
+
}>[]>;
|
|
43
|
+
readonly initialValue$: import("rxjs").Observable<O | null | undefined>;
|
|
44
|
+
readonly header: string;
|
|
45
|
+
readonly submitButtonConfig: {
|
|
46
|
+
icon?: Maybe<string>;
|
|
47
|
+
text: string | null;
|
|
48
|
+
type?: import("@dereekb/dbx-web").DbxButtonType;
|
|
49
|
+
color?: import("@angular/material/core").ThemePalette | import("@dereekb/dbx-web").DbxThemeColor;
|
|
50
|
+
spinnerColor?: import("@angular/material/core").ThemePalette | import("@dereekb/dbx-web").DbxThemeColor;
|
|
51
|
+
customButtonColor?: string;
|
|
52
|
+
customTextColor?: string;
|
|
53
|
+
customSpinnerColor?: string;
|
|
54
|
+
fab?: boolean;
|
|
55
|
+
};
|
|
56
|
+
ngOnInit(): void;
|
|
57
|
+
ngOnDestroy(): void;
|
|
58
|
+
readonly handleSubmitValue: WorkUsingContext<O>;
|
|
59
|
+
static openDialogWithForm<O>(matDialog: MatDialog, config: DbxFormActionDialogComponentConfig<O>): MatDialogRef<DbxFormActionDialogComponent<O>, Maybe<O>>;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormActionDialogComponent<any>, never>;
|
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormActionDialogComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
62
|
+
}
|