1.2.4 • Published 3 years ago

@ecomplus/admin-helpers v1.2.4

Weekly downloads
159
License
AGPL-3.0
Repository
github
Last release
3 years ago

E-Com Plus Admin Helpers

Publish CodeFactor npm version License AGPL

DOM utils for E-Com Plus admin and related frontend apps

CHANGELOG

Usage

npm i @ecomplus/admin-helpers

Example

import { i19savedWithSuccess } from '@ecomplus/i18n'
import { i18n } from '@ecomplus/utils'
import ecomAuth from '@ecomplus/auth'
import { toast, handleApiError } from '@ecomplus/admin-helpers'

ecomAuth.login(localStorage.getItem('username'), localStorage.getItem('password'))

ecomAuth.on('login', () => {
  ecomAuth.requestApi('stores/me', 'patch', {
    domain: 'www.mystoredomain.com'
  })
    .then(() => toast(i18n(i19savedWithSuccess)))
    .catch(handleApiError)
})

CDN

<script src="https://cdn.jsdelivr.net/npm/@ecomplus/admin-helpers/dist/toast.var.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@ecomplus/admin-helpers/dist/handle-api-error.var.min.js"></script>
window.toast('Hello!')

External dependencies

It uses jQuery and Bootstrap 4 scripts (toast only).

1.2.4

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago