@ngxs/form-plugin 3.8.2-dev.master-09bece1 → 3.8.2-dev.master-b0e24dd

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/index.d.ts CHANGED
@@ -1,4 +1,150 @@
1
- /**
2
- * The public api for consumers of @ngxs/form-plugin
3
- */
4
- export * from './src/public_api';
1
+ import * as i0 from '@angular/core';
2
+ import { OnInit, OnDestroy, ChangeDetectorRef, ModuleWithProviders, EnvironmentProviders } from '@angular/core';
3
+ import { FormGroupDirective } from '@angular/forms';
4
+ import { Actions, Store } from '@ngxs/store';
5
+ import { NgxsPlugin, NgxsNextPluginFn } from '@ngxs/store/plugins';
6
+
7
+ declare class NgxsFormDirective implements OnInit, OnDestroy {
8
+ private _actions$;
9
+ private _store;
10
+ private _formGroupDirective;
11
+ private _cd;
12
+ path: string;
13
+ set debounce(debounce: string | number);
14
+ get debounce(): string | number;
15
+ private _debounce;
16
+ set clearDestroy(val: boolean);
17
+ get clearDestroy(): boolean;
18
+ private _clearDestroy;
19
+ private _updating;
20
+ private readonly _destroy$;
21
+ constructor(_actions$: Actions, _store: Store, _formGroupDirective: FormGroupDirective, _cd: ChangeDetectorRef);
22
+ ngOnInit(): void;
23
+ updateFormStateWithRawValue(withFormStatus?: boolean): void;
24
+ ngOnDestroy(): void;
25
+ private debounceChange;
26
+ private get form();
27
+ private getStateStream;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFormDirective, never>;
29
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxsFormDirective, "[ngxsForm]", never, { "path": { "alias": "ngxsForm"; "required": false; }; "debounce": { "alias": "ngxsFormDebounce"; "required": false; }; "clearDestroy": { "alias": "ngxsFormClearOnDestroy"; "required": false; }; }, {}, never, never, true, never>;
30
+ }
31
+
32
+ declare class NgxsFormPluginModule {
33
+ static forRoot(): ModuleWithProviders<NgxsFormPluginModule>;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFormPluginModule, never>;
35
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsFormPluginModule, never, [typeof NgxsFormDirective], [typeof NgxsFormDirective]>;
36
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxsFormPluginModule>;
37
+ }
38
+ declare function withNgxsFormPlugin(): EnvironmentProviders;
39
+
40
+ declare class NgxsFormPlugin implements NgxsPlugin {
41
+ handle(state: any, event: any, next: NgxsNextPluginFn): any;
42
+ private joinPathWithPropertyPath;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFormPlugin, never>;
44
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxsFormPlugin>;
45
+ }
46
+
47
+ declare class UpdateFormStatus {
48
+ payload: {
49
+ status: string | null;
50
+ path: string;
51
+ };
52
+ static readonly type = "[Forms] Update Form Status";
53
+ constructor(payload: {
54
+ status: string | null;
55
+ path: string;
56
+ });
57
+ }
58
+ declare class UpdateFormValue {
59
+ payload: {
60
+ value: any;
61
+ path: string;
62
+ propertyPath?: string;
63
+ };
64
+ static readonly type = "[Forms] Update Form Value";
65
+ constructor(payload: {
66
+ value: any;
67
+ path: string;
68
+ propertyPath?: string;
69
+ });
70
+ }
71
+ declare class UpdateForm {
72
+ payload: {
73
+ value: any;
74
+ errors: {
75
+ [k: string]: string;
76
+ } | null;
77
+ dirty: boolean | null;
78
+ status: string | null;
79
+ path: string;
80
+ };
81
+ static readonly type = "[Forms] Update Form";
82
+ constructor(payload: {
83
+ value: any;
84
+ errors: {
85
+ [k: string]: string;
86
+ } | null;
87
+ dirty: boolean | null;
88
+ status: string | null;
89
+ path: string;
90
+ });
91
+ }
92
+ declare class UpdateFormDirty {
93
+ payload: {
94
+ dirty: boolean | null;
95
+ path: string;
96
+ };
97
+ static readonly type = "[Forms] Update Form Dirty";
98
+ constructor(payload: {
99
+ dirty: boolean | null;
100
+ path: string;
101
+ });
102
+ }
103
+ declare class SetFormDirty {
104
+ payload: string;
105
+ static readonly type = "[Forms] Set Form Dirty";
106
+ constructor(payload: string);
107
+ }
108
+ declare class SetFormPristine {
109
+ payload: string;
110
+ static readonly type = "[Forms] Set Form Pristine";
111
+ constructor(payload: string);
112
+ }
113
+ declare class UpdateFormErrors {
114
+ payload: {
115
+ errors: {
116
+ [k: string]: string;
117
+ } | null;
118
+ path: string;
119
+ };
120
+ static readonly type = "[Forms] Update Form Errors";
121
+ constructor(payload: {
122
+ errors: {
123
+ [k: string]: string;
124
+ } | null;
125
+ path: string;
126
+ });
127
+ }
128
+ declare class SetFormDisabled {
129
+ payload: string;
130
+ static readonly type = "[Forms] Set Form Disabled";
131
+ constructor(payload: string);
132
+ }
133
+ declare class SetFormEnabled {
134
+ payload: string;
135
+ static readonly type = "[Forms] Set Form Enabled";
136
+ constructor(payload: string);
137
+ }
138
+ declare class ResetForm {
139
+ payload: {
140
+ path: string;
141
+ value?: any;
142
+ };
143
+ static readonly type = "[Forms] Reset Form";
144
+ constructor(payload: {
145
+ path: string;
146
+ value?: any;
147
+ });
148
+ }
149
+
150
+ export { NgxsFormDirective, NgxsFormPlugin, NgxsFormPluginModule, ResetForm, SetFormDirty, SetFormDisabled, SetFormEnabled, SetFormPristine, UpdateForm, UpdateFormDirty, UpdateFormErrors, UpdateFormStatus, UpdateFormValue, withNgxsFormPlugin };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ngxs/form-plugin",
3
3
  "description": "form plugin for @ngxs/store",
4
- "version": "3.8.2-dev.master-09bece1",
4
+ "version": "3.8.2-dev.master-b0e24dd",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "@angular/core": ">=12.0.0 <18.0.0",
package/src/actions.d.ts DELETED
@@ -1,102 +0,0 @@
1
- export declare class UpdateFormStatus {
2
- payload: {
3
- status: string | null;
4
- path: string;
5
- };
6
- static readonly type = "[Forms] Update Form Status";
7
- constructor(payload: {
8
- status: string | null;
9
- path: string;
10
- });
11
- }
12
- export declare class UpdateFormValue {
13
- payload: {
14
- value: any;
15
- path: string;
16
- propertyPath?: string;
17
- };
18
- static readonly type = "[Forms] Update Form Value";
19
- constructor(payload: {
20
- value: any;
21
- path: string;
22
- propertyPath?: string;
23
- });
24
- }
25
- export declare class UpdateForm {
26
- payload: {
27
- value: any;
28
- errors: {
29
- [k: string]: string;
30
- } | null;
31
- dirty: boolean | null;
32
- status: string | null;
33
- path: string;
34
- };
35
- static readonly type = "[Forms] Update Form";
36
- constructor(payload: {
37
- value: any;
38
- errors: {
39
- [k: string]: string;
40
- } | null;
41
- dirty: boolean | null;
42
- status: string | null;
43
- path: string;
44
- });
45
- }
46
- export declare class UpdateFormDirty {
47
- payload: {
48
- dirty: boolean | null;
49
- path: string;
50
- };
51
- static readonly type = "[Forms] Update Form Dirty";
52
- constructor(payload: {
53
- dirty: boolean | null;
54
- path: string;
55
- });
56
- }
57
- export declare class SetFormDirty {
58
- payload: string;
59
- static readonly type = "[Forms] Set Form Dirty";
60
- constructor(payload: string);
61
- }
62
- export declare class SetFormPristine {
63
- payload: string;
64
- static readonly type = "[Forms] Set Form Pristine";
65
- constructor(payload: string);
66
- }
67
- export declare class UpdateFormErrors {
68
- payload: {
69
- errors: {
70
- [k: string]: string;
71
- } | null;
72
- path: string;
73
- };
74
- static readonly type = "[Forms] Update Form Errors";
75
- constructor(payload: {
76
- errors: {
77
- [k: string]: string;
78
- } | null;
79
- path: string;
80
- });
81
- }
82
- export declare class SetFormDisabled {
83
- payload: string;
84
- static readonly type = "[Forms] Set Form Disabled";
85
- constructor(payload: string);
86
- }
87
- export declare class SetFormEnabled {
88
- payload: string;
89
- static readonly type = "[Forms] Set Form Enabled";
90
- constructor(payload: string);
91
- }
92
- export declare class ResetForm {
93
- payload: {
94
- path: string;
95
- value?: any;
96
- };
97
- static readonly type = "[Forms] Reset Form";
98
- constructor(payload: {
99
- path: string;
100
- value?: any;
101
- });
102
- }
@@ -1,28 +0,0 @@
1
- import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
- import { FormGroupDirective } from '@angular/forms';
3
- import { Actions, Store } from '@ngxs/store';
4
- import * as i0 from "@angular/core";
5
- export declare class NgxsFormDirective implements OnInit, OnDestroy {
6
- private _actions$;
7
- private _store;
8
- private _formGroupDirective;
9
- private _cd;
10
- path: string;
11
- set debounce(debounce: string | number);
12
- get debounce(): string | number;
13
- private _debounce;
14
- set clearDestroy(val: boolean);
15
- get clearDestroy(): boolean;
16
- private _clearDestroy;
17
- private _updating;
18
- private readonly _destroy$;
19
- constructor(_actions$: Actions, _store: Store, _formGroupDirective: FormGroupDirective, _cd: ChangeDetectorRef);
20
- ngOnInit(): void;
21
- updateFormStateWithRawValue(withFormStatus?: boolean): void;
22
- ngOnDestroy(): void;
23
- private debounceChange;
24
- private get form();
25
- private getStateStream;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFormDirective, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxsFormDirective, "[ngxsForm]", never, { "path": { "alias": "ngxsForm"; "required": false; }; "debounce": { "alias": "ngxsFormDebounce"; "required": false; }; "clearDestroy": { "alias": "ngxsFormClearOnDestroy"; "required": false; }; }, {}, never, never, true, never>;
28
- }
@@ -1,10 +0,0 @@
1
- import { ModuleWithProviders, EnvironmentProviders } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "./directive";
4
- export declare class NgxsFormPluginModule {
5
- static forRoot(): ModuleWithProviders<NgxsFormPluginModule>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFormPluginModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsFormPluginModule, never, [typeof i1.NgxsFormDirective], [typeof i1.NgxsFormDirective]>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxsFormPluginModule>;
9
- }
10
- export declare function withNgxsFormPlugin(): EnvironmentProviders;
@@ -1,8 +0,0 @@
1
- import { NgxsNextPluginFn, NgxsPlugin } from '@ngxs/store/plugins';
2
- import * as i0 from "@angular/core";
3
- export declare class NgxsFormPlugin implements NgxsPlugin {
4
- handle(state: any, event: any, next: NgxsNextPluginFn): any;
5
- private joinPathWithPropertyPath;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFormPlugin, never>;
7
- static ɵprov: i0.ɵɵInjectableDeclaration<NgxsFormPlugin>;
8
- }
@@ -1,4 +0,0 @@
1
- export { NgxsFormPluginModule, withNgxsFormPlugin } from './form.module';
2
- export { NgxsFormPlugin } from './form.plugin';
3
- export { NgxsFormDirective } from './directive';
4
- export * from './actions';