@stonecrop/aform 0.11.9 → 0.11.10
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/aform.d.ts +22 -0
- package/dist/aform.js +554 -548
- package/dist/aform.js.map +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/src/directives/mask.d.ts.map +1 -1
- package/dist/src/directives/mask.js +5 -7
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/types/index.d.ts +6 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/deserialize.d.ts +16 -0
- package/dist/src/utils/deserialize.d.ts.map +1 -0
- package/dist/src/utils/deserialize.js +18 -0
- package/package.json +4 -4
- package/src/components/AForm.vue +2 -2
- package/src/components/form/AFormLink.vue +6 -2
- package/src/directives/mask.ts +7 -8
- package/src/index.ts +1 -0
- package/src/types/index.ts +7 -0
- package/src/utils/deserialize.ts +18 -0
package/dist/aform.d.ts
CHANGED
|
@@ -83,6 +83,12 @@ export declare type BaseSchema = {
|
|
|
83
83
|
* @public
|
|
84
84
|
*/
|
|
85
85
|
mode?: FormMode;
|
|
86
|
+
/**
|
|
87
|
+
* Hide the field from the form UI while keeping it in the data model.
|
|
88
|
+
* Consumed by AForm — not passed down to field components.
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
hidden?: boolean;
|
|
86
92
|
};
|
|
87
93
|
|
|
88
94
|
/**
|
|
@@ -137,6 +143,22 @@ export declare type ComponentProps = {
|
|
|
137
143
|
};
|
|
138
144
|
};
|
|
139
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Deserializes a stringified function expression into a typed callable.
|
|
148
|
+
*
|
|
149
|
+
* Throws if the string cannot be parsed as a function (SyntaxError) or if the
|
|
150
|
+
* resulting expression is not callable (TypeError), or if the expression references
|
|
151
|
+
* an undefined variable (ReferenceError). Callers are responsible for try/catch.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```ts
|
|
155
|
+
* const fn = deserializeFunction<(x: number) => number>('(x) => x * 2')
|
|
156
|
+
* fn(5) // 10
|
|
157
|
+
* ```
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
export declare function deserializeFunction<T extends (...args: any[]) => any>(source: string): T;
|
|
161
|
+
|
|
140
162
|
/**
|
|
141
163
|
* Schema structure for defining fieldsets inside AForm
|
|
142
164
|
* @public
|