furo-reverse-deep-link

furo-reverse-deep-link #

@furo/data v2.18.0
import '@furo/data/src/furo-reverse-deep-link.js';
exports FuroReverseDeepLink js
exports <furo-reverse-deep-link> custom-element-definition
superclass LitElement

summary create query param object from HATEOAS

Converts hateoas to queryParams, which is useful for routing with app-flow

1
2
3
4
5
<furo-reverse-deep-link
   service="TaskService"
   rel="self" at-converted="--queryParams"
   fn-convert="--rawEntityOrCollection, --linksArray, --linkObject"
></furo-reverse-deep-link>

Attributes and Properties #

service #

service string default: ''

Name of service

rel #

rel String

Optional rel to convert.

Not needed if you inject a link object.

If you insert an entity rel self is taken. If you insert a collection, rel list is used.

Events #

converted #

at-convertedQueryParams

Fired when input was converted.

Methods #

convert #

convert(data object ) ⟹ object

object fn-convert

converts the href of a LinkObject

returns Error on undefined service

  • data rawEntity|rawCollection