# @covergo/ui-renderer

> CoverGo UI Renderer

Latest version **0.0.21** (published 2019-07-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install @covergo/ui-renderer
pnpm add @covergo/ui-renderer
yarn add @covergo/ui-renderer
bun add @covergo/ui-renderer
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.21 |
| Published | 2019-07-04 |
| First published | 2019-06-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 95.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | John Valustik, Alex Montgomery, Denis Tsoi |
| Maintainers | alexpm, denistsoi, goergemiguel, johnvalustik |
| Keywords | vue, npm, published, component |

## Links

- npm: https://www.npmjs.com/package/@covergo/ui-renderer
- Repository: https://github.com/CoverGo/ui-renderer
- Homepage: https://github.com/CoverGo/ui-renderer#readme
- Issues: https://github.com/CoverGo/ui-renderer
- npm.io page: https://npm.io/package/@covergo/ui-renderer

## Dependencies (1)

- [deepmerge](https://npm.io/package/deepmerge.md) ^3.2.1

## Recent versions

- 0.0.21 (latest) — 2019-07-04
- 0.0.20 — 2019-07-04
- 0.0.19 — 2019-06-28
- 0.0.18 — 2019-06-28
- 0.0.17 — 2019-06-28
- 0.0.16 — 2019-06-28
- 0.0.15 — 2019-06-20
- 0.0.14 — 2019-06-20
- 0.0.13 — 2019-06-20
- 0.0.12 — 2019-06-20
- 0.0.11 — 2019-06-18
- 0.0.9 — 2019-06-15
- 0.0.8 — 2019-06-15
- 0.0.7 — 2019-06-14
- 0.0.6 — 2019-06-13
- … 5 more at https://npm.io/package/@covergo/ui-renderer/versions

## README

# UI Renderer

Component that takes uiConfig JSON and renders Vue component client side

---

## About Schema

[See schema here](https://github.com/CoverGo/ui-renderer/blob/master/src/uiConfigSchema.js)

### Events:

- We should only invoke methods in events

### Directives:

- We support only if,for and editor-helpers directive as of now
- Directives are not nativelly supported in React and others so we have to avoid using directives for complex cases that's why we have limited directives we can use

### Localization:

- We will localize configs backend side via string interplations (syntax not know now)
- We also have an option to introduce the whole new config if trsanslation is not enough - this allows us to change everything per language

### Slots:

- We don't need traditional slots for UI composition - avoid it
- We might need some mechanics for scoped slots - maybe just attributes as it's vue specific?

### UI tree:

- Every UI tree has to have only one root component
- Every UI tree node is an object
- We never use keyword "this" to point to data in UI tree

### Methods:

- Methods have to be in ES5 syntax so that we support all browsers or we have to figure out some transpilation but that seems complicated

### Typed value:

- In some scenarios we need to pass value (e.g. args, props, attributes...)
- We have a special object to handle type properly

```
{
	number: 10,
	string: "hello world",
	boolean: true,
	js: "this.isLoading ? 'Loading...' : ''", can be js expressions as string or Object, Array
}
```

---
_Source: https://npm.io/package/@covergo/ui-renderer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
