oca.js-vue

0.2.2 • Public • Published

oca.js-vue

As a reference of using this dependency check OCA Editor or Aries TDA

Functions

Zip files

  • resolveZipFile(file)

    • arguments
    • returns
      array of OCA Array1, each element matches one OCA schema
  • exportToZip(schema)

    • arguments
      • schema - OCA Schema2
    • returns
      zip file in OCA format

Forms

  • renderForm(schemaObjects)

    • arguments
      • schemaObjects - OCA Array1
    • returns
      object with two attributes: schema3 and form4
  • renderEmptyForm(uuid, label)

    • arguments
      • uuid
      • label
    • returns
      form4 object of mapped OCA schema
  • createSchemaFromForm(baseForm, form)

    • arguments
      • baseForm3
      • form4
    • returns
      OCA Schema2

Events

  • EventHandlerConstant
    provides constants of emited events:
    • ADD_CONTROL
    • REMOVE_CONTROL
    • CHANGE_DATA_OPTION_IN_CONTROL
    • EXPORT_FORM
    • PUBLISH_FORM
    • SAVE_PREVIEW
    • REJECT_PREVIEW
    • ON_LANGUAGE_CHANGE
    • ERROR
    • ACTIVATE_EDITOR_SIDEBAR
    • DEACTIVATE_EDITOR_SIDEBAR
    • ON_APPLY_EDITOR_SIDEBAR
  • eventBus

Vue Components

  • PreviewComponent
    shows dialog of OCA form

    • props

      • form
      • alternatives
      • readonly
      • confirmLabel
      • confirmProcessing
    • methods

      • openModal(formData, formInput)
      • closeModal()
  • MultiPreviewComponent
    shows dialog of many OCA forms

    • props

      • forms
      • label
      • readonly
      • confirmLabel
      • confirmProcessing
      • rejectLabel
      • rejectProcessing
    • methods

      • openModal()
      • closeModal()
  • FormBuilder

    • props
      • form
      • standards
      • standard

vuex

  • vuexModulesPlugin
    Add it to Vuex.Store constructor in plugins array

Schemas

1) OCA Array: Array of OCA JSONs, first object is schema_base JSON and the rest are overlays JSONs, ex.:

[<schema base json>, <overlay json>, <overlay json>, ...]

2) OCA Schema: JSON of OCA data, ex.:

{
  "schemaBase": <schema base json>,
  "overlay1Name-DRI": <overlay json>,
  "overlay2Name-DRI": <overlay json>,
  ...
}

3) schema: JSON of base OCA schema data, ex.:

{
  "name": string,
  "description": string,
  "classification": string,
  "uuid": string,
  "did": string,
  "version": string
}

4) form: JSON of OCA schema mapped into form format, ex.:

{
  "uuid": string,
  "label": string,
  "sections": array of Sections (see below),
  "type": string
}

Readme

Keywords

none

Package Sidebar

Install

npm i oca.js-vue

Weekly Downloads

0

Version

0.2.2

License

GPL-3.0

Unpacked Size

469 kB

Total Files

6

Last publish

Collaborators

  • olichwiruk