@dynamicforms/vue-forms 0.2.4 → 0.2.5
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/dist/index.d.ts
CHANGED
|
@@ -23,12 +23,14 @@ declare type ActionExecutor = (field: IField, supr: FieldActionExecute, ...param
|
|
|
23
23
|
|
|
24
24
|
export declare class ActionsMap extends Map<symbol, FieldActionExecute> {
|
|
25
25
|
private readonly eagerActions;
|
|
26
|
+
private readonly registeredActions;
|
|
26
27
|
register(action: FieldActionBase): void;
|
|
27
28
|
trigger<T extends FieldActionBase>(ActionClass: {
|
|
28
29
|
new (...args: any[]): T;
|
|
29
30
|
classIdentifier: symbol;
|
|
30
31
|
}, field: IField, ...params: any[]): Promise<any>;
|
|
31
32
|
triggerEager(field: IField, ...params: any[]): Promise<any>;
|
|
33
|
+
cloneWithoutValidators(): ActionsMap;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export declare interface ActionValue {
|
|
@@ -38,6 +40,14 @@ export declare interface ActionValue {
|
|
|
38
40
|
|
|
39
41
|
export declare function buildErrorMessage(mdErrorString: string): string | MdString;
|
|
40
42
|
|
|
43
|
+
declare class CompareTo<T = any> extends Validator {
|
|
44
|
+
private otherField;
|
|
45
|
+
private isValidComparison;
|
|
46
|
+
private unregistered;
|
|
47
|
+
constructor(otherField: IField, isValidComparison: (myValue: T, otherValue: T) => boolean, message: RenderContentRef);
|
|
48
|
+
unregister(): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
41
51
|
export declare class ConditionalEnabledAction extends ConditionalStatementAction {
|
|
42
52
|
constructor(statement: Statement);
|
|
43
53
|
}
|
|
@@ -128,6 +138,7 @@ export declare abstract class FieldActionBase implements IFieldAction {
|
|
|
128
138
|
execute(field: IField, supr: IFieldAction['execute'], ...params: any[]): Promise<any>;
|
|
129
139
|
get eager(): boolean;
|
|
130
140
|
boundToField(field: IField): void;
|
|
141
|
+
unregister(): void;
|
|
131
142
|
}
|
|
132
143
|
|
|
133
144
|
export declare type FieldActionExecute<T = any> = (field: IField<T>, ...params: any[]) => Promise<any>;
|
|
@@ -157,6 +168,7 @@ export declare abstract class FieldBase<T = any> implements IField<T> {
|
|
|
157
168
|
get isChanged(): boolean;
|
|
158
169
|
registerAction(action: IFieldAction<T>): this;
|
|
159
170
|
triggerAction<T2 extends IFieldAction<T>>(actionClass: new (...args: any[]) => T2, ...params: any[]): any;
|
|
171
|
+
clearValidators(): void;
|
|
160
172
|
}
|
|
161
173
|
|
|
162
174
|
declare namespace Form {
|
|
@@ -229,6 +241,7 @@ export declare class Group<T extends GenericFieldsInterface = GenericFieldsInter
|
|
|
229
241
|
private _value;
|
|
230
242
|
private suppressNotifyValueChanged;
|
|
231
243
|
constructor(fields: T, params?: Partial<IFieldConstructorParams>);
|
|
244
|
+
addField(fieldName: string, field: IField): void;
|
|
232
245
|
private static isValidFields;
|
|
233
246
|
static createFromFormData(data: Record<string, any> | null): Group;
|
|
234
247
|
field<K extends keyof T>(fieldName: K): T[K] | null;
|
|
@@ -259,6 +272,7 @@ export declare interface IField<T = any> {
|
|
|
259
272
|
registerAction(action: IFieldAction<T>): this;
|
|
260
273
|
triggerAction<T2 extends IFieldAction<T>>(actionClass: abstract new (...args: any[]) => T2, ...params: any[]): any;
|
|
261
274
|
validate(): void;
|
|
275
|
+
clearValidators(): void;
|
|
262
276
|
isChanged: boolean;
|
|
263
277
|
}
|
|
264
278
|
|
|
@@ -467,6 +481,7 @@ export declare class Validator<T = any> extends ValueChangedAction {
|
|
|
467
481
|
|
|
468
482
|
export declare namespace Validators {
|
|
469
483
|
export {
|
|
484
|
+
CompareTo,
|
|
470
485
|
InAllowedValues,
|
|
471
486
|
Required_2 as Required,
|
|
472
487
|
Pattern,
|