furo-custom-method

furo-custom-method #

@furo/data v2.18.0
import '@furo/data/src/furo-custom-method.js';
exports FuroCustomMethod js
exports <furo-custom-method> custom-element-definition
superclass LitElement
mixes FBP

summary interface component to handle custom methods

furo-custom-method is a interface component to handle custom methods.

1
2
3
4
5
6
7
8
9
<furo-custom-method
    service="Servicename"
    method="release"
    fn-hts-in="--hts"
    fn-trigger="--customClick"></furo-custom-method>

<!-- produces a hateoas link array -->
<furo-deep-link
    service="Servicename" at-hts-out="--hts"></furo-deep-link>
  • before you can do any requests, the service, method and the HATEOAS must be known

Attributes and Properties #

service #

service String

Setze den Service

method #

method String

Name of the custom method / rel.

Events #

hts-updated #

at-hts-updatedHTS

Fired when hts was updated by fn-hts-in.

request-aborted #

at-request-abortedRequest

Fired when a request was canceled.

request-started #

at-request-startedRequest

Fired when a request is sent.

response-raw #

at-response-rawObject

Fired when a response is received.

response-error #

at-response-errorObject

Fired when an error has occoured. This is a general error event. The specific error events are fired additionally.

response-error-[status-code] #

at-response-error-[status-code]Object

Fired when an error has occoured. This is a specific error event.

fatal-error #

at-fatal-errorRequest

Requests are made via the Fetch API if possible.Fallback XMLHttpRequest

response-error-4xx #

at-response-error-4xxObject

Fired when an error has occoured. This is a group error event. E.g. response-error-5xx, response-error-4xx

response-error-5xx #

at-response-error-5xxObject

Fired when an error has occoured. This is a group error event. E.g. response-error-5xx, response-error-4xx

response-error-raw #

at-response-error-rawObject

Fired when a error has occoured.

response #

at-responseObject

Fired when a response is received.

Methods #

updateQp #

updateQp(qp `` key Object ) ⟹ void

`` Object fn-update-qp

Update query params a qp like {“active”:true} will just update the qp active

If the current value of the qp is not the same like the injected value, a qp-changed event will be fired

  • qp
  • key value pairs

bindRequestData #

bindRequestData(dataObject `` ) ⟹ void

`` fn-bind-request-data

Binds a furo-data-object type.

  • dataObject

clearQp #

clearQp() ⟹ void

*fn-clear-qp

clear the query params that you have setted before



trigger #

trigger() ⟹ void

*fn-trigger

trigger the method with respect for binded-requset-object



triggerEmpty #

triggerEmpty() ⟹ void

*fn-trigger-empty



triggerWithBody #

triggerWithBody(body `` ) ⟹ void

`` fn-trigger-with-body

trigger the method with data

  • body

htsIn #

htsIn(hts `` ) ⟹ void

`` fn-hts-in

  • hts

abortPendingRequest #

abortPendingRequest() ⟹ void

*fn-abort-pending-request

Aborts a pending request