/** * `eox-jsonform` is a flexible and extensible web component for rendering dynamic forms based on JSON schema definitions. * It is based on [JSON Editor](https://github.com/json-editor/json-editor) and extends its functionality to support various advanced features. * Also check out the [JSON Editor documentation](https://github.com/json-editor/json-editor?tab=readme-ov-file#options) for more details on the available options and configurations. * * Features: * - Renders forms from JSON schema, supporting complex nested structures and custom validation. * - All properties and event handlers are passed via args, enabling dynamic configuration and integration. * - Supports custom editor interfaces for advanced input types and external editor integration (e.g., Ace, Markdown, spatial drawtools). * - Handles spatial inputs (bounding box, polygons, points, lines) and outputs in various formats (GeoJSON, WKT). * - Allows toggling and opt-in/optional properties, with dynamic visibility and value updates. * - Can load schema and values from external URLs, supporting async loading and ready events. * - Integrates with `eox-map` for spatial feature selection when required. * - Supports unstyled rendering for custom design integration. * * See the stories for usage examples covering validation, custom editors, spatial inputs, opt-in/optional properties, external loading, and more. * * @typedef {JSON & {properties: object}} JsonSchema * @element eox-jsonform */ export class EOxJSONForm extends LitElement { static properties: { schema: { attribute: boolean; type: ObjectConstructor; }; value: { attribute: boolean; type: ObjectConstructor; }; defaults: { attribute: boolean; type: ObjectConstructor; }; options: { attribute: boolean; type: ObjectConstructor; }; customEditorInterfaces: { attribute: boolean; type: ArrayConstructor; }; noShadow: { attribute: string; type: BooleanConstructor; }; propertiesToggle: { attribute: string; type: BooleanConstructor; }; unstyled: { type: BooleanConstructor; }; }; /** * Setter for the JSON schema used to render the form * * @param {JsonSchema} newSchema */ set schema(newSchema: JsonSchema); /** * Getter for the JSON schema used to render the form * * @return {JsonSchema | String} */ get schema(): JsonSchema | string; /** * Setter for the JSON value of the form * * @param {JsonSchema} newVal */ set value(newVal: JsonSchema); /** * Getter for the JSON value of the form */ get value(): JsonSchema; /** * Default values for the JSONEditor instance * * @type {object} */ defaults: object; /** * Options for the form editor * * @type {object} */ options: object; /** * Renders the element without a shadow root * * @type {Boolean} */ noShadow: boolean; /** * Shows a toggle for showing/hiding object properties editing buttons * To be used in combination with `options.disable_properties = false` * * @type {Boolean} */ propertiesToggle: boolean; /** * Render the element without additional styles * * @type {Boolean} */ unstyled: boolean; /** * List of custom editor interface * Read more about the implementation of custom editor interfaces here: * https://github.com/json-editor/json-editor/blob/master/docs/custom-editor.html * * @type {Array} */ customEditorInterfaces: any[]; /** * Getter for the JSONEditor instance */ get editor(): { [key: string]: any; }; _schema: string | import("./helpers/editor").JsonSchema | JsonSchema; _value: any; /** * Lifecycle method called when the element is updated * * @param {import("lit").PropertyValues} changedProperties */ updated(changedProperties: import("lit").PropertyValues): Promise; /** * Renders the component's HTML and CSS */ render(): import("lit-html").TemplateResult<1>; #private; } /** * `eox-jsonform` is a flexible and extensible web component for rendering dynamic forms based on JSON schema definitions. * It is based on [JSON Editor](https://github.com/json-editor/json-editor) and extends its functionality to support various advanced features. * Also check out the [JSON Editor documentation](https://github.com/json-editor/json-editor?tab=readme-ov-file#options) for more details on the available options and configurations. * * Features: * - Renders forms from JSON schema, supporting complex nested structures and custom validation. * - All properties and event handlers are passed via args, enabling dynamic configuration and integration. * - Supports custom editor interfaces for advanced input types and external editor integration (e.g., Ace, Markdown, spatial drawtools). * - Handles spatial inputs (bounding box, polygons, points, lines) and outputs in various formats (GeoJSON, WKT). * - Allows toggling and opt-in/optional properties, with dynamic visibility and value updates. * - Can load schema and values from external URLs, supporting async loading and ready events. * - Integrates with `eox-map` for spatial feature selection when required. * - Supports unstyled rendering for custom design integration. * * See the stories for usage examples covering validation, custom editors, spatial inputs, opt-in/optional properties, external loading, and more. */ export type JsonSchema = JSON & { properties: object; }; import { LitElement } from "lit"; //# sourceMappingURL=main.d.ts.map