@haokeyingxiao/meteor-admin-sdk
TypeScript icon, indicating that this package has built-in type declarations

5.5.2 • Public • Published

meteor-admin-sdk

The meteor-admin-sdk is a JavaScript library for all HaoKe 6 App and Plugin developer which want an easy way to extend and customize the administration.

Installation

Using NPM:

Install it to your package.json

npm i --save @haokeyingxiao/meteor-admin-sdk

and import it in your app:

// import everything
import * as sw from '@haokeyingxiao/meteor-admin-sdk';

// or import only needed functionality
import { notification }  from '@haokeyingxiao/meteor-admin-sdk';

Using CDN:

Import the source from the CDN

// use the latest version available
<script src="https://unpkg.com/@haokeyingxiao/meteor-admin-sdk/cdn"></script>

// use a fix version (example here: 1.2.3)
<script src="https://unpkg.com/@haokeyingxiao/meteor-admin-sdk@1.2.3/cdn"></script>

and then you can access it with the global variable sw.

sw.notification.dispatch({
  title: 'My first notification',
  message: 'This was really easy to do'
})

Examples

Throw a notification:

sw.notification.dispatch({
  title: 'My first notification',
  message: 'This was really easy to do'
})

Get the system currency:

const currency = await sw.context.getCurrency();

Subscribe for UI locale changes:

let currentLocale = 'en-GB';

sw.context.subscribeLocale(({ locale }) => {
  currentLocale = locale;
})

Package Sidebar

Install

npm i @haokeyingxiao/meteor-admin-sdk

Weekly Downloads

9

Version

5.5.2

License

MIT

Unpacked Size

1.03 MB

Total Files

322

Last publish

Collaborators

  • xiaosong66