@dmitryvim/form-builder 0.2.24 → 0.2.26
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/README.md +65 -11
- package/dist/browser/formbuilder.min.js +122 -122
- package/dist/browser/formbuilder.v0.2.26.min.js +606 -0
- package/dist/cjs/index.cjs +263 -151
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +259 -151
- package/dist/esm/index.js.map +1 -1
- package/dist/form-builder.js +122 -122
- package/dist/types/types/schema.d.ts +2 -0
- package/dist/types/utils/helpers.d.ts +6 -0
- package/package.json +1 -1
- package/dist/browser/formbuilder.v0.2.24.min.js +0 -606
|
@@ -30,6 +30,7 @@ export interface BaseElement {
|
|
|
30
30
|
hint?: string;
|
|
31
31
|
required?: boolean;
|
|
32
32
|
hidden?: boolean;
|
|
33
|
+
readonly?: boolean;
|
|
33
34
|
default?: any;
|
|
34
35
|
actions?: ElementAction[];
|
|
35
36
|
enableIf?: EnableCondition;
|
|
@@ -216,4 +217,5 @@ export interface RenderContext {
|
|
|
216
217
|
formData?: Record<string, any>;
|
|
217
218
|
state: import("./state.js").State;
|
|
218
219
|
instance?: any;
|
|
220
|
+
inheritedReadonly?: boolean;
|
|
219
221
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import type { State } from "../types/state.js";
|
|
2
|
+
export declare function isElementReadonly(element: {
|
|
3
|
+
readonly?: boolean;
|
|
4
|
+
}, state: State, ctx?: {
|
|
5
|
+
inheritedReadonly?: boolean;
|
|
6
|
+
}): boolean;
|
|
1
7
|
export declare function isPlainObject(obj: any): obj is Record<string, any>;
|
|
2
8
|
/**
|
|
3
9
|
* Escape HTML special characters to prevent XSS
|