New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

oarepo-model-builder-ui

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oarepo-model-builder-ui

Model builder plugin for oarepo-ui

  • 4.0.10
  • PyPI
  • Socket score

Maintainers
1

UI model builder plugin

An OARepo Model Builder plugin to generate user interface layout from model specification.

Installation

pip install oarepo-model-builder-ui

Usage

The plugin adds support for UI annotation of the model file:

title:
  type: keyword
  label.key: title.label
  label.cs: Název
  label.en: Title
  help.key: title.help
  hint.key: title.hint
  ui:
    detail: <detail component name>
    edit: <edit component name>
    // any other property here - not validated

The following files are generated:

<package>
  +- model
    +- ui.json 
  +- templates
    +- <langcode>
      +- LC_MESSAGES
        +- messages.po
        +- messages.mo

i18n

The po and mo files are standard gettext po files. The translation keys are taken from the *.key properties. If keys are not specified, they are generated from the property path (for example, metadata.creator.firstName.label ).

UI layout

The UI layout is generated as a convenience for other tools, for example for oarepo-cli. It contains simplified layout of the model. Example:

{
  "children": {
    "title": {
      "detail": "fulltext",
      "input": "fulltext",
      "help": "title.help",
      "label": "title.label",
      "hint": "title.hint"
    },
    "providers": {
      "detail": "array",
      "input": "array",
      "help": "providers.help",
      "label": "providers.label",
      "hint": "providers.hint",
      "child": {
        "detail": "provider",
        "input": "provider",
        "children": {
          "name": {
            "detail": "keyword",
            "input": "keyword",
            "help": "providers/name.help",
            "label": "providers/name.label",
            "hint": "providers/name.hint"
          }
        }
      }
    }
  }
}

Fields:

  • detail: component used for rendering the detail page
  • input: component used for rendering input
  • help/label/hint: keys to gettext message catalogues

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc