pryaniky-ext-app
v0.4.41
Published
library for external apps for make actions with pryaniky
Readme
Info
Package to integrating apps to Pryaniky project
Install
npm i pryaniky-ext-appImport
import PrnExt from "pryaniky-ext-app";or
import { PrnExt } from "pryaniky-ext-app";Usage
PrnExt.inst.getCurrentUser();
.then((user) => console.log('current user: ', user))
.catch((error) => console.log(error));For native JavaScript you can connect by cdn
<script src="https://cdnbeta.pryaniky.com/static/pyaniky-ext-app/pryaniky-ext-app.js" type="text/javascript"></script>or
<script src="https://unpkg.com/pryaniky-ext-app/js/pryaniky-ext-app.js" type="text/javascript"></script>Awaliable commands
| Commands | Rezult | Descripton |
| -------- | ----- | ------- |
| getInitData | object | get passed intial data for initialized widget |
| getCurrentUser | object | get current auth user |
| getCompanySettings | object | get autorized company settings |
| getCompanyStyles | string | get company custom css with setted styles in admin -> design |
| getUserById | object | get user data by user id |
| getGroupById | object | get group data by group id |
| getGroupMembersByGroupId | object | get group users by group id |
| showDialog | object or undefined | show dialog window with frame passed by url |
| postDialogData | undefined | post dialog rezult after click confirm button in dialog before close |
||
| route | string | prepare route for dialogs or for routing inside frame |
| setFrameHeight | undefined | set frame height in pixels |
| toast | undefined | call toast function to system and show it like https://www.npmjs.com/package/react-toastify |
