Options
All
  • Public
  • Public/Protected
  • All
Menu

Project editron

Index

References

Editron

Renames and exports default

Type aliases

AbstractEditorOptions

AbstractEditorOptions: { attrs?: {}; notifyNestedChanges?: boolean; notifyNestedErrors?: boolean }

Type declaration

  • Optional attrs?: {}

    HTMLDom attributes of root element (e.g. className, data-content, etc)

    • [p: string]: any
  • Optional notifyNestedChanges?: boolean

    set to true, to receive errors from current location and all erorrs of child properties/items

  • Optional notifyNestedErrors?: boolean

    set to true, to receive update from current location and all child properties/items changes

AddChange

AddChange: { pointer: JSONPointer; type: "add" }

Type declaration

BlurEvent

BlurEvent: { type: "blur"; value: JSONPointer }

called for a blurred editor

Type declaration

Change

DeleteChange

DeleteChange: { pointer: JSONPointer; type: "delete" }

Type declaration

Direction

Direction: "up" | "down" | "left" | "right"

EditorOptions

EditorOptions: { actions?: Action[]; attrs?: {}; description: string; disabled: boolean; hideTitle?: boolean; icon?: string; pointer: JSONPointer; theme?: string; title: string }

Type declaration

  • Optional actions?: Action[]

    set of actions to be rendered with editor

  • Optional attrs?: {}

    optional root-element html attributes

    • [p: string]: any
  • description: string

    object description from json-schema

  • disabled: boolean

    if set to true, editor should not allow data-modification

  • Optional hideTitle?: boolean

    hide the title

  • Optional icon?: string

    icon to display in object-header

  • pointer: JSONPointer

    json-pointer of this editor

  • Optional theme?: string

    theme options for value-editors

  • title: string

    object title from json-schema

EditorUpdateEvent

EditorUpdateEvent: UpdateDataEvent | SetEnabledEvent | ChangePointerEvent | UpdateErrorsEvent

editor lifecycle events

EditronConfigAttrs

EditronConfigAttrs: { class?: string; id?: string }

Type declaration

  • [p: string]: any
  • Optional class?: string
  • Optional id?: string

FocusEvent

FocusEvent: { type: "focus"; value: JSONPointer }

called for a focused editor

Type declaration

FormatValidator

FormatValidator: (core: any, schema: JSONSchema, value: any, pointer: JSONPointer) => undefined | ValidationError | ValidationError[] | Promise<ValidationError> | Promise<ValidationError[]>

Type declaration

JSONData

JSONData: any[] | any | number | string | boolean | null

JSONPointer

JSONPointer: string

JSONSchema

JSONSchema: { type: string }

Type declaration

  • [p: string]: any
  • type: string

KeywordValidator

KeywordValidator: (core: any, schema: JSONSchema, value: any, pointer: JSONPointer) => undefined | ValidationError | ValidationError[] | Promise<ValidationError> | Promise<ValidationError[]>

Type declaration

LocationEvent

LocationWatcher

LocationWatcher: (event: LocationEvent) => void

Type declaration

MoveChange

MoveChange: { pointer: JSONPointer; to: JSONPointer; type: "move" }

Type declaration

Options

Options: { addDefaultEditors?: boolean; editors?: EditorPlugin[]; i18n?: { errors?: {}; strings?: {} }; locationService?: LocationServiceOptions; log?: boolean; plugins?: Plugin[]; proxy?: ProxyOptions | Foxy }

Type declaration

  • Optional addDefaultEditors?: boolean

    set to false, to exclude default base-editors (object, array, values). Defaults to true

  • Optional editors?: EditorPlugin[]

    list of editors to use, replaces plugin and default editors

  • Optional i18n?: { errors?: {}; strings?: {} }

    string mapping values

    • Optional errors?: {}
      • [p: string]: string | i18nErrorFunction
    • Optional strings?: {}
      • [p: string]: string | i18nFunction
  • Optional locationService?: LocationServiceOptions

    configuration of location service

  • Optional log?: boolean

    print debug messages

  • Optional plugins?: Plugin[]

    list of plugins to use

  • Optional proxy?: ProxyOptions | Foxy

    proxy configuration for data and image retrieval

PageEvent

PageEvent: { type: "location:page"; value: JSONPointer }

called, when a new page is focused (page = first property on root data)

Type declaration

Patch

Patch: {}

Type declaration

  • [property: string]: Change

    the property "_t" { "_t": "a"} is not typed, but assigned to array-patches (jsondiffpatch delta format)

ScrollFinishEvent

ScrollFinishEvent: { type: "location:scroll-finish"; value: JSONPointer }

Type declaration

ScrollStartEvent

ScrollStartEvent: { type: "location:scroll-start"; value: JSONPointer }

Type declaration

SimpleChange

SimpleChange: { from?: JSONPointer; pointer: JSONPointer; to?: JSONPointer; type: "add" | "delete" | "update" }

Type declaration

TargetEvent

TargetEvent: { type: "location:target"; value: JSONPointer }

called, when the current selected json-pointer has changed

Type declaration

ValidationError

ValidationError: { code: string; data: { pointer: JSONPointer }; message: string; severity?: "error" | "warning"; type: "error" }

json-schema-library validation error-object

Type declaration

  • code: string
  • data: { pointer: JSONPointer }
  • message: string
  • Optional severity?: "error" | "warning"
  • type: "error"

ValueChange

ValueChange: { pointer: JSONPointer; type: "update" }

Type declaration

ValueEditorViewModel

ValueEditorViewModel: { description?: string; disabled?: boolean; errors: (string | ValidationError)[]; instantUpdate?: boolean; invertOrder?: boolean; onblur: () => void; onchange: (value: any) => void; onfocus: () => void; options: any; pointer: JSONPointer; schema: JSONSchema; theme?: string; title?: string; value?: any }

Type declaration

  • Optional description?: string
  • Optional disabled?: boolean
  • errors: (string | ValidationError)[]
  • Optional instantUpdate?: boolean
  • Optional invertOrder?: boolean
  • onblur: () => void
      • (): void
      • Returns void

  • onchange: (value: any) => void
      • (value: any): void
      • Parameters

        • value: any

        Returns void

  • onfocus: () => void
      • (): void
      • Returns void

  • options: any
  • pointer: JSONPointer
  • schema: JSONSchema
  • Optional theme?: string
  • Optional title?: string
  • Optional value?: any

Properties

SessionService

SessionService: { get: any; set: any; toggle: any }

Type declaration

plugin

plugin: { editor: any; getEditors: any; getValidators: any; keywordValidator: any; validator: any }

Type declaration

  • editor: function
  • getEditors: function
    • getEditors(): any[]
  • getValidators: function
    • getValidators(): any[]
  • keywordValidator: function
    • keywordValidator(datatype: JSONSchemaTypes, keywordName: string, validator: KeywordValidator): void
    • add a custom keyword-validator for a new keyword

      Parameters

      • datatype: JSONSchemaTypes

        datatype, to register keyword

      • keywordName: string

        name of the keyword (like oneOf, format, etc)

      • validator: KeywordValidator

        (keyword) validation function

      Returns void

  • validator: function
    • add a custom json-schema format-validator for a specific format value

      Parameters

      • _: string

        unused...

      • value: string

        value of property format for this validator (must be unique formatType)

      • validator: FormatValidator

        (format) validation function

      Returns void

Variables

Const OverlayService

OverlayService: { $element: any; resolve: any; close: any; getElement: any; open: any; removeOverlay: any; removePanel: any; render: any } = ...

Opens an overlay with a DOM-Node as contents

Type declaration

  • $element: any
  • resolve: any
  • close: function
    • close(action?: OverlayAction): void
  • getElement: function
    • getElement(): any
  • open: function
    • open(dialog: HTMLElement, options: Options): Promise<OverlayAction>
    • Opens the overlay, showing the given container as content

      Parameters

      • dialog: HTMLElement
      • options: Options

      Returns Promise<OverlayAction>

  • removeOverlay: function
    • removeOverlay(): void
  • removePanel: function
    • removePanel(action?: OverlayAction): void
  • render: function
    • render($dialog: HTMLElement, options: Options): void

Const diffpatch

diffpatch: DiffPatcher = ...

Functions

getTypeClass

onAddSortable

onEndSortable

Generated using TypeDoc