foorm 0.0.2-alpha.8 → 0.0.2-alpha.9
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 +11 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,15 @@ type TFoormEntryExecutable<T = unknown, O = string> = TFoormEntry<T, O, TFoormFn
|
|
|
46
46
|
label: string | TFoormFn<T, string>;
|
|
47
47
|
type: string;
|
|
48
48
|
};
|
|
49
|
+
type TFoormMetaExecutable = {
|
|
50
|
+
title: string | TFoormFn<undefined, string>;
|
|
51
|
+
submit: {
|
|
52
|
+
text: string | TFoormFn<undefined, string>;
|
|
53
|
+
disabled: boolean | TFoormFn<undefined, boolean>;
|
|
54
|
+
};
|
|
55
|
+
context: Record<string, unknown>;
|
|
56
|
+
entries: TFoormEntryExecutable[];
|
|
57
|
+
};
|
|
49
58
|
|
|
50
59
|
interface TFoormSubmit<S = TFtring, B = TFtring> {
|
|
51
60
|
text: string | S;
|
|
@@ -88,15 +97,7 @@ declare class Foorm {
|
|
|
88
97
|
*
|
|
89
98
|
* @returns form metadata with functions
|
|
90
99
|
*/
|
|
91
|
-
executable():
|
|
92
|
-
title: string | TFoormFn<undefined, string>;
|
|
93
|
-
submit: {
|
|
94
|
-
text: string | TFoormFn<undefined, string>;
|
|
95
|
-
disabled: boolean | TFoormFn<undefined, boolean>;
|
|
96
|
-
};
|
|
97
|
-
context: Record<string, unknown>;
|
|
98
|
-
entries: TFoormEntryExecutable[];
|
|
99
|
-
};
|
|
100
|
+
executable(): TFoormMetaExecutable;
|
|
100
101
|
prepareValidators(_validators: TFoormEntry['validators']): TFoormValidatorFn<string>[];
|
|
101
102
|
supportsAltAction(altAction: string): boolean;
|
|
102
103
|
getFormValidator(): (inputs: Record<string, unknown>) => {
|
|
@@ -117,4 +118,4 @@ declare function validate<T = string>(opts: TFoormFnScope<T> & {
|
|
|
117
118
|
declare function isFtring(input: unknown): input is TFtring;
|
|
118
119
|
declare function ftring(strings: TemplateStringsArray, __type__?: TFtring['__type__']): TFtring;
|
|
119
120
|
|
|
120
|
-
export { Foorm, type ObjSOF, type StringOrFtring, type TFoormEntry, type TFoormEntryExecutable, type TFoormFn, type TFoormFnScope, type TFoormOptions, type TFoormSubmit, type TFoormValidatorFn, type TFtring, ftring, isFtring, validate };
|
|
121
|
+
export { Foorm, type ObjSOF, type StringOrFtring, type TFoormEntry, type TFoormEntryExecutable, type TFoormFn, type TFoormFnScope, type TFoormMetaExecutable, type TFoormOptions, type TFoormSubmit, type TFoormValidatorFn, type TFtring, ftring, isFtring, validate };
|