1.9.3 • Published 10 months ago

@unbill/ui-utils v1.9.3

Weekly downloads
2
License
ISC
Repository
gitlab
Last release
10 months ago

UI Utils

Common UI functionality used across multiple CardSwap UI projects

Application Documentation

https://confluence.q2ebanking.com/display/BDCS/UI+Utils

Local Development

Environment

import { environment } from '@unbill/ui-utils'

// Gets the current environment production/sandbox/staging/development
environment.getEnvironment(document.location.hostname)

// Gets the API Root of the core API (tentacles)
environment.getCoreApiRoot('development')

Http

// Setup
import { http } from '@unbill/ui-utils'
Vue.Use(http, options)

// Usage
// Options is optional and will use the options passed into the plugin or default options
http.get(url, options)
http.post(url, body, options)
http.delete(url, options)
http.put(url, body, options)

Http Options

// Options and their default values
const options = {
  retryHttpStatii: [502, 503, 504],
  retryMethods: ['get'], //get, post, put, delete supported
  maxRetries: 4,
  retryDelay: 500, //milliseconds with backoff for each successive try
  backOffStrategy: backOffStrategies.Additive //None, Additive, Exponential
  onBefore: [] //Function or array of functions to call before http calls. Don't take parameters.
}

When a response receives an error code, it will automatically throw the response as an error. To prevent this, in your response handling set suppressThrow on the response object itself to a truthy value.

Pre-Commit Hooks

This project is configured to support pre-commit hooks.

1.9.3

10 months ago

1.9.2

11 months ago

1.9.1

1 year ago

1.9.0

1 year ago

1.8.0

2 years ago

1.7.9

2 years ago

1.7.8

3 years ago

1.7.7

3 years ago

1.7.6

3 years ago

1.7.5

5 years ago

1.7.4

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.5

5 years ago

1.6.4

5 years ago

1.5.4

6 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago