@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.
@@ -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
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.2.24",
6
+ "version": "0.2.26",
7
7
  "description": "A reusable JSON schema form builder library",
8
8
  "main": "./dist/cjs/index.cjs",
9
9
  "module": "./dist/esm/index.js",